mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 15:03:34 +00:00
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
|
#ifndef COSMOPOLITAN_NET_HTTP_IP_H_
|
||
|
#define COSMOPOLITAN_NET_HTTP_IP_H_
|
||
|
|
||
|
#define kIpUnknown 0
|
||
|
#define kIpMulticast 1
|
||
|
#define kIpLoopback 2
|
||
|
#define kIpPrivate 3
|
||
|
#define kIpTestnet 4
|
||
|
#define kIpAfrinic 5
|
||
|
#define kIpLacnic 6
|
||
|
#define kIpApnic 7
|
||
|
#define kIpArin 8
|
||
|
#define kIpRipe 9
|
||
|
#define kIpDod 10
|
||
|
#define kIpAtt 11
|
||
|
#define kIpApple 12
|
||
|
#define kIpFord 13
|
||
|
#define kIpCogent 14
|
||
|
#define kIpPrudential 15
|
||
|
#define kIpUsps 16
|
||
|
#define kIpComcast 17
|
||
|
#define kIpFuture 18
|
||
|
#define kIpAnonymous 19
|
||
|
|
||
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||
|
COSMOPOLITAN_C_START_
|
||
|
|
||
|
bool IsDodIp(uint32_t);
|
||
|
bool IsArinIp(uint32_t);
|
||
|
bool IsRipeIp(uint32_t);
|
||
|
bool IsApnicIp(uint32_t);
|
||
|
bool IsLacnicIp(uint32_t);
|
||
|
bool IsPublicIp(uint32_t);
|
||
|
bool IsPrivateIp(uint32_t);
|
||
|
bool IsAfrinicIp(uint32_t);
|
||
|
bool IsTestnetIp(uint32_t);
|
||
|
bool IsLoopbackIp(uint32_t);
|
||
|
bool IsMulticastIp(uint32_t);
|
||
|
bool IsAnonymousIp(uint32_t);
|
||
|
int CategorizeIp(uint32_t);
|
||
|
const char *GetIpCategoryName(int);
|
||
|
|
||
|
COSMOPOLITAN_C_END_
|
||
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||
|
#endif /* COSMOPOLITAN_NET_HTTP_IP_H_ */
|