X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/96afbce6fc40e89e4f215db5838ae00979185e11..refs/pull/1034/head:/ospf.h?ds=inline diff --git a/ospf.h b/ospf.h index ae7d2f94..97e2384f 100644 --- a/ospf.h +++ b/ospf.h @@ -34,11 +34,10 @@ * */ -#define OSPF_OPTION_T 0x01 /* T bit: TOS support */ -#define OSPF_OPTION_E 0x02 /* E bit: External routes advertised */ +#define OSPF_OPTION_MT 0x01 /* MT bit: multi-topology */ +#define OSPF_OPTION_E 0x02 /* E bit: External routes advertised */ #define OSPF_OPTION_MC 0x04 /* MC bit: Multicast capable */ #define OSPF_OPTION_NP 0x08 /* N/P bit: NSSA capable */ -#define OSPF_OPTION_EA 0x10 /* EA bit: External Attribute capable */ #define OSPF_OPTION_L 0x10 /* L bit: Packet contains LLS data block */ #define OSPF_OPTION_DC 0x20 /* DC bit: Demand circuit capable */ #define OSPF_OPTION_O 0x40 /* O bit: Opaque LSA capable */ @@ -116,8 +115,10 @@ /* rla_flags */ #define RLA_FLAG_B 0x01 #define RLA_FLAG_E 0x02 -#define RLA_FLAG_W1 0x04 -#define RLA_FLAG_W2 0x08 +#define RLA_FLAG_V 0x04 +#define RLA_FLAG_W 0x08 +#define RLA_FLAG_NT 0x10 /* RFC3101 Appendix B */ +#define RLA_FLAG_H 0x80 /* sla_tosmetric breakdown */ #define SLA_MASK_TOS 0x7f000000 @@ -167,13 +168,13 @@ struct lsa_hdr { nd_uint8_t ls_options; nd_uint8_t ls_type; union { - struct in_addr lsa_id; + nd_ipv4 lsa_id; struct { /* opaque LSAs change the LSA-ID field */ nd_uint8_t opaque_type; nd_uint24_t opaque_id; } opaque_field; } un_lsa_id; - struct in_addr ls_router; + nd_ipv4 ls_router; nd_uint32_t ls_seq; nd_uint16_t ls_chksum; nd_uint16_t ls_length; @@ -191,38 +192,38 @@ struct lsa { nd_byte rla_zero; nd_uint16_t rla_count; struct rlalink { - struct in_addr link_id; - struct in_addr link_data; + nd_ipv4 link_id; + nd_ipv4 link_data; union un_tos un_tos; } rla_link[1]; /* may repeat */ } un_rla; /* Network links advertisements */ struct { - struct in_addr nla_mask; - struct in_addr nla_router[1]; /* may repeat */ + nd_ipv4 nla_mask; + nd_ipv4 nla_router[1]; /* may repeat */ } un_nla; /* Summary links advertisements */ struct { - struct in_addr sla_mask; + nd_ipv4 sla_mask; nd_uint32_t sla_tosmetric[1]; /* may repeat */ } un_sla; /* AS external links advertisements */ struct { - struct in_addr asla_mask; + nd_ipv4 asla_mask; struct aslametric { nd_uint32_t asla_tosmetric; - struct in_addr asla_forward; - struct in_addr asla_tag; + nd_ipv4 asla_forward; + nd_ipv4 asla_tag; } asla_metric[1]; /* may repeat */ } un_asla; /* Multicast group membership */ struct mcla { nd_uint32_t mcla_vtype; - struct in_addr mcla_vid; + nd_ipv4 mcla_vid; } un_mcla[1]; /* Opaque TE LSA */ @@ -263,8 +264,8 @@ struct ospfhdr { nd_uint8_t ospf_version; nd_uint8_t ospf_type; nd_uint16_t ospf_len; - struct in_addr ospf_routerid; - struct in_addr ospf_areaid; + nd_ipv4 ospf_routerid; + nd_ipv4 ospf_areaid; nd_uint16_t ospf_chksum; nd_uint16_t ospf_authtype; nd_byte ospf_authdata[OSPF_AUTH_SIZE]; @@ -272,14 +273,14 @@ struct ospfhdr { /* Hello packet */ struct { - struct in_addr hello_mask; + nd_ipv4 hello_mask; nd_uint16_t hello_helloint; nd_uint8_t hello_options; nd_uint8_t hello_priority; nd_uint32_t hello_deadint; - struct in_addr hello_dr; - struct in_addr hello_bdr; - struct in_addr hello_neighbor[1]; /* may repeat */ + nd_ipv4 hello_dr; + nd_ipv4 hello_bdr; + nd_ipv4 hello_neighbor[1]; /* may repeat */ } un_hello; /* Database Description packet */ @@ -295,13 +296,13 @@ struct ospfhdr { struct lsr { nd_uint32_t ls_type; union { - struct in_addr ls_stateid; + nd_ipv4 ls_stateid; struct { /* opaque LSAs change the LSA-ID field */ nd_uint8_t opaque_type; nd_uint24_t opaque_id; } opaque_field; } un_ls_stateid; - struct in_addr ls_router; + nd_ipv4 ls_router; } un_lsr[1]; /* may repeat */ /* Link State Update */