Monero
Loading...
Searching...
No Matches
addr_is_reserved.c File Reference
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Include dependency graph for addr_is_reserved.c:

Macros

#define IP(a, b, c, d)
#define MSK(m)

Functions

int addr_is_reserved (const char *addr_str)

Variables

struct { 
   uint32_t   address 
   uint32_t   rmask 
reserved []

Macro Definition Documentation

◆ IP

#define IP ( a,
b,
c,
d )
Value:
(((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
cryptonote::block b
Definition block.cpp:40
Definition d.py:1
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1124

◆ MSK

#define MSK ( m)
Value:
(32-(m))

Function Documentation

◆ addr_is_reserved()

int addr_is_reserved ( const char * addr_str)
Returns
1 or 0

Variable Documentation

◆ address

uint32_t address

◆ [struct]

const struct { ... } reserved[]
Initial value:
= {
{ IP( 0, 0, 0, 0), MSK( 8) },
{ IP( 10, 0, 0, 0), MSK( 8) },
{ IP(100, 64, 0, 0), MSK(10) },
{ IP(127, 0, 0, 0), MSK( 8) },
{ IP(169, 254, 0, 0), MSK(16) },
{ IP(172, 16, 0, 0), MSK(12) },
{ IP(192, 0, 0, 0), MSK(24) },
{ IP(192, 0, 2, 0), MSK(24) },
{ IP(192, 31, 196, 0), MSK(24) },
{ IP(192, 52, 193, 0), MSK(24) },
{ IP(192, 88, 99, 0), MSK(24) },
{ IP(192, 168, 0, 0), MSK(16) },
{ IP(192, 175, 48, 0), MSK(24) },
{ IP(198, 18, 0, 0), MSK(15) },
{ IP(198, 51, 100, 0), MSK(24) },
{ IP(203, 0, 113, 0), MSK(24) },
{ IP(224, 0, 0, 0), MSK( 4) },
{ IP(240, 0, 0, 0), MSK( 4) },
}
#define IP(a, b, c, d)
Definition getifaddr.c:267
#define MSK(m)
Definition getifaddr.c:268

◆ rmask

uint32_t rmask