Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in.h
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | |||||
#define IN_CLASSC_HOST 0x000000ff | #define IN_CLASSC_HOST 0x000000ff | ||||
#define IN_CLASSD(i) (((in_addr_t)(i) & 0xf0000000) == 0xe0000000) | #define IN_CLASSD(i) (((in_addr_t)(i) & 0xf0000000) == 0xe0000000) | ||||
#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */ | #define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */ | ||||
#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */ | #define IN_CLASSD_NSHIFT 28 /* net and host fields, but */ | ||||
#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */ | #define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */ | ||||
#define IN_MULTICAST(i) IN_CLASSD(i) | #define IN_MULTICAST(i) IN_CLASSD(i) | ||||
#define IN_EXPERIMENTAL(i) (((in_addr_t)(i) & 0xf0000000) == 0xf0000000) | /* Open IN_EXPERMINTAL up so that only 255.255.255/24 is restricted */ | ||||
#define IN_EXPERIMENTAL(i) (((in_addr_t)(i) & 0xffffff00) == 0xffffff00) | |||||
#define IN_BADCLASS(i) (((in_addr_t)(i) & 0xf0000000) == 0xf0000000) | #define IN_BADCLASS(i) (((in_addr_t)(i) & 0xf0000000) == 0xf0000000) | ||||
#define IN_LINKLOCAL(i) (((in_addr_t)(i) & 0xffff0000) == 0xa9fe0000) | #define IN_LINKLOCAL(i) (((in_addr_t)(i) & 0xffff0000) == 0xa9fe0000) | ||||
#define IN_LOOPBACK(i) (((in_addr_t)(i) & 0xff000000) == 0x7f000000) | /* Open IN_LOOPBACK up so that only 127.0/16 is restricted */ | ||||
#define IN_ZERONET(i) (((in_addr_t)(i) & 0xff000000) == 0) | #define IN_LOOPBACK(i) (((in_addr_t)(i) & 0xffff0000) == 0x7f000000) | ||||
/* Open IN_ZERONET up so that only 0/24 is restricted */ | |||||
#define IN_ZERONET(i) (((in_addr_t)(i) & 0xffffff00) == 0) | |||||
#define IN_PRIVATE(i) ((((in_addr_t)(i) & 0xff000000) == 0x0a000000) || \ | #define IN_PRIVATE(i) ((((in_addr_t)(i) & 0xff000000) == 0x0a000000) || \ | ||||
(((in_addr_t)(i) & 0xfff00000) == 0xac100000) || \ | (((in_addr_t)(i) & 0xfff00000) == 0xac100000) || \ | ||||
(((in_addr_t)(i) & 0xffff0000) == 0xc0a80000)) | (((in_addr_t)(i) & 0xffff0000) == 0xc0a80000)) | ||||
#define IN_LOCAL_GROUP(i) (((in_addr_t)(i) & 0xffffff00) == 0xe0000000) | #define IN_LOCAL_GROUP(i) (((in_addr_t)(i) & 0xffffff00) == 0xe0000000) | ||||
#define IN_ANY_LOCAL(i) (IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)) | #define IN_ANY_LOCAL(i) (IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)) | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |