1
- /* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.6 2002-12-11 07:13:56 guy Exp $ (LBL) */
1
+ /* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.7 2006-09-05 15:50:26 hannes Exp $ (LBL) */
2
2
/*
3
3
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
4
4
* The Regents of the University of California. All rights reserved.
21
21
*
22
22
* OSPF support contributed by Jeffrey Honig ([email protected] )
23
23
*/
24
- #define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */
25
- #define OSPF_TYPE_HELLO 1 /* Hello */
26
- #define OSPF_TYPE_DB 2 /* Database Description */
27
- #define OSPF_TYPE_LSR 3 /* Link State Request */
28
- #define OSPF_TYPE_LSU 4 /* Link State Update */
29
- #define OSPF_TYPE_LSA 5 /* Link State Ack */
30
- #define OSPF_TYPE_MAX 6
24
+ #define OSPF_TYPE_HELLO 1 /* Hello */
25
+ #define OSPF_TYPE_DD 2 /* Database Description */
26
+ #define OSPF_TYPE_LS_REQ 3 /* Link State Request */
27
+ #define OSPF_TYPE_LS_UPDATE 4 /* Link State Update */
28
+ #define OSPF_TYPE_LS_ACK 5 /* Link State Ack */
31
29
32
30
/* Options *_options */
33
31
#define OSPF6_OPTION_V6 0x01 /* V6 bit: A bit for peeping tom */
50
48
#define LS_TYPE_INTER_AR 4 /* Inter-Area-Router */
51
49
#define LS_TYPE_ASE 5 /* ASE */
52
50
#define LS_TYPE_GROUP 6 /* Group membership */
53
- #define LS_TYPE_TYPE7 7 /* Type 7 LSA */
51
+ #define LS_TYPE_NSSA 7 /* NSSA */
54
52
#define LS_TYPE_LINK 8 /* Link LSA */
55
53
#define LS_TYPE_INTRA_AP 9 /* Intra-Area-Prefix */
56
- #define LS_TYPE_MAX 10
54
+ #define LS_TYPE_INTRA_ATE 10 /* Intra-Area-TE */
55
+ #define LS_TYPE_GRACE 11 /* Grace LSA */
57
56
#define LS_TYPE_MASK 0x1fff
58
57
59
58
#define LS_SCOPE_LINKLOCAL 0x0000
60
59
#define LS_SCOPE_AREA 0x2000
61
60
#define LS_SCOPE_AS 0x4000
62
61
#define LS_SCOPE_MASK 0x6000
63
-
64
- /*************************************************
65
- *
66
- * is the above a bug in the documentation?
67
- *
68
- *************************************************/
69
-
62
+ #define LS_SCOPE_U 0x8000
70
63
71
64
/* rla_link.link_type */
72
65
#define RLA_TYPE_ROUTER 1 /* point-to-point to another router */
78
71
#define RLA_FLAG_E 0x02
79
72
#define RLA_FLAG_V 0x04
80
73
#define RLA_FLAG_W 0x08
74
+ #define RLA_FLAG_N 0x10
75
+
76
+ /* lsa_prefix options */
77
+ #define LSA_PREFIX_OPT_NU 0x01
78
+ #define LSA_PREFIX_OPT_LA 0x02
79
+ #define LSA_PREFIX_OPT_MC 0x04
80
+ #define LSA_PREFIX_OPT_P 0x08
81
+ #define LSA_PREFIX_OPT_DN 0x10
81
82
82
83
/* sla_tosmetric breakdown */
83
84
#define SLA_MASK_TOS 0x7f000000
84
85
#define SLA_MASK_METRIC 0x00ffffff
85
86
#define SLA_SHIFT_TOS 24
86
87
87
88
/* asla_metric */
88
- #define ASLA_FLAG_EXTERNAL 0x04000000
89
89
#define ASLA_FLAG_FWDADDR 0x02000000
90
90
#define ASLA_FLAG_ROUTETAG 0x01000000
91
91
#define ASLA_MASK_METRIC 0x00ffffff
92
92
93
- /* multicast vertex type */
94
- #define MCLA_VERTEX_ROUTER 1
95
- #define MCLA_VERTEX_NETWORK 2
96
-
97
93
typedef u_int32_t rtrid_t ;
98
94
99
95
/* link state advertisement header */
100
- struct lsa_hdr {
96
+ struct lsa6_hdr {
101
97
u_int16_t ls_age ;
102
98
u_int16_t ls_type ;
103
99
rtrid_t ls_stateid ;
@@ -107,16 +103,16 @@ struct lsa_hdr {
107
103
u_int16_t ls_length ;
108
104
};
109
105
110
- struct lsa_prefix {
106
+ struct lsa6_prefix {
111
107
u_int8_t lsa_p_len ;
112
108
u_int8_t lsa_p_opt ;
113
- u_int16_t lsa_p_mbz ;
109
+ u_int16_t lsa_p_metric ;
114
110
u_int8_t lsa_p_prefix [4 ];
115
111
};
116
112
117
113
/* link state advertisement */
118
- struct lsa {
119
- struct lsa_hdr ls_hdr ;
114
+ struct lsa6 {
115
+ struct lsa6_hdr ls_hdr ;
120
116
121
117
/* Link state types */
122
118
union {
@@ -128,7 +124,7 @@ struct lsa {
128
124
} rla_flgandopt ;
129
125
#define rla_flags rla_flgandopt.flg
130
126
#define rla_options rla_flgandopt.opt
131
- struct rlalink {
127
+ struct rlalink6 {
132
128
u_int8_t link_type ;
133
129
u_int8_t link_zero [1 ];
134
130
u_int16_t link_metric ;
@@ -147,13 +143,13 @@ struct lsa {
147
143
/* Inter Area Prefix LSA */
148
144
struct {
149
145
u_int32_t inter_ap_metric ;
150
- struct lsa_prefix inter_ap_prefix [1 ];
146
+ struct lsa6_prefix inter_ap_prefix [1 ];
151
147
} un_inter_ap ;
152
148
153
149
/* AS external links advertisements */
154
150
struct {
155
151
u_int32_t asla_metric ;
156
- struct lsa_prefix asla_prefix [1 ];
152
+ struct lsa6_prefix asla_prefix [1 ];
157
153
/* some optional fields follow */
158
154
} un_asla ;
159
155
@@ -183,7 +179,7 @@ struct lsa {
183
179
#define llsa_options llsa_priandopt.opt
184
180
struct in6_addr llsa_lladdr ;
185
181
u_int32_t llsa_nprefix ;
186
- struct lsa_prefix llsa_prefix [1 ];
182
+ struct lsa6_prefix llsa_prefix [1 ];
187
183
} un_llsa ;
188
184
189
185
/* Intra-Area-Prefix */
@@ -192,21 +188,12 @@ struct lsa {
192
188
u_int16_t intra_ap_lstype ;
193
189
rtrid_t intra_ap_lsid ;
194
190
rtrid_t intra_ap_rtid ;
195
- struct lsa_prefix intra_ap_prefix [1 ];
191
+ struct lsa6_prefix intra_ap_prefix [1 ];
196
192
} un_intra_ap ;
197
193
} lsa_un ;
198
194
};
199
195
200
196
201
- /*
202
- * TOS metric struct (will be 0 or more in router links update)
203
- */
204
- struct tos_metric {
205
- u_int8_t tos_type ;
206
- u_int8_t tos_zero ;
207
- u_int16_t tos_metric ;
208
- };
209
-
210
197
#define OSPF_AUTH_SIZE 8
211
198
212
199
/*
@@ -246,11 +233,11 @@ struct ospf6hdr {
246
233
u_int8_t db_mbz ;
247
234
u_int8_t db_flags ;
248
235
u_int32_t db_seq ;
249
- struct lsa_hdr db_lshdr [1 ]; /* may repeat */
236
+ struct lsa6_hdr db_lshdr [1 ]; /* may repeat */
250
237
} un_db ;
251
238
252
239
/* Link State Request */
253
- struct lsr {
240
+ struct lsr6 {
254
241
u_int16_t ls_mbz ;
255
242
u_int16_t ls_type ;
256
243
rtrid_t ls_stateid ;
@@ -260,12 +247,12 @@ struct ospf6hdr {
260
247
/* Link State Update */
261
248
struct {
262
249
u_int32_t lsu_count ;
263
- struct lsa lsu_lsa [1 ]; /* may repeat */
250
+ struct lsa6 lsu_lsa [1 ]; /* may repeat */
264
251
} un_lsu ;
265
252
266
253
/* Link State Acknowledgement */
267
254
struct {
268
- struct lsa_hdr lsa_lshdr [1 ]; /* may repeat */
255
+ struct lsa6_hdr lsa_lshdr [1 ]; /* may repeat */
269
256
} un_lsa ;
270
257
} ospf6_un ;
271
258
};
0 commit comments