类型定义
#ifndef __LIBNET_TYPES_H__
#define __LIBNET_TYPES_H__
#include <sys/types.h>
#if !defined (__cplusplus)
typedef unsigned char bool;
#define false 0
#define true (!0)
#endif
/*可以通过cpp来查看系统预定义宏,执行:touch foo.h; cpp -dM foo.h*/
#if defined( _AIX )
#elif defined( __linux )
#elif defined( __hpux )
#include <arpa/nameser_compat.h>
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
#elif defined( __sun ) || defined( __sunos ) || defined( __solaris )
#include <arpa/nameser_compat.h>
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
#elif defined( __dgux ) || defined( __digital )
#elif defined( __CYGWIN__ )
#endif
#endif
#define __LIBNET_TYPES_H__
#include <sys/types.h>
#if !defined (__cplusplus)
typedef unsigned char bool;
#define false 0
#define true (!0)
#endif
/*可以通过cpp来查看系统预定义宏,执行:touch foo.h; cpp -dM foo.h*/
#if defined( _AIX )
#elif defined( __linux )
#elif defined( __hpux )
#include <arpa/nameser_compat.h>
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
#elif defined( __sun ) || defined( __sunos ) || defined( __solaris )
#include <arpa/nameser_compat.h>
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
#elif defined( __dgux ) || defined( __digital )
#elif defined( __CYGWIN__ )
#endif
#endif