summaryrefslogtreecommitdiff
path: root/sys/net/if_gre.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_gre.h')
-rw-r--r--sys/net/if_gre.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/sys/net/if_gre.h b/sys/net/if_gre.h
index 4b4e0c89678..58b2fe51bb1 100644
--- a/sys/net/if_gre.h
+++ b/sys/net/if_gre.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.h,v 1.12 2009/11/21 14:08:14 claudio Exp $ */
+/* $OpenBSD: if_gre.h,v 1.13 2010/06/26 19:49:54 claudio Exp $ */
/* $NetBSD: if_gre.h,v 1.5 1999/11/19 20:41:19 thorpej Exp $ */
/*
@@ -34,16 +34,27 @@
#define _NET_IF_GRE_H
struct gre_softc {
- struct ifnet sc_if;
- LIST_ENTRY(gre_softc) sc_list;
- struct in_addr g_src; /* source address of gre packets */
- struct in_addr g_dst; /* destination address of gre packets */
- struct route route; /* routing entry that determines, where a
- encapsulated packet should go */
- int gre_unit;
- int gre_flags;
+ struct ifnet sc_if;
+ LIST_ENTRY(gre_softc) sc_list;
+ struct timeout sc_ka_hold;
+ struct timeout sc_ka_snd;
+ struct in_addr g_src; /* source address of gre packets */
+ struct in_addr g_dst; /* destination address of gre packets */
+ struct route route; /* routing entry that determines, where
+ an encapsulated packet should go */
u_int g_rtableid; /* routing table used for the tunnel */
- u_char g_proto; /* protocol of encapsulator */
+ int gre_unit;
+ int gre_flags;
+ int sc_ka_timout;
+ int sc_ka_holdmax;
+ int sc_ka_holdcnt;
+ int sc_ka_cnt;
+ u_char g_proto; /* protocol of encapsulator */
+ u_char sc_ka_state;
+#define GRE_STATE_UKNWN 0
+#define GRE_STATE_DOWN 1
+#define GRE_STATE_HOLD 2
+#define GRE_STATE_UP 3
};
@@ -143,5 +154,6 @@ int gre_ioctl(struct ifnet *, u_long, caddr_t);
int gre_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);
u_int16_t gre_in_cksum(u_int16_t *, u_int);
+void gre_recv_keepalive(struct gre_softc *);
#endif /* _KERNEL */
#endif /* _NET_IF_GRE_H_ */