資源簡介
網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)!源碼功能很強大,注意平臺是Linux/Unix,語言是C/C++,是從事Unix/Linux平臺開發(fā)網(wǎng)絡(luò)程序的好資料,歡迎學(xué)習(xí)C++ Linux/Unix開發(fā)的人學(xué)習(xí)參考

代碼片段和文件信息
/*?$Id:?checksum.cv?1.2?2001/01/02?08:06:00?roesch?Exp?$?*/
/*
**?Copyright?(C)?1998199920002001?Martin?Roesch?
**
**?This?program?is?free?software;?you?can?redistribute?it?and/or?modify
**?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
**?the?Free?Software?Foundation;?either?version?2?of?the?License?or
**?(at?your?option)?any?later?version.
**
**?This?program?is?distributed?in?the?hope?that?it?will?be?useful
**?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
**?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
**?GNU?General?Public?License?for?more?details.
**
**?You?should?have?received?a?copy?of?the?GNU?General?Public?License
**?along?with?this?program;?if?not?write?to?the?Free?Software
**?Foundation?Inc.?59?Temple?Place?-?Suite?330?Boston?MA?02111-1307?USA.
*/
#include?“checksum.h“
/*
?*?Function:?checksum(u_int16_t?*?u_int32_t?u_int16_t?*?u_int32_t)
?*
?*?Purpose:?Huh?huh?math....
?*
?*?Arguments:?b1???=>?pointer?to?data?set?one
?*????????????len1?=>?length?of?data?set?one
?*????????????b2???=>?pointer?to?data?set?two
?*????????????len2?=>?length?of?data?set?two
?*
?*?Returns:?csum?=>?the?calculated?checksum?for?the?given?data
?*/
u_int16_t?checksum(u_int16_t?*b1?u_int32_t?len1?u_int16_t?*b2?u_int32_t?len2)
{
????u_int32_t?sum?=?0;
????if(b1?!=?(u_int16_t?*)NULL)?
????{
????????while(len1?>?1)?
????????{
????????????sum?+=?*((u_int16_t?*)b1?++);
????????????if(sum?&?0x80000000)
????????????{
????????????????sum?=?(sum?&?0xffff)?+?(sum?>>?16);
????????????}
????????????len1?-=?2;
????????}
????
????????/*?we‘ll?have?problems?if?b2?exists?and?len1?is?odd?*/
????????if(len1)
????????{
???????????sum?+=?(u_int16_t)?*?(u_int8_t*)?b1;
????????}
????}
????if(b2?!=?(u_int16_t*)NULL)?
????{
????????while(len2?>?1)?
????????{
????????????sum?+=?*((u_int16_t*)b2?++);
????????????if(sum?&?0x80000000)
????????????{
????????????????sum?=?(sum?&?0xffff)?+?(sum?>>?16);
????????????}
????????????len2?-=?2;
????????}
????????if(len2)
????????{
????????????sum?+=?(u_int16_t)?*?(u_int8_t*)?b2;
????????}
????}
????while(sum?>>?16)
????????sum?=?(sum?&?0xffff)?+?(sum?>>?16);
????return?~sum;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄??????????0??2005-08-04?19:22??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)
?????文件????????901??2004-04-12?00:00??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\@Readme.txt
?????目錄??????????0??2005-08-04?19:17??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com
?????文件???????1037??2000-10-31?11:36??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\acconfig.h
?????文件???????7205??2001-01-05?13:22??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\aclocal.m4
?????文件????????269??2000-10-29?01:23??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\AUTHORS
?????文件???????3124??2000-11-20?00:41??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\backdoor-lib
?????文件???????1005??2001-01-18?05:40??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\BUGS
?????文件???????3718??2000-10-29?01:35??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\cdefs.h
?????文件??????30111??2001-01-18?08:30??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\ChangeLog
?????文件???????2294??2001-01-02?02:06??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\checksum.c
?????文件???????1278??2001-01-02?02:06??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\checksum.h
?????文件??????21063??2000-10-29?01:23??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\config.guess
?????文件???????3353??2001-02-05?09:01??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\config.h
?????文件???????2659??2001-01-26?19:03??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\config.h.in
?????文件??????20163??2000-10-29?01:23??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\config.sub
?????文件?????109328??2001-01-30?20:53??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\configure
?????文件??????15219??2001-01-30?20:53??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\configure.in
????..AD...?????????0??2001-02-05?08:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib
?????文件??????48550??2000-11-08?19:25??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\ACID-0.9.5b9.tar.gz
?????文件????????932??2000-08-07?02:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\address_config.sh
?????文件???????6631??2000-08-30?20:46??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\create_mysql
?????文件???????5357??2001-01-03?21:26??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\create_oracle
?????文件???????5318??2000-08-30?20:46??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\create_postgresql
?????文件???????4357??2000-08-07?02:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\Guardian.tar.gz
?????文件??????23061??2001-01-02?19:52??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\idmef-xm
?????文件?????581600??2001-02-05?08:41??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\idscenter-1.08.ZIP
?????文件??????10826??2000-08-07?02:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\mysql.php3
?????文件??????10916??2000-08-07?02:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\Net-SnortLog-0.1.tar.gz
?????文件???????2621??2000-08-07?02:42??網(wǎng)絡(luò)入侵檢測系統(tǒng)(源碼)\vvsoft.com\contrib\passiveOS.tar.gz
............此處省略248個文件信息
評論
共有 條評論