VSF Documented
Data Structures | Macros | Typedefs | Enumerations | Variables
in.h File Reference
#include "shell/sys/linux/vsf_linux_cfg.h"
#include "../sys/types.h"
#include "../sys/socket.h"
#include "../arpa/inet.h"

Go to the source code of this file.

Data Structures

struct  in_addr
 
struct  sockaddr_in
 
struct  ip_mreq
 
struct  in6_addr
 
struct  sockaddr_in6
 
struct  ipv6_mreq
 

Macros

#define IPPROTO_IP   IPPROTO_IP
 
#define IPPROTO_ICMP   IPPROTO_ICMP
 
#define IPPROTO_IGMP   IPPROTO_IGMP
 
#define IPPROTO_TCP   IPPROTO_TCP
 
#define IPPROTO_UDP   IPPROTO_UDP
 
#define IPPROTO_IPV6   IPPROTO_IPV6
 
#define IPPROTO_RAW   IPPROTO_RAW
 
#define INADDR_ANY   (in_addr_t)0x00000000
 
#define INADDR_NONE   (in_addr_t)0xFFFFFFFF
 
#define INADDR_BROADCAST   (in_addr_t)0xFFFFFFFF
 
#define INADDR_LOOPBACK   (in_addr_t)0x7F000001
 
#define IN_CLASSA(a)   ((((long int) (a)) & 0x80000000) == 0)
 
#define IN_CLASSA_NET   0xff000000
 
#define IN_CLASSA_NSHIFT   24
 
#define IN_CLASSA_HOST   (0xffffffff & ~IN_CLASSA_NET)
 
#define IN_CLASSA_MAX   128
 
#define IN_CLASSB(a)   ((((long int) (a)) & 0xc0000000) == 0x80000000)
 
#define IN_CLASSB_NET   0xffff0000
 
#define IN_CLASSB_NSHIFT   16
 
#define IN_CLASSB_HOST   (0xffffffff & ~IN_CLASSB_NET)
 
#define IN_CLASSB_MAX   65536
 
#define IN_CLASSC(a)   ((((long int) (a)) & 0xe0000000) == 0xc0000000)
 
#define IN_CLASSC_NET   0xffffff00
 
#define IN_CLASSC_NSHIFT   8
 
#define IN_CLASSC_HOST   (0xffffffff & ~IN_CLASSC_NET)
 
#define IN_CLASSD(a)   ((((long int) (a)) & 0xf0000000) == 0xe0000000)
 
#define IN_MULTICAST(a)   IN_CLASSD(a)
 
#define IN_MULTICAST_NET   0xe0000000
 
#define IN6_IS_ADDR_MULTICAST(a)   (((const uint8_t *) (a))[0] == 0xff)
 
#define IN6_IS_ADDR_MC_NODELOCAL(a)
 
#define IN6_IS_ADDR_MC_LINKLOCAL(a)
 
#define IN6_IS_ADDR_MC_SITELOCAL(a)
 
#define IN6_IS_ADDR_MC_ORGLOCAL(a)
 
#define IN6_IS_ADDR_MC_GLOBAL(a)
 
#define IN6_IS_ADDR_UNSPECIFIED(a)
 
#define IN6_IS_ADDR_LOOPBACK(a)
 
#define IN6_IS_ADDR_LINKLOCAL(a)
 
#define IN6_IS_ADDR_SITELOCAL(a)
 
#define IN6_IS_ADDR_V4MAPPED(a)
 
#define IN6_IS_ADDR_V4COMPAT(a)
 
#define IN6_ARE_ADDR_EQUAL(a, b)
 
#define INET_ADDRSTRLEN   16
 
#define SIN_ZERO_LEN   8
 
#define INET6_ADDRSTRLEN   46
 
#define IN6ADDR_ANY_INIT   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
#define IN6ADDR_LOOPBACK_INIT   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
 

Typedefs

typedef uint16_t in_port_t
 
typedef uint32_t in_addr_t
 

Enumerations

