This source file includes following definitions.
- seg6_lwt_headroom
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 #ifndef _UAPI_LINUX_SEG6_IPTUNNEL_H
  16 #define _UAPI_LINUX_SEG6_IPTUNNEL_H
  17 
  18 #include <linux/seg6.h>         
  19 
  20 enum {
  21         SEG6_IPTUNNEL_UNSPEC,
  22         SEG6_IPTUNNEL_SRH,
  23         __SEG6_IPTUNNEL_MAX,
  24 };
  25 #define SEG6_IPTUNNEL_MAX (__SEG6_IPTUNNEL_MAX - 1)
  26 
  27 struct seg6_iptunnel_encap {
  28         int mode;
  29         struct ipv6_sr_hdr srh[0];
  30 };
  31 
  32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
  33 
  34 enum {
  35         SEG6_IPTUN_MODE_INLINE,
  36         SEG6_IPTUN_MODE_ENCAP,
  37         SEG6_IPTUN_MODE_L2ENCAP,
  38 };
  39 
  40 #ifdef __KERNEL__
  41 
  42 static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo)
  43 {
  44         int head = 0;
  45 
  46         switch (tuninfo->mode) {
  47         case SEG6_IPTUN_MODE_INLINE:
  48                 break;
  49         case SEG6_IPTUN_MODE_ENCAP:
  50                 head = sizeof(struct ipv6hdr);
  51                 break;
  52         case SEG6_IPTUN_MODE_L2ENCAP:
  53                 return 0;
  54         }
  55 
  56         return ((tuninfo->srh->hdrlen + 1) << 3) + head;
  57 }
  58 
  59 #endif
  60 
  61 #endif