patch-2.4.0-test6 linux/include/net/ipip.h
Next file: linux/include/scsi/sg.h
Previous file: linux/include/linux/wrapper.h
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Fri Aug 4 18:18:49 2000
- Orig file:
v2.4.0-test5/linux/include/net/ipip.h
- Orig date:
Wed Aug 18 11:38:47 1999
diff -u --recursive --new-file v2.4.0-test5/linux/include/net/ipip.h linux/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 */
@@ -24,6 +24,25 @@
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);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)