~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/ipv6.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _IPV6_H
  2 #define _IPV6_H
  3 
  4 #include <linux/in6.h>
  5 #include <asm/byteorder.h>
  6 
  7 /* The latest drafts declared increase in minimal mtu up to 1280. */
  8 
  9 #define IPV6_MIN_MTU    1280
 10 
 11 /*
 12  *      Advanced API
 13  *      source interface/address selection, source routing, etc...
 14  *      *under construction*
 15  */
 16 
 17 
 18 struct in6_pktinfo {
 19         struct in6_addr ipi6_addr;
 20         int             ipi6_ifindex;
 21 };
 22 
 23 
 24 struct in6_ifreq {
 25         struct in6_addr ifr6_addr;
 26         __u32           ifr6_prefixlen;
 27         int             ifr6_ifindex; 
 28 };
 29 
 30 #define IPV6_SRCRT_STRICT       0x01    /* this hop must be a neighbor  */
 31 #define IPV6_SRCRT_TYPE_0       0       /* IPv6 type 0 Routing Header   */
 32 
 33 /*
 34  *      routing header
 35  */
 36 struct ipv6_rt_hdr {
 37         __u8            nexthdr;
 38         __u8            hdrlen;
 39         __u8            type;
 40         __u8            segments_left;
 41 
 42         /*
 43          *      type specific data
 44          *      variable length field
 45          */
 46 };
 47 
 48 
 49 struct ipv6_opt_hdr {
 50         __u8            nexthdr;
 51         __u8            hdrlen;
 52         /* 
 53          * TLV encoded option data follows.
 54          */
 55 };
 56 
 57 #define ipv6_destopt_hdr ipv6_opt_hdr
 58 #define ipv6_hopopt_hdr  ipv6_opt_hdr
 59 
 60 #ifdef __KERNEL__
 61 #define ipv6_optlen(p)  (((p)->hdrlen+1) << 3)
 62 #endif
 63 
 64 /*
 65  *      routing header type 0 (used in cmsghdr struct)
 66  */
 67 
 68 struct rt0_hdr {
 69         struct ipv6_rt_hdr      rt_hdr;
 70         __u32                   bitmap;         /* strict/loose bit map */
 71         struct in6_addr         addr[0];
 72 
 73 #define rt0_type                rt_hdr.type;
 74 };
 75 
 76 /*
 77  *      IPv6 fixed header
 78  *
 79  *      BEWARE, it is incorrect. The first 4 bits of flow_lbl
 80  *      are glued to priority now, forming "class".
 81  */
 82 
 83 struct ipv6hdr {
 84 #if defined(__LITTLE_ENDIAN_BITFIELD)
 85         __u8                    priority:4,
 86                                 version:4;
 87 #elif defined(__BIG_ENDIAN_BITFIELD)
 88         __u8                    version:4,
 89                                 priority:4;
 90 #else
 91 #error  "Please fix <asm/byteorder.h>"
 92 #endif
 93         __u8                    flow_lbl[3];
 94 
 95         __u16                   payload_len;
 96         __u8                    nexthdr;
 97         __u8                    hop_limit;
 98 
 99         struct  in6_addr        saddr;
100         struct  in6_addr        daddr;
101 };
102 
103 #ifdef __KERNEL__
104 
105 /* 
106    This structure contains results of exthdrs parsing
107    as offsets from skb->nh.
108  */
109 
110 struct inet6_skb_parm
111 {
112         int                     iif;
113         __u16                   ra;
114         __u16                   hop;
115         __u16                   auth;
116         __u16                   dst0;
117         __u16                   srcrt;
118         __u16                   dst1;
119 };
120 
121 #endif
122 
123 #endif
124 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.