enum  {
  IPPROTO_IP = 0 ,
  IPPROTO_IP = 0 ,
  IPPROTO_ICMP = 1 ,
  IPPROTO_ICMP = 1 ,
  IPPROTO_IGMP = 2 ,
  IPPROTO_IGMP = 2 ,
  IPPROTO_TCP = 6 ,
  IPPROTO_TCP = 6 ,
  IPPROTO_UDP = 17 ,
  IPPROTO_UDP = 17 ,
  IPPROTO_IPV6 = 41 ,
  IPPROTO_IPV6 = 41 ,
  IPPROTO_RAW = 255 ,
  IPPROTO_RAW = 255
}
 

Variables

const struct in6_addr in6addr_any
 
const struct in6_addr in6addr_loopback
 

Macro Definition Documentation

◆ IPPROTO_IP

#define IPPROTO_IP   IPPROTO_IP

◆ IPPROTO_ICMP

#define IPPROTO_ICMP   IPPROTO_ICMP

◆ IPPROTO_IGMP

#define IPPROTO_IGMP   IPPROTO_IGMP

◆ IPPROTO_TCP

#define IPPROTO_TCP   IPPROTO_TCP

◆ IPPROTO_UDP

#define IPPROTO_UDP   IPPROTO_UDP

◆ IPPROTO_IPV6

#define IPPROTO_IPV6   IPPROTO_IPV6

◆ IPPROTO_RAW

#define IPPROTO_RAW   IPPROTO_RAW

◆ INADDR_ANY

#define INADDR_ANY   (in_addr_t)0x00000000

◆ INADDR_NONE

#define INADDR_NONE   (in_addr_t)0xFFFFFFFF

◆ INADDR_BROADCAST

#define INADDR_BROADCAST   (in_addr_t)0xFFFFFFFF

◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK   (in_addr_t)0x7F000001

◆ IN_CLASSA

#define IN_CLASSA (   a)    ((((long int) (a)) & 0x80000000) == 0)

◆ IN_CLASSA_NET

#define IN_CLASSA_NET   0xff000000

◆ IN_CLASSA_NSHIFT

#define IN_CLASSA_NSHIFT   24

◆ IN_CLASSA_HOST

#define IN_CLASSA_HOST   (0xffffffff & ~IN_CLASSA_NET)

◆ IN_CLASSA_MAX

#define IN_CLASSA_MAX   128

◆ IN_CLASSB

#define IN_CLASSB (   a)    ((((long int) (a)) & 0xc0000000) == 0x80000000)

◆ IN_CLASSB_NET

#define IN_CLASSB_NET   0xffff0000

◆ IN_CLASSB_NSHIFT

#define IN_CLASSB_NSHIFT   16

◆ IN_CLASSB_HOST

#define IN_CLASSB_HOST   (0xffffffff & ~IN_CLASSB_NET)

◆ IN_CLASSB_MAX

#define IN_CLASSB_MAX   65536

◆ IN_CLASSC

#define IN_CLASSC (   a)    ((((long int) (a)) & 0xe0000000) == 0xc0000000)

◆ IN_CLASSC_NET

#define IN_CLASSC_NET   0xffffff00

◆ IN_CLASSC_NSHIFT

#define IN_CLASSC_NSHIFT   8

◆ IN_CLASSC_HOST

#define IN_CLASSC_HOST   (0xffffffff & ~IN_CLASSC_NET)

◆ IN_CLASSD

#define IN_CLASSD (   a)    ((((long int) (a)) & 0xf0000000) == 0xe0000000)

◆ IN_MULTICAST

#define IN_MULTICAST (   a)    IN_CLASSD(a)

◆ IN_MULTICAST_NET

#define IN_MULTICAST_NET   0xe0000000

◆ IN6_IS_ADDR_MULTICAST

#define IN6_IS_ADDR_MULTICAST (   a)    (((const uint8_t *) (a))[0] == 0xff)

◆ IN6_IS_ADDR_MC_NODELOCAL

#define IN6_IS_ADDR_MC_NODELOCAL (   a)
Value:
&& ((((const uint8_t *) (a))[1] & 0xf) == 0x1))
#define IN6_IS_ADDR_MULTICAST(a)
Definition in.h:65
unsigned char uint8_t
Definition stdint.h:5

◆ IN6_IS_ADDR_MC_LINKLOCAL

