Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

ip6.h File Reference

Go to the source code of this file.

Defines

#define IP6_ADDR_LEN   16
#define IP6_ADDR_BITS   128
#define IP6_HDR_LEN   40
#define IP6_LEN_MIN   IP6_HDR_LEN
#define IP6_LEN_MAX   65535
#define IP6_MTU_MIN   1280
#define __attribute__(x)
#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
#define ip6_flow   ip6_ctlun.ip6_un1.ip6_un1_flow
#define ip6_plen   ip6_ctlun.ip6_un1.ip6_un1_plen
#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
#define ip6_hlim   ip6_ctlun.ip6_un1.ip6_un1_hlim
#define IP6_VERSION   0x60
#define IP6_VERSION_MASK   0xf0
#define IP6_FLOWINFO_MASK   0x0fffffff
#define IP6_FLOWLABEL_MASK   0x000fffff
#define IP6_HLIM_DEFAULT   64
#define IP6_HLIM_MAX   255
#define IP6_OFF_MASK   0xfff8
#define IP6_RESERVED_MASK   0x0006
#define IP6_MORE_FRAG   0x0001
#define IP6_OPT_PAD1   0x00
#define IP6_OPT_PADN   0x01
#define IP6_OPT_JUMBO   0xC2
#define IP6_OPT_JUMBO_LEN   6
#define IP6_OPT_RTALERT   0x05
#define IP6_OPT_RTALERT_LEN   4
#define IP6_OPT_RTALERT_MLD   0
#define IP6_OPT_RTALERT_RSVP   1
#define IP6_OPT_RTALERT_ACTNET   2
#define IP6_OPT_LEN_MIN   2
#define IP6_OPT_TYPE(o)   ((o) & 0xC0)
#define IP6_OPT_TYPE_SKIP   0x00
#define IP6_OPT_TYPE_DISCARD   0x40
#define IP6_OPT_TYPE_FORCEICMP   0x80
#define IP6_OPT_TYPE_ICMP   0xC0
#define IP6_OPT_MUTABLE   0x20
#define IP6_ADDR_UNSPEC   "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
#define IP6_ADDR_LOOPBACK   "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
#define ip6_pack_hdr(hdr, fc, fl, plen, nxt, hlim, src, dst)
#define ip6_aton   ip6_pton

Typedefs

typedef ip6_addr ip6_addr_t

Functions

__BEGIN_DECLS char * ip6_ntop (const ip6_addr_t *ip6, char *dst, size_t size)
int ip6_pton (const char *src, ip6_addr_t *dst)
char * ip6_ntoa (const ip6_addr_t *ip6)
void ip6_checksum (void *buf, size_t len)

Variables

ip6_hdr __packed__


Define Documentation

#define __attribute__  ) 
 

Definition at line 28 of file ip6.h.

#define IP6_ADDR_BITS   128
 

Definition at line 15 of file ip6.h.

Referenced by addr_btos(), addr_net(), addr_ntop(), addr_pton(), addr_ston(), ip6_ntoa(), route_loop(), and START_TEST().

#define IP6_ADDR_LEN   16
 

Definition at line 14 of file ip6.h.

Referenced by addr_btos(), addr_net(), addr_ntos(), addr_stob(), addr_ston(), ip6_ntoa(), ip6_ntop(), route_get(), and START_TEST().

#define IP6_ADDR_LOOPBACK   "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
 

Definition at line 160 of file ip6.h.

Referenced by START_TEST().

#define IP6_ADDR_UNSPEC   "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
 

Definition at line 158 of file ip6.h.

Referenced by START_TEST().

#define ip6_aton   ip6_pton
 

Definition at line 178 of file ip6.h.

Referenced by __pyx_f_4dnet_ip6_aton().

#define ip6_flow   ip6_ctlun.ip6_un1.ip6_un1_flow
 

Definition at line 50 of file ip6.h.

#define IP6_FLOWINFO_MASK   0x0fffffff
 

Definition at line 59 of file ip6.h.

#define IP6_FLOWLABEL_MASK   0x000fffff
 

Definition at line 60 of file ip6.h.

#define IP6_HDR_LEN   40
 

Definition at line 17 of file ip6.h.

Referenced by ip6_checksum().

#define ip6_hlim   ip6_ctlun.ip6_un1.ip6_un1_hlim
 

Definition at line 53 of file ip6.h.

#define IP6_HLIM_DEFAULT   64
 

Definition at line 69 of file ip6.h.

#define IP6_HLIM_MAX   255
 

Definition at line 70 of file ip6.h.

#define IP6_LEN_MAX   65535
 

Definition at line 19 of file ip6.h.

#define IP6_LEN_MIN   IP6_HDR_LEN
 

Definition at line 18 of file ip6.h.

#define IP6_MORE_FRAG   0x0001
 

Definition at line 110 of file ip6.h.

#define IP6_MTU_MIN   1280
 

Definition at line 21 of file ip6.h.

#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
 

Definition at line 52 of file ip6.h.

#define IP6_OFF_MASK   0xfff8
 

