]> The Tcpdump Group git mirrors - tcpdump/blobdiff - ospf.h
When checking for pcap_if_t, add $V_INCLS to CFLAGS, so we look at the
[tcpdump] / ospf.h
diff --git a/ospf.h b/ospf.h
index 6da06a0650b95e2790f173ebdeae5acea4664b05..67ea363bd38fb4a79d0f797e45918c9b2d8db40d 100644 (file)
--- a/ospf.h
+++ b/ospf.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.9 2003-10-03 13:00:33 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.13 2004-01-27 13:33:24 hannes Exp $ (LBL) */
 /*
  * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
  *     The Regents of the University of California.  All rights reserved.
 #define        LS_TYPE_OPAQUE_AL      10   /* rfc2370 - Opaque Link Local */
 #define        LS_TYPE_OPAQUE_DW      11   /* rfc2370 - Opaque Domain Wide */
 
+#define LS_OPAQUE_TYPE_TE       1   /* rfc3630 */
+#define LS_OPAQUE_TYPE_GRACE    3   /* rfc3623 */
+
+#define LS_OPAQUE_TE_TLV_ROUTER 1   /* rfc3630 */
+#define LS_OPAQUE_TE_TLV_LINK   2   /* rfc3630 */
+
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE             1 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID               2 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP              3 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP             4 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC             5 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW                6 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW            7 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW              8 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP           9 /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* draft-ietf-ccamp-ospf-gmpls-extensions */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* draft-ietf-ccamp-ospf-gmpls-extensions */
+#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR    15 /* draft-ietf-ccamp-ospf-gmpls-extensions */
+#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP    16 /* draft-ietf-ccamp-ospf-gmpls-extensions */
+#define LS_OPAQUE_TE_LINK_SUBTLV_DIFFSERV_TE          17 /* draft-ietf-tewg-diff-te-proto-06 */
+
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP        1  /* rfc3630 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_MA         2  /* rfc3630 */
+
+#define LS_OPAQUE_GRACE_TLV_PERIOD       1 /* rfc3623 */
+#define LS_OPAQUE_GRACE_TLV_REASON       2 /* rfc3623 */
+#define LS_OPAQUE_GRACE_TLV_INT_ADDRESS  3 /* rfc3623 */
+
+#define LS_OPAQUE_GRACE_TLV_REASON_UNKNOWN     0 /* rfc3623 */
+#define LS_OPAQUE_GRACE_TLV_REASON_SW_RESTART  1 /* rfc3623 */
+#define LS_OPAQUE_GRACE_TLV_REASON_SW_UPGRADE  2 /* rfc3623 */
+#define LS_OPAQUE_GRACE_TLV_REASON_CP_SWITCH   3 /* rfc3623 */
+
 /*************************************************
  *
  * is the above a bug in the documentation?
@@ -108,12 +141,12 @@ struct lsa_hdr {
     u_int8_t ls_options;
     u_int8_t ls_type;
     union {
-        struct in_addr ls_stateid;
+        struct in_addr lsa_id;
         struct { /* opaque LSAs change the LSA-ID field */
             u_int8_t opaque_type;
             u_int8_t opaque_id[3];
-       };
-    };
+       } opaque_field;
+    } un_lsa_id;
     struct in_addr ls_router;
     u_int32_t ls_seq;
     u_int16_t ls_chksum;
@@ -168,6 +201,20 @@ struct lsa {
            struct in_addr mcla_vid;
        } un_mcla[1];
 
+        /* Opaque TE LSA */
+        struct {
+           u_int16_t type;
+           u_int16_t length;
+           u_int8_t data[1]; /* may repeat   */
+       } un_te_lsa_tlv;
+
+        /* Grace LSA */
+        struct {
+           u_int16_t type;
+           u_int16_t length;
+           u_int8_t data[1]; /* may repeat   */
+       } un_grace_tlv;
+
         /* Unknown LSA */
         struct unknown {
            u_int8_t data[1]; /* may repeat   */
@@ -225,8 +272,14 @@ struct ospfhdr {
 
        /* Link State Request */
        struct lsr {
-           u_int32_t ls_type;
-           struct in_addr ls_stateid;
+           u_int8_t ls_type[4];
+            union {
+                struct in_addr ls_stateid;
+                struct { /* opaque LSAs change the LSA-ID field */
+                    u_int8_t opaque_type;
+                    u_int8_t opaque_id[3];
+                } opaque_field;
+            } un_ls_stateid;
            struct in_addr ls_router;
        } un_lsr[1];            /* may repeat   */