X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fb75d3cd5ad603bd255d9cdc20aeca674c6f3720..d75ee07998ef8ac0fc1a9a6beea2e15a3ca1f726:/ospf.h diff --git a/ospf.h b/ospf.h index 1af8650a..8307f1cc 100644 --- a/ospf.h +++ b/ospf.h @@ -1,3 +1,4 @@ +/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.7 2002-12-11 07:13:56 guy Exp $ (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -20,25 +21,34 @@ * * OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu) */ -#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */ -#define OSPF_TYPE_HELLO 1 /* Hello */ -#define OSPF_TYPE_DB 2 /* Database Description */ -#define OSPF_TYPE_LSR 3 /* Link State Request */ -#define OSPF_TYPE_LSU 4 /* Link State Update */ -#define OSPF_TYPE_LSA 5 /* Link State Ack */ -#define OSPF_TYPE_MAX 6 - -/* Options *_options */ +#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */ +#define OSPF_TYPE_HELLO 1 /* Hello */ +#define OSPF_TYPE_DD 2 /* Database Description */ +#define OSPF_TYPE_LS_REQ 3 /* Link State Request */ +#define OSPF_TYPE_LS_UPDATE 4 /* Link State Update */ +#define OSPF_TYPE_LS_ACK 5 /* Link State Ack */ + +/* Options field + * + * +------------------------------------+ + * | * | O | DC | EA | N/P | MC | E | T | + * +------------------------------------+ + * + */ + #define OSPF_OPTION_T 0x01 /* T bit: TOS support */ #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_DC 0x20 /* DC bit: Demand circuit capable */ +#define OSPF_OPTION_O 0x40 /* O bit: Opaque LSA capable */ /* ospf_authtype */ #define OSPF_AUTH_NONE 0 /* No auth-data */ #define OSPF_AUTH_SIMPLE 1 /* Simple password */ #define OSPF_AUTH_MD5 2 /* MD5 authentication */ -#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ - +#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ /* db_flags */ #define OSPF_DB_INIT 0x04 /* */ @@ -53,7 +63,10 @@ #define LS_TYPE_ASE 5 /* ASE */ #define LS_TYPE_GROUP 6 /* Group membership (multicast */ /* extensions 23 July 1991) */ -#define LS_TYPE_MAX 7 +#define LS_TYPE_NSSA 7 /* rfc1587 - Not so Stubby Areas */ +#define LS_TYPE_OPAQUE_LL 9 /* rfc2370 - Opaque Link Local */ +#define LS_TYPE_OPAQUE_AL 10 /* rfc2370 - Opaque Link Local */ +#define LS_TYPE_OPAQUE_DW 11 /* rfc2370 - Opaque Domain Wide */ /************************************************* * @@ -99,7 +112,7 @@ struct lsa_hdr { u_int32_t ls_seq; u_int16_t ls_chksum; u_int16_t ls_length; -} ; +}; /* link state advertisement */ struct lsa { @@ -148,8 +161,19 @@ struct lsa { u_int32_t mcla_vtype; struct in_addr mcla_vid; } un_mcla[1]; + + /* Opaque LSA */ + struct opaque { + u_int8_t opaque_type; + u_int8_t opaque_id[3]; + struct in_addr adv_router; + struct in_addr sequence_num; + u_int16_t chksum; + u_int16_t length; + } un_opaque[1]; + } lsa_un; -} ; +}; /* @@ -159,7 +183,7 @@ struct tos_metric { u_int8_t tos_type; u_int8_t tos_zero; u_int16_t tos_metric; -} ; +}; #define OSPF_AUTH_SIZE 8 @@ -216,7 +240,7 @@ struct ospfhdr { struct lsa_hdr lsa_lshdr[1]; /* may repeat */ } un_lsa ; } ospf_un ; -} ; +}; #define ospf_hello ospf_un.un_hello #define ospf_db ospf_un.un_db