X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/335771982db3974e0aac09dfb36fa7b391ffa622..fb8b947488c7f22b518de1df1a91e663dc7ab33c:/icmp6.h diff --git a/icmp6.h b/icmp6.h index 87bf7d99..4110bea6 100644 --- a/icmp6.h +++ b/icmp6.h @@ -1,3 +1,4 @@ +/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.15 2004-06-16 00:06:28 guy Exp $ (LBL) */ /* $NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp $ */ /* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */ @@ -116,12 +117,20 @@ struct icmp6_hdr { #define ICMP6_FQDN_REPLY 140 /* FQDN reply */ #define ICMP6_NI_QUERY 139 /* node information request */ #define ICMP6_NI_REPLY 140 /* node information reply */ +#define IND_SOLICIT 141 /* inverse neighbor solicitation */ +#define IND_ADVERT 142 /* inverse neighbor advertisement */ -/* The definitions below are experimental. TBA */ -#define MLD6_MTRACE_RESP 141 /* mtrace response(to sender) */ -#define MLD6_MTRACE 142 /* mtrace messages */ +#define ICMP6_V2_MEMBERSHIP_REPORT 143 /* v2 membership report */ +#define MLDV2_LISTENER_REPORT 143 /* v2 multicast listener report */ +#define ICMP6_HADISCOV_REQUEST 144 +#define ICMP6_HADISCOV_REPLY 145 +#define ICMP6_MOBILEPREFIX_SOLICIT 146 +#define ICMP6_MOBILEPREFIX_ADVERT 147 -#define ICMP6_MAXTYPE 142 +#define MLD6_MTRACE_RESP 200 /* mtrace response(to sender) */ +#define MLD6_MTRACE 201 /* mtrace messages */ + +#define ICMP6_MAXTYPE 201 #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ #define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */ @@ -169,6 +178,9 @@ struct mld6_hdr { #define mld6_maxdelay mld6_hdr.icmp6_data16[0] #define mld6_reserved mld6_hdr.icmp6_data16[1] +#define MLD_MINLEN 24 +#define MLDV2_MINLEN 28 + /* * Neighbor Discovery */ @@ -197,6 +209,19 @@ struct nd_router_advert { /* router advertisement */ #define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] #define ND_RA_FLAG_MANAGED 0x80 #define ND_RA_FLAG_OTHER 0x40 +#define ND_RA_FLAG_HOME_AGENT 0x20 + +/* + * Router preference values based on draft-draves-ipngwg-router-selection-01. + * These are non-standard definitions. + */ +#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ + +#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */ +#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */ +#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ +#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ + #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit { /* neighbor solicitation */ @@ -248,6 +273,10 @@ struct nd_opt_hdr { /* Neighbor discovery option header */ #define ND_OPT_PREFIX_INFORMATION 3 #define ND_OPT_REDIRECTED_HEADER 4 #define ND_OPT_MTU 5 +#define ND_OPT_ADVINTERVAL 7 +#define ND_OPT_HOMEAGENT_INFO 8 +#define ND_OPT_ROUTE_INFO 9 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */ + struct nd_opt_prefix_info { /* prefix information */ u_int8_t nd_opt_pi_type; @@ -262,6 +291,7 @@ struct nd_opt_prefix_info { /* prefix information */ #define ND_OPT_PI_FLAG_ONLINK 0x80 #define ND_OPT_PI_FLAG_AUTO 0x40 +#define ND_OPT_PI_FLAG_ROUTER 0x20 /*2292bis*/ struct nd_opt_rd_hdr { /* redirected header */ u_int8_t nd_opt_rh_type; @@ -278,6 +308,30 @@ struct nd_opt_mtu { /* MTU option */ u_int32_t nd_opt_mtu_mtu; }; +struct nd_opt_advinterval { /* Advertisement interval option */ + u_int8_t nd_opt_adv_type; + u_int8_t nd_opt_adv_len; + u_int16_t nd_opt_adv_reserved; + u_int32_t nd_opt_adv_interval; +}; + +struct nd_opt_homeagent_info { /* Home Agent info */ + u_int8_t nd_opt_hai_type; + u_int8_t nd_opt_hai_len; + u_int16_t nd_opt_hai_reserved; + int16_t nd_opt_hai_preference; + u_int16_t nd_opt_hai_lifetime; +}; + +struct nd_opt_route_info { /* route info */ + u_int8_t nd_opt_rti_type; + u_int8_t nd_opt_rti_len; + u_int8_t nd_opt_rti_prefixlen; + u_int8_t nd_opt_rti_flags; + u_int32_t nd_opt_rti_lifetime; + /* prefix follows */ +}; + /* * icmp6 namelookup */ @@ -346,7 +400,7 @@ struct icmp6_router_renum { /* router renumbering header */ }; #define ICMP6_RR_FLAGS_TEST 0x80 #define ICMP6_RR_FLAGS_REQRESULT 0x40 -#define ICMP6_RR_FLAGS_ALLIF 0x20 +#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 #define ICMP6_RR_FLAGS_SPECSITE 0x10 #define ICMP6_RR_FLAGS_PREVDONE 0x08