2 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 // Created: Mon Sep 08 2003
8 // Copyright: 2003 Chaz McGarvey. All rights reserved.
9 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 #include <sys/socket.h>
18 #include <netinet/in.h>
19 #include <arpa/inet.h>
21 #include <sys/types.h>
28 #define COPY_TO_BUFFER( to, from, size ) memcpy( to, from, size ), (char *)to += size;
29 #define COPY_FROM_BUFFER( to, from, size ) memcpy( to, from, size ), (char *)from += size;
32 struct tagPacketHeader
39 typedef struct tagPacketHeader PacketHeader
;
42 u_int32_t
RandomChecksum();
43 char VerifyChecksum( u_int32_t checksum
);
44 int CountBits( u_int8_t byte
);
46 int SendBuffer( int socket
, char const *buffer
, int *length
);
47 int ReadBuffer( int socket
, char *buffer
, int length
);