MFC: move RFC3542 related definitions into ip6.h.
sys/contrib/pf/net/pf_norm.c: 1.12 sys/netinet/ip6.h: 1.15 Approved by: re (scottl) Committed at: CBUG Meeting meets XCAST6 Festival
This commit is contained in:
parent
5960dca5d2
commit
af6b9d9bdc
@ -70,48 +70,6 @@
|
||||
|
||||
#include <net/pfvar.h>
|
||||
|
||||
#if defined(__FreeBSD__) && defined(INET6)
|
||||
/*
|
||||
* XXX: This should go to netinet/ip6.h (KAME)
|
||||
*/
|
||||
/* IPv6 options: common part */
|
||||
struct ip6_opt {
|
||||
u_int8_t ip6o_type;
|
||||
u_int8_t ip6o_len;
|
||||
} __packed;
|
||||
|
||||
/* Jumbo Payload Option */
|
||||
struct ip6_opt_jumbo {
|
||||
u_int8_t ip6oj_type;
|
||||
u_int8_t ip6oj_len;
|
||||
u_int8_t ip6oj_jumbo_len[4];
|
||||
} __packed;
|
||||
|
||||
/* NSAP Address Option */
|
||||
struct ip6_opt_nsap {
|
||||
u_int8_t ip6on_type;
|
||||
u_int8_t ip6on_len;
|
||||
u_int8_t ip6on_src_nsap_len;
|
||||
u_int8_t ip6on_dst_nsap_len;
|
||||
/* followed by source NSAP */
|
||||
/* followed by destination NSAP */
|
||||
} __packed;
|
||||
|
||||
/* Tunnel Limit Option */
|
||||
struct ip6_opt_tunnel {
|
||||
u_int8_t ip6ot_type;
|
||||
u_int8_t ip6ot_len;
|
||||
u_int8_t ip6ot_encap_limit;
|
||||
} __packed;
|
||||
|
||||
/* Router Alert Option */
|
||||
struct ip6_opt_router {
|
||||
u_int8_t ip6or_type;
|
||||
u_int8_t ip6or_len;
|
||||
u_int8_t ip6or_value[2];
|
||||
} __packed;
|
||||
#endif /* __FreeBSD__ && INET6 */
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
struct pf_frent {
|
||||
LIST_ENTRY(pf_frent) fr_next;
|
||||
|
@ -160,8 +160,56 @@ struct ip6_dest {
|
||||
|
||||
#define IP6OPT_MUTABLE 0x20
|
||||
|
||||
/* IPv6 options: common part */
|
||||
struct ip6_opt {
|
||||
u_int8_t ip6o_type;
|
||||
u_int8_t ip6o_len;
|
||||
} __packed;
|
||||
|
||||
/* Jumbo Payload Option */
|
||||
struct ip6_opt_jumbo {
|
||||
u_int8_t ip6oj_type;
|
||||
u_int8_t ip6oj_len;
|
||||
u_int8_t ip6oj_jumbo_len[4];
|
||||
} __packed;
|
||||
#define IP6OPT_JUMBO_LEN 6
|
||||
|
||||
/* NSAP Address Option */
|
||||
struct ip6_opt_nsap {
|
||||
u_int8_t ip6on_type;
|
||||
u_int8_t ip6on_len;
|
||||
u_int8_t ip6on_src_nsap_len;
|
||||
u_int8_t ip6on_dst_nsap_len;
|
||||
/* followed by source NSAP */
|
||||
/* followed by destination NSAP */
|
||||
} __packed;
|
||||
|
||||
/* Tunnel Limit Option */
|
||||
struct ip6_opt_tunnel {
|
||||
u_int8_t ip6ot_type;
|
||||
u_int8_t ip6ot_len;
|
||||
u_int8_t ip6ot_encap_limit;
|
||||
} __packed;
|
||||
|
||||
/* Router Alert Option */
|
||||
struct ip6_opt_router {
|
||||
u_int8_t ip6or_type;
|
||||
u_int8_t ip6or_len;
|
||||
u_int8_t ip6or_value[2];
|
||||
} __packed;
|
||||
/* Router alert values (in network byte order) */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define IP6_ALERT_MLD 0x0000
|
||||
#define IP6_ALERT_RSVP 0x0001
|
||||
#define IP6_ALERT_AN 0x0002
|
||||
#else
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define IP6_ALERT_MLD 0x0000
|
||||
#define IP6_ALERT_RSVP 0x0100
|
||||
#define IP6_ALERT_AN 0x0200
|
||||
#endif /* LITTLE_ENDIAN */
|
||||
#endif
|
||||
|
||||
/* Routing header */
|
||||
struct ip6_rthdr {
|
||||
u_int8_t ip6r_nxt; /* next header */
|
||||
|
Loading…
Reference in New Issue
Block a user