#ifndef _ULOGD_GRE_H_ #define _ULOGD_GRE_H_ #define GRE_FLAG_CKSUM htons(0x8000) /* Checksum Present */ #define GRE_FLAG_ROUTE htons(0x4000) /* Routing Present */ #define GRE_FLAG_KEY htons(0x2000) /* Key Present */ #define GRE_FLAG_SEQ htons(0x1000) /* Sequence Present */ #define GRE_FLAG_SSR htons(0x0800) /* Strict Source Route */ #define GRE_FLAG_RECUR htons(0x0700) /* Recursion Control */ #define GRE_FLAG_ACK htons(0x0080) /* Acknowledgement Present (PPTP only) */ #define GRE_FLAG_FLAGS htons(0x0078) /* Additional Flags */ #define GRE_FLAG_VER htons(0x0007) /* Version Number */ #define GRE_VER_GRE htons(0x0000) /* GRE version 0 (RFC1701 GRE) */ #define GRE_VER_PPTP htons(0x0001) /* Enhanced GRE (RFC2637 PPTP) */ struct grehdr { u_int16_t flags_ver; /* See above */ u_int16_t protocol; /* Ethernet protocol type */ u_int16_t cksum; /* present if (flags_ver & GRE_FLAG_CKSUM) */ u_int16_t reserved1; /* present if (flags_ver & GRE_FLAG_CKSUM) */ u_int32_t key; /* present if (flags_ver & GRE_FLAG_KEY) */ u_int32_t seq; /* present if (flags_ver & GRE_FLAG_SEQ) */ }; struct pptphdr { u_int16_t flags_ver; /* See above */ u_int16_t protocol; /* Ethernet protocol type */ u_int16_t payload_len; /* following payload length (not including this header) */ u_int16_t call_id; /* peer call ID */ u_int32_t seq; /* present if (flags_ver & GRE_FLAG_SEQ) */ u_int32_t ack; /* present if (flags_ver & GRE_FLAG_ACK) */ }; #endif /* _ULOGD_GRE_H_ */