#define IN6_IS_ADDR_MC_LINKLOCAL (   a)
Value:
&& ((((const uint8_t *) (a))[1] & 0xf) == 0x2))

◆ IN6_IS_ADDR_MC_SITELOCAL

#define IN6_IS_ADDR_MC_SITELOCAL (   a)
Value:
&& ((((const uint8_t *) (a))[1] & 0xf) == 0x5))

◆ IN6_IS_ADDR_MC_ORGLOCAL

#define IN6_IS_ADDR_MC_ORGLOCAL (   a)
Value:
&& ((((const uint8_t *) (a))[1] & 0xf) == 0x8))

◆ IN6_IS_ADDR_MC_GLOBAL

#define IN6_IS_ADDR_MC_GLOBAL (   a)
Value:
&& ((((const uint8_t *) (a))[1] & 0xf) == 0xe))

◆ IN6_IS_ADDR_UNSPECIFIED

#define IN6_IS_ADDR_UNSPECIFIED (   a)
Value:
(((const uint32_t *) (a))[0] == 0 \
&& ((const uint32_t *) (a))[1] == 0 \
&& ((const uint32_t *) (a))[2] == 0 \
&& ((const uint32_t *) (a))[3] == 0)
unsigned uint32_t
Definition stdint.h:9

◆ IN6_IS_ADDR_LOOPBACK

#define IN6_IS_ADDR_LOOPBACK (   a)
Value:
(((const uint32_t *) (a))[0] == 0 \
&& ((const uint32_t *) (a))[1] == 0 \
&& ((const uint32_t *) (a))[2] == 0 \
&& ((const uint32_t *) (a))[3] == htonl (1))
#define htonl
Definition inet.h:31

◆ IN6_IS_ADDR_LINKLOCAL

#define IN6_IS_ADDR_LINKLOCAL (   a)
Value:
((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
== htonl (0xfe800000))

◆ IN6_IS_ADDR_SITELOCAL

#define IN6_IS_ADDR_SITELOCAL (   a)
Value:
((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
== htonl (0xfec00000))

◆ IN6_IS_ADDR_V4MAPPED

#define IN6_IS_ADDR_V4MAPPED (   a)
Value:
((((const uint32_t *) (a))[0] == 0) \
&& (((const uint32_t *) (a))[1] == 0) \
&& (((const uint32_t *) (a))[2] == htonl (0xffff)))

◆ IN6_IS_ADDR_V4COMPAT

#define IN6_IS_ADDR_V4COMPAT (   a)
Value:
((((const uint32_t *) (a))[0] == 0) \
&& (((const uint32_t *) (a))[1] == 0) \
&& (((const uint32_t *) (a))[2] == 0) \
&& (ntohl (((const uint32_t *) (a))[3]) > 1))
#define ntohl
Definition inet.h:33

◆ IN6_ARE_ADDR_EQUAL

#define IN6_ARE_ADDR_EQUAL (   a,
 
)
Value:
((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \
&& (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \
&& (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \
&& (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))

◆ INET_ADDRSTRLEN

#define INET_ADDRSTRLEN   16

◆ SIN_ZERO_LEN

#define SIN_ZERO_LEN   8

◆ INET6_ADDRSTRLEN

#define INET6_ADDRSTRLEN   46

◆ IN6ADDR_ANY_INIT

#define IN6ADDR_ANY_INIT   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

◆ IN6ADDR_LOOPBACK_INIT

#define IN6ADDR_LOOPBACK_INIT   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }

Typedef Documentation

◆ in_port_t

◆ in_addr_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IPPROTO_IP 
IPPROTO_IP 
IPPROTO_ICMP 
IPPROTO_ICMP 
IPPROTO_IGMP 
IPPROTO_IGMP 
IPPROTO_TCP 
IPPROTO_TCP 
IPPROTO_UDP 
IPPROTO_UDP 
IPPROTO_IPV6 
IPPROTO_IPV6 
IPPROTO_RAW 
IPPROTO_RAW 

Variable Documentation

◆ in6addr_any

const struct in6_addr in6addr_any
extern

◆ in6addr_loopback

const struct in6_addr in6addr_loopback
extern