if_gre.h (178888) | if_gre.h (179894) |
---|---|
1/* $NetBSD: if_gre.h,v 1.13 2003/11/10 08:51:52 wiz Exp $ */ | 1/* $NetBSD: if_gre.h,v 1.13 2003/11/10 08:51:52 wiz Exp $ */ |
2/* $FreeBSD: head/sys/net/if_gre.h 178888 2008-05-09 23:03:00Z julian $ */ | 2/* $FreeBSD: head/sys/net/if_gre.h 179894 2008-06-20 17:26:34Z thompsa $ */ |
3 4/*- 5 * Copyright (c) 1998 The NetBSD Foundation, Inc. 6 * All rights reserved 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by Heiko W.Rupp <hwr@pilhuhn.de> 10 * --- 54 unchanged lines hidden (view full) --- 65 struct route route; /* routing entry that determines, where a 66 encapsulated packet should go */ 67 u_char g_proto; /* protocol of encapsulator */ 68 69 const struct encaptab *encap; /* encapsulation cookie */ 70 71 int called; /* infinite recursion preventer */ 72 | 3 4/*- 5 * Copyright (c) 1998 The NetBSD Foundation, Inc. 6 * All rights reserved 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by Heiko W.Rupp <hwr@pilhuhn.de> 10 * --- 54 unchanged lines hidden (view full) --- 65 struct route route; /* routing entry that determines, where a 66 encapsulated packet should go */ 67 u_char g_proto; /* protocol of encapsulator */ 68 69 const struct encaptab *encap; /* encapsulation cookie */ 70 71 int called; /* infinite recursion preventer */ 72 |
73 uint32_t key; /* key included in outgoing GRE packets */ 74 /* zero means none */ 75 |
|
73 wccp_ver_t wccp_ver; /* version of the WCCP */ 74}; 75#define GRE2IFP(sc) ((sc)->sc_ifp) 76 77 78struct gre_h { 79 u_int16_t flags; /* GRE flags */ 80 u_int16_t ptype; /* protocol type of payload typically 81 Ether protocol type*/ | 76 wccp_ver_t wccp_ver; /* version of the WCCP */ 77}; 78#define GRE2IFP(sc) ((sc)->sc_ifp) 79 80 81struct gre_h { 82 u_int16_t flags; /* GRE flags */ 83 u_int16_t ptype; /* protocol type of payload typically 84 Ether protocol type*/ |
85 uint32_t options[0]; /* optional options */ |
|
82/* 83 * from here on: fields are optional, presence indicated by flags 84 * 85 u_int_16 checksum checksum (one-complements of GRE header 86 and payload 87 Present if (ck_pres | rt_pres == 1). 88 Valid if (ck_pres == 1). 89 u_int_16 offset offset from start of routing filed to --- 16 unchanged lines hidden (view full) --- 106} __packed; 107 108#define gi_pr gi_i.ip_p 109#define gi_len gi_i.ip_len 110#define gi_src gi_i.ip_src 111#define gi_dst gi_i.ip_dst 112#define gi_ptype gi_g.ptype 113#define gi_flags gi_g.flags | 86/* 87 * from here on: fields are optional, presence indicated by flags 88 * 89 u_int_16 checksum checksum (one-complements of GRE header 90 and payload 91 Present if (ck_pres | rt_pres == 1). 92 Valid if (ck_pres == 1). 93 u_int_16 offset offset from start of routing filed to --- 16 unchanged lines hidden (view full) --- 110} __packed; 111 112#define gi_pr gi_i.ip_p 113#define gi_len gi_i.ip_len 114#define gi_src gi_i.ip_src 115#define gi_dst gi_i.ip_dst 116#define gi_ptype gi_g.ptype 117#define gi_flags gi_g.flags |
118#define gi_options gi_g.options |
|
114 115#define GRE_CP 0x8000 /* Checksum Present */ 116#define GRE_RP 0x4000 /* Routing Present */ 117#define GRE_KP 0x2000 /* Key Present */ 118#define GRE_SP 0x1000 /* Sequence Present */ 119#define GRE_SS 0x0800 /* Strict Source Route */ 120 121/* --- 48 unchanged lines hidden (view full) --- 170 */ 171 172#define GRESADDRS _IOW('i', 101, struct ifreq) 173#define GRESADDRD _IOW('i', 102, struct ifreq) 174#define GREGADDRS _IOWR('i', 103, struct ifreq) 175#define GREGADDRD _IOWR('i', 104, struct ifreq) 176#define GRESPROTO _IOW('i' , 105, struct ifreq) 177#define GREGPROTO _IOWR('i', 106, struct ifreq) | 119 120#define GRE_CP 0x8000 /* Checksum Present */ 121#define GRE_RP 0x4000 /* Routing Present */ 122#define GRE_KP 0x2000 /* Key Present */ 123#define GRE_SP 0x1000 /* Sequence Present */ 124#define GRE_SS 0x0800 /* Strict Source Route */ 125 126/* --- 48 unchanged lines hidden (view full) --- 175 */ 176 177#define GRESADDRS _IOW('i', 101, struct ifreq) 178#define GRESADDRD _IOW('i', 102, struct ifreq) 179#define GREGADDRS _IOWR('i', 103, struct ifreq) 180#define GREGADDRD _IOWR('i', 104, struct ifreq) 181#define GRESPROTO _IOW('i' , 105, struct ifreq) 182#define GREGPROTO _IOWR('i', 106, struct ifreq) |
183#define GREGKEY _IOWR('i', 107, struct ifreq) 184#define GRESKEY _IOW('i', 108, struct ifreq) |
|
178 179#ifdef _KERNEL 180LIST_HEAD(gre_softc_head, gre_softc); 181extern struct mtx gre_mtx; 182extern struct gre_softc_head gre_softc_list; 183 184u_int16_t gre_in_cksum(u_int16_t *, u_int); 185#endif /* _KERNEL */ 186 187#endif | 185 186#ifdef _KERNEL 187LIST_HEAD(gre_softc_head, gre_softc); 188extern struct mtx gre_mtx; 189extern struct gre_softc_head gre_softc_list; 190 191u_int16_t gre_in_cksum(u_int16_t *, u_int); 192#endif /* _KERNEL */ 193 194#endif |