[Javanetsim-cvs] IceScan/icesockets csocket.h, 1.12, 1.13 sock_time.h, 1.5, 1.6 sock_types.h, 1.8,
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2006-12-16 00:29:21
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27015/icesockets Modified Files: csocket.h sock_time.h sock_types.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sock_types.h 15 Dec 2006 15:27:57 -0000 1.8 --- sock_types.h 16 Dec 2006 00:29:16 -0000 1.9 *************** *** 15,19 **** --- 15,23 ---- #include <sys/socket.h> #include <arpa/inet.h> + + #ifndef __CYGWIN__ #include <net/if_arp.h> + #endif + #include <netinet/in.h> #include <netinet/ip.h> *************** *** 177,210 **** int icmp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t)); #endif - - #endif ! // IP Header structure for cygwin ! #ifdef __CYGWIN__ ! struct iphdr ! { ! #if __BYTE_ORDER == __LITTLE_ENDIAN ! unsigned int ihl:4; ! unsigned int version:4; ! #elif __BYTE_ORDER == __BIG_ENDIAN ! unsigned int version:4; ! unsigned int ihl:4; ! #else ! # error "Please fix <bits/endian.h>" ! #endif ! my_uint8_t tos; ! my_uint16_t tot_len; ! my_uint16_t id; ! my_uint16_t frag_off; ! my_uint8_t ttl; ! my_uint8_t protocol; ! my_uint16_t check; ! my_uint32_t saddr; ! my_uint32_t daddr; ! /*The options start here. */ ! }; #endif ! #endif --- 181,220 ---- int icmp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t)); #endif + struct iphdr + { + #if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int ihl:4; + unsigned int version:4; + #elif __BYTE_ORDER == __BIG_ENDIAN + unsigned int version:4; + unsigned int ihl:4; + #else + # error "Please fix <bits/endian.h>" + #endif + my_uint8_t tos; + my_uint16_t tot_len; + my_uint16_t id; + my_uint16_t frag_off; + my_uint8_t ttl; + my_uint8_t protocol; + my_uint16_t check; + my_uint32_t saddr; + my_uint32_t daddr; + }; ! /* ARP ioctl request. */ ! struct arpreq ! { ! struct sockaddr arp_pa; /* Protocol address. */ ! struct sockaddr arp_ha; /* Hardware address. */ ! int arp_flags; /* Flags. */ ! struct sockaddr arp_netmask; /* Netmask (only for proxy arps). */ ! char arp_dev[16]; ! }; ! #define SIOCGARP 0x8954 /* get ARP table entry */ #endif ! ! #endif Index: csocket.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/csocket.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** csocket.h 15 Dec 2006 15:27:57 -0000 1.12 --- csocket.h 16 Dec 2006 00:29:16 -0000 1.13 *************** *** 258,261 **** --- 258,265 ---- } + static int getMagicPort(){ + return 0; + } + }; Index: sock_time.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_time.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sock_time.h 15 Dec 2006 21:04:55 -0000 1.5 --- sock_time.h 16 Dec 2006 00:29:16 -0000 1.6 *************** *** 36,46 **** char buf[1024]; ! int msecs = t % (1000*60*60*24); ! int secs = t % (60*60*24); ! int mins = t % (60*24); ! int hours = t%(24); int days = t/(1000*60*60*24); --- 36,46 ---- char buf[1024]; ! int msecs = t % (1000); ! int secs = t/1000 % (60); ! int mins = t/1000/60 % (60); ! int hours = t/1000/60/60 % (24); int days = t/(1000*60*60*24); |