3 * $Id: packet-ospf.h,v 1.10 2000/09/13 07:47:10 guy 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
59 #define OSPF_LSTYPE_ASEXT7 7
61 /* Opaque LSA types */
62 #define OSPF_LSTYPE_OP_LINKLOCAL 9
63 #define OSPF_LSTYPE_OP_AREALOCAL 10
64 #define OSPF_LSTYPE_OP_ASWIDE 11
66 #define OSPF_LINK_PTP 1
67 #define OSPF_LINK_TRANSIT 2
68 #define OSPF_LINK_STUB 3
69 #define OSPF_LINK_VIRTUAL 4
71 #define OSPF_LSA_HEADER_LENGTH 20
73 /* Known opaque LSAs */
74 #define OSPF_LSA_MPLS_TE 1
76 typedef struct _e_ospfhdr {
87 typedef struct _e_ospf_hello {
89 guint16 hellointervall;
92 guint32 dead_interval;
97 typedef struct _e_ospf_dbd {
98 guint16 interface_mtu;
104 typedef struct _e_ospf_ls_req {
110 typedef struct _e_ospf_lsa_hdr {
121 typedef struct _e_ospf_router_lsa {
127 typedef struct _e_ospf_router_data {
133 } e_ospf_router_data;
135 typedef struct _e_ospf_router_metric {
139 } e_ospf_router_metric;
141 typedef struct _e_ospf_network_lsa {
142 guint32 network_mask;
143 } e_ospf_network_lsa;
145 typedef struct _e_ospf_lsa_upd_hdr {
147 } e_ospf_lsa_upd_hdr;
149 typedef struct _e_ospf_summary_lsa {
150 guint32 network_mask;
151 } e_ospf_summary_lsa;
153 typedef struct _e_ospf_asexternal_lsa {
157 guint32 external_tag;
158 } e_ospf_asexternal_lsa;
160 typedef struct _e_ospf_crypto {
164 guint32 sequence_num;