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

Linux Cross Reference
Linux/include/net/ipip.h

Version: ~ [ 2.2.5 ] ~ [ 2.4.1 ] ~ [ 2.4.9 ] ~ [ 2.6.17.10 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __NET_IPIP_H
  2 #define __NET_IPIP_H 1
  3 
  4 #include <linux/if_tunnel.h>
  5 
  6 /* Keep error state on tunnel for 30 sec */
  7 #define IPTUNNEL_ERR_TIMEO      (30*HZ)
  8 
  9 struct ip_tunnel
 10 {
 11         struct ip_tunnel        *next;
 12         struct net_device       *dev;
 13         struct net_device_stats stat;
 14 
 15         int                     recursion;      /* Depth of hard_start_xmit recursion */
 16         int                     err_count;      /* Number of arrived ICMP errors */
 17         unsigned long           err_time;       /* Time when the last ICMP error arrived */
 18 
 19         /* These four fields used only by GRE */
 20         __u32                   i_seqno;        /* The last seen seqno  */
 21         __u32                   o_seqno;        /* The last output seqno */
 22         int                     hlen;           /* Precalculated GRE header length */
 23         int                     mlink;
 24 
 25         struct ip_tunnel_parm   parms;
 26 };
 27 
 28 #define IPTUNNEL_XMIT() do {                                            \
 29         int err;                                                        \
 30         int pkt_len = skb->len;                                         \
 31                                                                         \
 32         iph->tot_len = htons(skb->len);                                 \
 33         ip_select_ident(iph, &rt->u.dst);                               \
 34         ip_send_check(iph);                                             \
 35                                                                         \
 36         err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, do_ip_send); \
 37         if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) {            \
 38                 stats->tx_bytes += pkt_len;                             \
 39                 stats->tx_packets++;                                    \
 40         } else {                                                        \
 41                 stats->tx_errors++;                                     \
 42                 stats->tx_aborted_errors++;                             \
 43         }                                                               \
 44 } while (0)
 45 
 46 
 47 extern int      ipip_init(void);
 48 extern int      ipgre_init(void);
 49 extern int      sit_init(void);
 50 extern void     sit_cleanup(void);
 51 
 52 #endif
 53 

~ [ 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.