7 #include <sys/socket.h>
12 #include <arpa/inet.h>
14 #define BYTE unsigned char
15 #define DWORD unsigned long
21 #define SOCKADDR struct sockaddr
22 #define SOCKADDR_IN struct sockaddr_in
23 typedef struct _WSABUF
{
28 #define SIO_RCVALL_IGMPMCAST 0
29 #define SIO_RCVALL_MCAST 0
30 #define ETH_P_ALL 0x0003
42 #define MAX_IP_SIZE 65535
43 #define MIN_IP_HDR_SIZE 20
45 #define HI_WORD(byte) (((byte) >> 4) & 0x0F)
46 #define LO_WORD(byte) ((byte) & 0x0F)
48 extern char *szProto
[];
52 void PrintRawBytes (BYTE
*ptr
, DWORD len
);
53 int DecodeIGMPHeader(WSABUF
*wsabuf
, DWORD iphdrlen
);
54 int DecodeUDPHeader (WSABUF
*wsabuf
, DWORD iphdrlen
);
55 int DecodeTCPHeader (WSABUF
*wsabuf
, DWORD iphdrlenz
);
56 int DecodeIPHeader (WSABUF
*wasbuf
, unsigned int srcaddr
, unsigned short srcport
, unsigned long srcnet
,
57 unsigned int destaddr
, unsigned short destport
, unsigned long destnet
, DWORD bytesret
,
58 unsigned short xport
, unsigned int xip
, unsigned long xnet
);
This page took 0.054615 seconds and 5 git commands to generate.