資源簡介
開源的802.1X客戶端源代碼,網絡準入控制 NAP NAC

代碼片段和文件信息
/**
?*?framework?to?trap?crashes?on?an?OS?and?create?information?needed?for?debugging?the?crash.
?*
?*?Licensed?under?the?dual?GPL/BSD?license.??(See?LICENSE?file?for?more?info.)
?*
?*?\file?crashdump.c
?*
?*?\author?chris@open1x.org
?**/
#ifdef?WINDOWS
#define?_CRT_SECURE_NO_WARNINGS
#else
#define?_strdup??strdup
#endif
#include?
#include?
#include?
#include?
#include?
#include?
#ifdef?WINDOWS
#include?
#include?
#endif
#include?“zip.h“
#include?“crashdump.h“
#include?“crash_handler.h“
#ifdef?WINDOWS
#define?USEWIN32IOAPI
#include?“iowin32.h“
#define?unlink??_unlink
#endif
#define?DEBUG???1???///
#ifdef?DEBUG
FILE?*tempf?=?NULL;
#endif
typedef?struct?{
char?*filename;
char?unlink; ///0?if?we?should?leave?it?1?if?we?should?delete?it.
}?cfiles;
cfiles?*crashfiles; ///int?num_crashfiles; ///
char?*curuser_conf?=?NULL;
char?*zipdumppath; ///
/**
?*?\brief?Init?the?crashdump?library?by?setting?any?variable?state?that?we?need?to?set.
?*
?*?@param[in]?zipdumppath_in???The?path?that?we?want?to?put?the?resulting?zipped?dump?file?in.
?**/
void?crashdump_init(char?*zipdumppath_in)
{
crashfiles?=?NULL;
num_crashfiles?=?0;
zipdumppath?=?_strdup(zipdumppath_in);
}
/**
?*?\brief?Add?the?current?user‘s?configuration?to?the?crash?list.
?*
?*?@param[in]?conf_path???The?path?to?the?current?user‘s?configuration?file.
?**/
void?crashdump_add_curuser_conf(char?*conf_path)
{
crashdump_remove_curuser_conf();
curuser_conf?=?_strdup(conf_path);
}
/**
?*?\brief?Remote?the?current?user‘s?configuration?from?the?crash?list.
?**/
void?crashdump_remove_curuser_conf()
{
if?(curuser_conf?!=?NULL)?{
free(curuser_conf);
curuser_conf?=?NULL;
}
}
/**
?*?\brief?Add?a?file?to?our?crash?dump?gathering?list.??The?files?that?are?added?will?be?picked?up?and?stuck?in?a?.zip?file
?*????????in?the?event?of?a?crash.??(In?the?event?of?a?water?landing?the?files?cannot?be?used?for?flotation.)
?*
?*?@param[in]?filename???The?full?path?to?the?file?that?we?want?to?add?to?our?zip?file.
?*?@param[in]?unlink???Should?we?delete?the?file?after?gathering?it.
?*
?*?\retval?CRASHDUMP_ALREADY_EXISTS?if?the?file?is?already?in?the?list.
?*?\retval?CRASHDUMP_NO_ERROR?on?success
?*?\retval?CRASHDUMP_CANT_ADD?on?failure.
?**/
int?crashdump_add_file(char?*filename?char?unlink)
{
void?*oldptr?=?NULL;
int?i;
for?(i?=?0;?i? if?(strcmp(filename?crashfiles[i].filename)?==?0)?{
fprintf(stderr?“File?%s?==?%s!??Skipping!\n“?filename
crashfiles[i].filename);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????177??2009-05-26?16:16??XSupplicant-2.2.0-src\xsupplicant\AUTHORS
?????文件??????????30??2009-05-15?12:58??XSupplicant-2.2.0-src\xsupplicant\autoregen.sh
?????文件????????4493??2008-02-15?16:50??XSupplicant-2.2.0-src\xsupplicant\ChangeLog
?????文件?????????252??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\clean_tree.sh
?????文件???????18922??2009-06-18?10:20??XSupplicant-2.2.0-src\xsupplicant\configure.ac
?????文件???????18332??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\COPYING
?????文件???????53142??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\Doxyfile.in
?????文件????????9986??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\Doxyfile.win
?????文件???????15071??2008-05-04?00:32??XSupplicant-2.2.0-src\xsupplicant\doc\extending_the_xsupplicant_configuration_file.rtf
?????文件???????11816??2008-05-04?03:14??XSupplicant-2.2.0-src\xsupplicant\doc\extending_the_xsupplicant_plugin_architecture.rtf
?????文件?????????593??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\Makefile.am
?????文件????????4120??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\README.certificates
?????文件????????2773??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\README.direct_radius
?????文件????????1038??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\README.wpa
?????文件??????196591??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-arkko-pppext-eap-aka-14.txt
?????文件??????199790??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-arkko-pppext-eap-aka-15.txt
?????文件??????136206??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-cam-winget-eap-fast-03.txt
?????文件???????93596??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-cam-winget-eap-fast-provisioning-02.txt
?????文件???????57694??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-funk-eap-ttls-v1-01.txt
?????文件???????75716??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-haverinen-pppext-eap-sim-05.txt
?????文件??????171047??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-haverinen-pppext-eap-sim-11.txt
?????文件??????132961??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-ietf-pppext-eap-ttls-05.txt
?????文件???????86690??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-josefsson-pppext-eap-tls-eap-05.txt
?????文件???????42535??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-kamath-pppext-eap-mschapv2-00.txt
?????文件???????32703??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\draft-kamath-pppext-peapv0-00.txt
?????文件???????30295??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\eap-rfc2284.txt
?????文件??????161749??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\rfc3748.txt
?????文件??????108640??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\standards\rfc4137.txt
?????文件???????27749??2008-02-25?01:21??XSupplicant-2.2.0-src\xsupplicant\doc\XSupplicant?Compile?Guide?-?Win32.odt
?????文件???????70212??2008-02-25?01:21??XSupplicant-2.2.0-src\xsupplicant\doc\XSupplicant?Compile?Guide?-?Win32.pdf
?????文件????????9438??2008-02-05?14:23??XSupplicant-2.2.0-src\xsupplicant\doc\Xsupplicant-wireless-cards.html
............此處省略740個文件信息
評論
共有 條評論