3 * $Id: packet-ospf.h,v 1.9 2000/08/11 13:34:04 deniel Exp $
5 * (c) 1998 Hannes Boehm
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.org>
9 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef __PACKET_OSPF_H__
28 #define __PACKET_OSPF_H__
30 #define OSPF_HEADER_LENGTH 24
33 #define OSPF_DB_DESC 2
38 #define OSPF_AUTH_NONE 0
39 #define OSPF_AUTH_SIMPLE 1
40 #define OSPF_AUTH_CRYPT 2
42 #define OSPF_OPTIONS_E 2
43 #define OSPF_OPTIONS_MC 4
44 #define OSPF_OPTIONS_NP 8
45 #define OSPF_OPTIONS_EA 16
46 #define OSPF_OPTIONS_DC 32
48 #define OSPF_DBD_FLAG_MS 1
49 #define OSPF_DBD_FLAG_M 2
50 #define OSPF_DBD_FLAG_I 4
52 #define OSPF_LS_REQ_LENGTH 12
54 #define OSPF_LSTYPE_ROUTER 1
55 #define OSPF_LSTYPE_NETWORK 2
56 #define OSPF_LSTYPE_SUMMERY 3
57 #define OSPF_LSTYPE_ASBR 4
58 #define OSPF_LSTYPE_ASEXT 5
60 /* Opaque LSA types */
61 #define OSPF_LSTYPE_OP_LINKLOCAL 9
62 #define OSPF_LSTYPE_OP_AREALOCAL 10
63 #define OSPF_LSTYPE_OP_ASWIDE 11
65 #define OSPF_LINK_PTP 1
66 #define OSPF_LINK_TRANSIT 2
67 #define OSPF_LINK_STUB 3
68 #define OSPF_LINK_VIRTUAL 4
70 #define OSPF_LSA_HEADER_LENGTH 20
72 /* Known opaque LSAs */
73 #define OSPF_LSA_MPLS_TE 1
75 typedef struct _e_ospfhdr {
86 typedef struct _e_ospf_hello {
88 guint16 hellointervall;
91 guint32 dead_interval;
96 typedef struct _e_ospf_dbd {
97 guint16 interface_mtu;
103 typedef struct _e_ospf_ls_req {
109 typedef struct _e_ospf_lsa_hdr {
120 typedef struct _e_ospf_router_lsa {
126 typedef struct _e_ospf_router_data {
132 } e_ospf_router_data;
134 typedef struct _e_ospf_router_metric {
138 } e_ospf_router_metric;
140 typedef struct _e_ospf_network_lsa {
141 guint32 network_mask;
142 } e_ospf_network_lsa;
144 typedef struct _e_ospf_lsa_upd_hdr {
146 } e_ospf_lsa_upd_hdr;
148 typedef struct _e_ospf_summary_lsa {
149 guint32 network_mask;
150 } e_ospf_summary_lsa;
152 typedef struct _e_ospf_asexternal_lsa {
156 guint32 external_tag;
157 } e_ospf_asexternal_lsa;
159 typedef struct _e_ospf_crypto {
163 guint32 sequence_num;