From 5514f4babeeb3af00ee0c325e3cda7a562cc3d65 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 8 Aug 2000 18:54:49 +0000 Subject: Merge with Linux 2.4.0-test6-pre4. --- include/net/ipip.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/net/ipip.h') diff --git a/include/net/ipip.h b/include/net/ipip.h index b522397f8..398660ca8 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h @@ -9,7 +9,7 @@ struct ip_tunnel { struct ip_tunnel *next; - struct net_device *dev; + struct net_device *dev; struct net_device_stats stat; int recursion; /* Depth of hard_start_xmit recursion */ @@ -25,6 +25,25 @@ struct ip_tunnel struct ip_tunnel_parm parms; }; +#define IPTUNNEL_XMIT() do { \ + int err; \ + int pkt_len = skb->len; \ + \ + iph->tot_len = htons(skb->len); \ + ip_select_ident(iph, &rt->u.dst); \ + ip_send_check(iph); \ + \ + err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, do_ip_send); \ + if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) { \ + stats->tx_bytes += pkt_len; \ + stats->tx_packets++; \ + } else { \ + stats->tx_errors++; \ + stats->tx_aborted_errors++; \ + } \ +} while (0) + + extern int ipip_init(void); extern int ipgre_init(void); extern int sit_init(void); -- cgit v1.2.3