[Javanetsim-cvs] IceScan/icesockets crawsocket.h, 1.3, 1.4 sock_types.h, 1.3, 1.4
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-12-13 13:22:05
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21429/icesockets Modified Files: crawsocket.h sock_types.h Log Message: no message Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sock_types.h 12 Dec 2006 20:40:19 -0000 1.3 --- sock_types.h 13 Dec 2006 13:22:00 -0000 1.4 *************** *** 10,13 **** --- 10,18 ---- #include <netdb.h> + + #define my_uint16_t uint16_t + #define my_uint32_t uint32_t + #define my_uint8_t uint8_t + // Re-Defining string type; use icestring instead of string #ifdef __CYGWIN__ Index: crawsocket.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/crawsocket.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** crawsocket.h 13 Dec 2006 12:59:06 -0000 1.3 --- crawsocket.h 13 Dec 2006 13:22:00 -0000 1.4 *************** *** 10,18 **** struct pseudo_header { ! unsigned long s_addr; ! unsigned long d_addr; ! char zero; ! unsigned char protocol; ! unsigned short length; }; --- 10,18 ---- struct pseudo_header { ! my_uint32_t s_addr; ! my_uint32_t d_addr; ! my_uint8_t zero; ! my_uint8_t protocol; ! my_uint16_t length; }; *************** *** 162,171 **** if (seq) tcp->th_seq = htonl(seq); ! //else tcp->th_seq = rand() + rand(); if (flags & TH_ACK && ack) tcp->th_ack = htonl(seq); ! //else if (flags & TH_ACK) ! // tcp->th_ack = rand() + rand(); tcp->th_off = 5; --- 162,171 ---- if (seq) tcp->th_seq = htonl(seq); ! else tcp->th_seq = rand() + rand(); if (flags & TH_ACK && ack) tcp->th_ack = htonl(seq); ! else if (flags & TH_ACK) ! tcp->th_ack = rand() + rand(); tcp->th_off = 5; |