Definition at line 108 of file ip6.h.

#define IP6_OPT_JUMBO   0xC2
 

Definition at line 122 of file ip6.h.

#define IP6_OPT_JUMBO_LEN   6
 

Definition at line 123 of file ip6.h.

#define IP6_OPT_LEN_MIN   2
 

Definition at line 129 of file ip6.h.

#define IP6_OPT_MUTABLE   0x20
 

Definition at line 137 of file ip6.h.

#define IP6_OPT_PAD1   0x00
 

Definition at line 120 of file ip6.h.

#define IP6_OPT_PADN   0x01
 

Definition at line 121 of file ip6.h.

#define IP6_OPT_RTALERT   0x05
 

Definition at line 124 of file ip6.h.

#define IP6_OPT_RTALERT_ACTNET   2
 

Definition at line 128 of file ip6.h.

#define IP6_OPT_RTALERT_LEN   4
 

Definition at line 125 of file ip6.h.

#define IP6_OPT_RTALERT_MLD   0
 

Definition at line 126 of file ip6.h.

#define IP6_OPT_RTALERT_RSVP   1
 

Definition at line 127 of file ip6.h.

#define IP6_OPT_TYPE  )     ((o) & 0xC0)
 

Definition at line 131 of file ip6.h.

#define IP6_OPT_TYPE_DISCARD   0x40
 

Definition at line 133 of file ip6.h.

#define IP6_OPT_TYPE_FORCEICMP   0x80
 

Definition at line 134 of file ip6.h.

#define IP6_OPT_TYPE_ICMP   0xC0
 

Definition at line 135 of file ip6.h.

#define IP6_OPT_TYPE_SKIP   0x00
 

Definition at line 132 of file ip6.h.

#define ip6_pack_hdr hdr,
fc,
fl,
plen,
nxt,
hlim,
src,
dst   ) 
 

Value:

do {    \
        struct ip6_hdr *ip6 = (struct ip6_hdr *)(hdr);                  \
        ip6->ip6_flow = htonl(((uint32_t)(fc) << 28) &                  \
            (IP6_FLOWLABEL_MASK | (fl)));                               \
        ip6->ip6_vfc = (IP6_VERSION | ((fc) >> 4));                     \
        ip6->ip6_plen = htons((plen));                                  \
        ip6->ip6_nxt = (nxt); ip6->ip6_hlim = (hlim);                   \
        memmove(&ip6->ip6_src, &(src), IP6_ADDR_LEN);                   \
        memmove(&ip6->ip6_dst, &(dst), IP6_ADDR_LEN);                   \
} while (0);

Definition at line 163 of file ip6.h.

Referenced by __pyx_f_4dnet_ip6_pack_hdr().

#define ip6_plen   ip6_ctlun.ip6_un1.ip6_un1_plen
 

Definition at line 51 of file ip6.h.

#define IP6_RESERVED_MASK   0x0006
 

Definition at line 109 of file ip6.h.

#define IP6_VERSION   0x60
 

Definition at line 55 of file ip6.h.

#define IP6_VERSION_MASK   0xf0
 

Definition at line 56 of file ip6.h.

#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
 

Definition at line 49 of file ip6.h.


Typedef Documentation

typedef struct ip6_addr ip6_addr_t
 


Function Documentation

void ip6_checksum void *  buf,
size_t  len
 

Definition at line 18 of file ip6.c.

References ip6_ext_hdr::ext_len, ip6_ext_hdr::ext_nxt, icmp_hdr::icmp_cksum, ICMP_HDR_LEN, IP6_HDR_LEN, IP6_IS_EXT, ip6_hdr::ip6_src, ip_cksum_add(), ip_cksum_carry, IP_PROTO_ICMP, IP_PROTO_ICMPV6, IP_PROTO_IGMP, IP_PROTO_TCP, IP_PROTO_UDP, TCP_HDR_LEN, tcp_hdr::th_sum, UDP_HDR_LEN, and udp_hdr::uh_sum.

Referenced by __pyx_f_4dnet_ip6_checksum().

char* ip6_ntoa const ip6_addr_t ip6  ) 
 

Definition at line 229 of file addr-util.c.

References addr_ntoa(), addr_pack, ADDR_TYPE_IP6, IP6_ADDR_BITS, and IP6_ADDR_LEN.

Referenced by __pyx_f_4dnet_ip6_ntoa().

__BEGIN_DECLS char* ip6_ntop const ip6_addr_t ip6,
char *  dst,
size_t  size
 

Definition at line 171 of file addr-util.c.

References ip6_addr::data, IP6_ADDR_LEN, ip_ntop(), and NULL.

Referenced by addr_ntop().

int ip6_pton const char *  src,
ip6_addr_t dst
 

Definition at line 238 of file addr-util.c.

References ip6_addr::data, ip_pton(), and strtol().

Referenced by addr_pton().


Variable Documentation

struct ip6_ext_hdr __packed__
 


Generated on Sun May 14 14:51:21 2006 by  doxygen 1.4.2