blob: 9f333a816c7dc176269cec6e3ffbd954e3589ab8 [file] [log] [blame]
hassoef1bbf52004-10-08 12:04:21 +00001/* OSPFv3 SNMP support
2 * Copyright (C) 2004 Yasuhiro Ohara
3 *
4 * This file is part of GNU Zebra.
5 *
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#include <zebra.h>
23
24#ifdef HAVE_SNMP
25
hassoef1bbf52004-10-08 12:04:21 +000026#include <net-snmp/net-snmp-config.h>
Joakim Tjernlundfb62a3c2008-05-13 20:03:32 +020027#include <net-snmp/net-snmp-includes.h>
hassoef1bbf52004-10-08 12:04:21 +000028
29#include "log.h"
30#include "vty.h"
31#include "linklist.h"
32#include "smux.h"
33
34#include "ospf6_proto.h"
35#include "ospf6_lsa.h"
36#include "ospf6_lsdb.h"
37#include "ospf6_route.h"
38#include "ospf6_top.h"
39#include "ospf6_area.h"
40#include "ospf6_interface.h"
41#include "ospf6_message.h"
42#include "ospf6_neighbor.h"
43#include "ospf6d.h"
Chris Caputo0be8dfb2009-06-02 18:40:07 +010044#include "ospf6_snmp.h"
hassoef1bbf52004-10-08 12:04:21 +000045
46/* OSPFv3-MIB */
Vincent Bernat0f0ab512012-05-22 13:34:24 +020047#define OSPFv3MIB 1,3,6,1,2,1,191
hassoef1bbf52004-10-08 12:04:21 +000048
hassoef1bbf52004-10-08 12:04:21 +000049/* OSPFv3 MIB General Group values. */
50#define OSPFv3ROUTERID 1
51#define OSPFv3ADMINSTAT 2
52#define OSPFv3VERSIONNUMBER 3
53#define OSPFv3AREABDRRTRSTATUS 4
54#define OSPFv3ASBDRRTRSTATUS 5
55#define OSPFv3ASSCOPELSACOUNT 6
56#define OSPFv3ASSCOPELSACHECKSUMSUM 7
57#define OSPFv3ORIGINATENEWLSAS 8
58#define OSPFv3RXNEWLSAS 9
59#define OSPFv3EXTLSACOUNT 10
60#define OSPFv3EXTAREALSDBLIMIT 11
Vincent Bernat0f0ab512012-05-22 13:34:24 +020061#define OSPFv3EXITOVERFLOWINTERVAL 12
62#define OSPFv3DEMANDEXTENSIONS 13
63#define OSPFv3REFERENCEBANDWIDTH 14
64#define OSPFv3RESTARTSUPPORT 15
65#define OSPFv3RESTARTINTERVAL 16
66#define OSPFv3RESTARTSTRICTLSACHECKING 17
67#define OSPFv3RESTARTSTATUS 18
68#define OSPFv3RESTARTAGE 19
69#define OSPFv3RESTARTEXITREASON 20
70#define OSPFv3NOTIFICATIONENABLE 21
71#define OSPFv3STUBROUTERSUPPORT 22
72#define OSPFv3STUBROUTERADVERTISEMENT 23
73#define OSPFv3DISCONTINUITYTIME 24
74#define OSPFv3RESTARTTIME 25
hassoef1bbf52004-10-08 12:04:21 +000075
Vincent Bernat0f0ab512012-05-22 13:34:24 +020076/* OSPFv3 MIB Area Table values: ospfv3AreaTable */
hassoef1bbf52004-10-08 12:04:21 +000077#define OSPFv3IMPORTASEXTERN 2
hasso2680aa22004-11-25 20:54:46 +000078#define OSPFv3AREASPFRUNS 3
79#define OSPFv3AREABDRRTRCOUNT 4
80#define OSPFv3AREAASBDRRTRCOUNT 5
81#define OSPFv3AREASCOPELSACOUNT 6
82#define OSPFv3AREASCOPELSACKSUMSUM 7
83#define OSPFv3AREASUMMARY 8
Vincent Bernat0f0ab512012-05-22 13:34:24 +020084#define OSPFv3AREAROWSTATUS 9
85#define OSPFv3AREASTUBMETRIC 10
hasso2680aa22004-11-25 20:54:46 +000086#define OSPFv3AREANSSATRANSLATORROLE 11
87#define OSPFv3AREANSSATRANSLATORSTATE 12
Vincent Bernat0f0ab512012-05-22 13:34:24 +020088#define OSPFv3AREANSSATRANSLATORSTABINTERVAL 13
hasso2680aa22004-11-25 20:54:46 +000089#define OSPFv3AREANSSATRANSLATOREVENTS 14
90#define OSPFv3AREASTUBMETRICTYPE 15
Vincent Bernat0f0ab512012-05-22 13:34:24 +020091#define OSPFv3AREATEENABLED 16
hasso2680aa22004-11-25 20:54:46 +000092
Vincent Bernat0f0ab512012-05-22 13:34:24 +020093/* OSPFv3 MIB AS Lsdb Table values: ospfv3AsLsdbTable */
94#define OSPFv3ASLSDBSEQUENCE 4
95#define OSPFv3ASLSDBAGE 5
96#define OSPFv3ASLSDBCHECKSUM 6
97#define OSPFv3ASLSDBADVERTISEMENT 7
98#define OSPFv3ASLSDBTYPEKNOWN 8
99
100/* OSPFv3 MIB Area Lsdb Table values: ospfv3AreaLsdbTable */
hasso2680aa22004-11-25 20:54:46 +0000101#define OSPFv3AREALSDBSEQUENCE 5
102#define OSPFv3AREALSDBAGE 6
103#define OSPFv3AREALSDBCHECKSUM 7
104#define OSPFv3AREALSDBADVERTISEMENT 8
105#define OSPFv3AREALSDBTYPEKNOWN 9
hassoef1bbf52004-10-08 12:04:21 +0000106
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200107/* OSPFv3 MIB Link Lsdb Table values: ospfv3LinkLsdbTable */
108#define OSPFv3LINKLSDBSEQUENCE 6
109#define OSPFv3LINKLSDBAGE 7
110#define OSPFv3LINKLSDBCHECKSUM 8
111#define OSPFv3LINKLSDBADVERTISEMENT 9
112#define OSPFv3LINKLSDBTYPEKNOWN 10
113
114/* OSPFv3 MIB Host Table values: ospfv3HostTable */
115#define OSPFv3HOSTMETRIC 3
116#define OSPFv3HOSTROWSTATUS 4
117#define OSPFv3HOSTAREAID 5
118
119/* OSPFv3 MIB Interface Table values: ospfv3IfTable */
120#define OSPFv3IFAREAID 3
121#define OSPFv3IFTYPE 4
122#define OSPFv3IFADMINSTATUS 5
123#define OSPFv3IFRTRPRIORITY 6
124#define OSPFv3IFTRANSITDELAY 7
125#define OSPFv3IFRETRANSINTERVAL 8
126#define OSPFv3IFHELLOINTERVAL 9
127#define OSPFv3IFRTRDEADINTERVAL 10
128#define OSPFv3IFPOLLINTERVAL 11
129#define OSPFv3IFSTATE 12
130#define OSPFv3IFDESIGNATEDROUTER 13
131#define OSPFv3IFBACKUPDESIGNATEDROUTER 14
132#define OSPFv3IFEVENTS 15
133#define OSPFv3IFROWSTATUS 16
134#define OSPFv3IFDEMAND 17
135#define OSPFv3IFMETRICVALUE 18
136#define OSPFv3IFLINKSCOPELSACOUNT 19
137#define OSPFv3IFLINKLSACKSUMSUM 20
138#define OSPFv3IFDEMANDNBRPROBE 21
139#define OSPFv3IFDEMANDNBRPROBERETRANSLIMIT 22
140#define OSPFv3IFDEMANDNBRPROBEINTERVAL 23
141#define OSPFv3IFTEDISABLED 24
142#define OSPFv3IFLINKLSASUPPRESSION 25
143
144/* OSPFv3 MIB Virtual Interface Table values: ospfv3VirtIfTable */
145#define OSPFv3VIRTIFINDEX 3
146#define OSPFv3VIRTIFINSTID 4
147#define OSPFv3VIRTIFTRANSITDELAY 5
148#define OSPFv3VIRTIFRETRANSINTERVAL 6
149#define OSPFv3VIRTIFHELLOINTERVAL 7
150#define OSPFv3VIRTIFRTRDEADINTERVAL 8
151#define OSPFv3VIRTIFSTATE 9
152#define OSPFv3VIRTIFEVENTS 10
153#define OSPFv3VIRTIFROWSTATUS 11
154#define OSPFv3VIRTIFLINKSCOPELSACOUNT 12
155#define OSPFv3VIRTIFLINKLSACKSUMSUM 13
156
157/* OSPFv3 MIB Neighbors Table values: ospfv3NbrTable */
158#define OSPFv3NBRADDRESSTYPE 4
159#define OSPFv3NBRADDRESS 5
160#define OSPFv3NBROPTIONS 6
161#define OSPFv3NBRPRIORITY 7
162#define OSPFv3NBRSTATE 8
163#define OSPFv3NBREVENTS 9
164#define OSPFv3NBRLSRETRANSQLEN 10
165#define OSPFv3NBRHELLOSUPPRESSED 11
166#define OSPFv3NBRIFID 12
167#define OSPFv3NBRRESTARTHELPERSTATUS 13
168#define OSPFv3NBRRESTARTHELPERAGE 14
169#define OSPFv3NBRRESTARTHELPEREXITREASON 15
170
171/* OSPFv3 MIB Configured Neighbors Table values: ospfv3CfgNbrTable */
172#define OSPFv3CFGNBRPRIORITY 5
173#define OSPFv3CFGNBRROWSTATUS 6
174
175/* OSPFv3 MIB Virtual Neighbors Table values: ospfv3VirtNbrTable */
176#define OSPFv3VIRTNBRIFINDEX 3
177#define OSPFv3VIRTNBRIFINSTID 4
178#define OSPFv3VIRTNBRADDRESSTYPE 5
179#define OSPFv3VIRTNBRADDRESS 6
180#define OSPFv3VIRTNBROPTIONS 7
181#define OSPFv3VIRTNBRSTATE 8
182#define OSPFv3VIRTNBREVENTS 9
183#define OSPFv3VIRTNBRLSRETRANSQLEN 10
184#define OSPFv3VIRTNBRHELLOSUPPRESSED 11
185#define OSPFv3VIRTNBRIFID 12
186#define OSPFv3VIRTNBRRESTARTHELPERSTATUS 13
187#define OSPFv3VIRTNBRRESTARTHELPERAGE 14
188#define OSPFv3VIRTNBRRESTARTHELPEREXITREASON 15
189
190/* OSPFv3 MIB Area Aggregate Table values: ospfv3AreaAggregateTable */
191#define OSPFv3AREAAGGREGATEROWSTATUS 6
192#define OSPFv3AREAAGGREGATEEFFECT 7
193#define OSPFv3AREAAGGREGATEROUTETAG 8
194
195/* OSPFv3 MIB Virtual Link Lsdb Table values: ospfv3VirtLinkLsdbTable */
196#define OSPFv3VIRTLINKLSDBSEQUENCE 6
197#define OSPFv3VIRTLINKLSDBAGE 7
198#define OSPFv3VIRTLINKLSDBCHECKSUM 8
199#define OSPFv3VIRTLINKLSDBADVERTISEMENT 9
200#define OSPFv3VIRTLINKLSDBTYPEKNOWN 10
201
hassoef1bbf52004-10-08 12:04:21 +0000202/* SYNTAX Status from OSPF-MIB. */
203#define OSPF_STATUS_ENABLED 1
204#define OSPF_STATUS_DISABLED 2
205
206/* SNMP value hack. */
207#define COUNTER ASN_COUNTER
208#define INTEGER ASN_INTEGER
209#define GAUGE ASN_GAUGE
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200210#define UNSIGNED ASN_UNSIGNED
hassoef1bbf52004-10-08 12:04:21 +0000211#define TIMETICKS ASN_TIMETICKS
212#define IPADDRESS ASN_IPADDRESS
213#define STRING ASN_OCTET_STR
214
215/* For return values e.g. SNMP_INTEGER macro */
216SNMP_LOCAL_VARIABLES
217
hassoef1bbf52004-10-08 12:04:21 +0000218/* OSPFv3-MIB instances. */
219oid ospfv3_oid [] = { OSPFv3MIB };
hassoef1bbf52004-10-08 12:04:21 +0000220
hassoef1bbf52004-10-08 12:04:21 +0000221/* Hook functions. */
Chris Caputo0be8dfb2009-06-02 18:40:07 +0100222static u_char *ospfv3GeneralGroup (struct variable *, oid *, size_t *,
223 int, size_t *, WriteMethod **);
224static u_char *ospfv3AreaEntry (struct variable *, oid *, size_t *,
225 int, size_t *, WriteMethod **);
226static u_char *ospfv3AreaLsdbEntry (struct variable *, oid *, size_t *,
227 int, size_t *, WriteMethod **);
Vincent Bernat061bc732012-05-31 20:21:15 +0200228static u_char *ospfv3NbrEntry (struct variable *, oid *, size_t *,
229 int, size_t *, WriteMethod **);
hassoef1bbf52004-10-08 12:04:21 +0000230
231struct variable ospfv3_variables[] =
232{
233 /* OSPF general variables */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200234 {OSPFv3ROUTERID, UNSIGNED, RWRITE, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000235 3, {1, 1, 1}},
236 {OSPFv3ADMINSTAT, INTEGER, RWRITE, ospfv3GeneralGroup,
237 3, {1, 1, 2}},
238 {OSPFv3VERSIONNUMBER, INTEGER, RONLY, ospfv3GeneralGroup,
239 3, {1, 1, 3}},
240 {OSPFv3AREABDRRTRSTATUS, INTEGER, RONLY, ospfv3GeneralGroup,
241 3, {1, 1, 4}},
242 {OSPFv3ASBDRRTRSTATUS, INTEGER, RWRITE, ospfv3GeneralGroup,
243 3, {1, 1, 5}},
244 {OSPFv3ASSCOPELSACOUNT, GAUGE, RONLY, ospfv3GeneralGroup,
245 3, {1, 1, 6}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200246 {OSPFv3ASSCOPELSACHECKSUMSUM,UNSIGNED, RONLY, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000247 3, {1, 1, 7}},
248 {OSPFv3ORIGINATENEWLSAS, COUNTER, RONLY, ospfv3GeneralGroup,
249 3, {1, 1, 8}},
250 {OSPFv3RXNEWLSAS, COUNTER, RONLY, ospfv3GeneralGroup,
251 3, {1, 1, 9}},
252 {OSPFv3EXTLSACOUNT, GAUGE, RONLY, ospfv3GeneralGroup,
253 3, {1, 1, 10}},
254 {OSPFv3EXTAREALSDBLIMIT, INTEGER, RWRITE, ospfv3GeneralGroup,
255 3, {1, 1, 11}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200256 {OSPFv3EXITOVERFLOWINTERVAL, UNSIGNED, RWRITE, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000257 3, {1, 1, 12}},
hassoef1bbf52004-10-08 12:04:21 +0000258 {OSPFv3DEMANDEXTENSIONS, INTEGER, RWRITE, ospfv3GeneralGroup,
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200259 3, {1, 1, 13}},
260 {OSPFv3REFERENCEBANDWIDTH, UNSIGNED, RWRITE, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000261 3, {1, 1, 14}},
hassoef1bbf52004-10-08 12:04:21 +0000262 {OSPFv3RESTARTSUPPORT, INTEGER, RWRITE, ospfv3GeneralGroup,
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200263 3, {1, 1, 15}},
264 {OSPFv3RESTARTINTERVAL, UNSIGNED, RWRITE, ospfv3GeneralGroup,
265 3, {1, 1, 16}},
266 {OSPFv3RESTARTSTRICTLSACHECKING, INTEGER, RWRITE, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000267 3, {1, 1, 17}},
hassoef1bbf52004-10-08 12:04:21 +0000268 {OSPFv3RESTARTSTATUS, INTEGER, RONLY, ospfv3GeneralGroup,
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200269 3, {1, 1, 18}},
270 {OSPFv3RESTARTAGE, UNSIGNED, RONLY, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000271 3, {1, 1, 19}},
hassoef1bbf52004-10-08 12:04:21 +0000272 {OSPFv3RESTARTEXITREASON, INTEGER, RONLY, ospfv3GeneralGroup,
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200273 3, {1, 1, 20}},
274 {OSPFv3NOTIFICATIONENABLE, INTEGER, RWRITE, ospfv3GeneralGroup,
hassoef1bbf52004-10-08 12:04:21 +0000275 3, {1, 1, 21}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200276 {OSPFv3STUBROUTERSUPPORT, INTEGER, RONLY, ospfv3GeneralGroup,
277 3, {1, 1, 22}},
278 {OSPFv3STUBROUTERADVERTISEMENT, INTEGER, RWRITE, ospfv3GeneralGroup,
279 3, {1, 1, 23}},
280 {OSPFv3DISCONTINUITYTIME, TIMETICKS, RONLY, ospfv3GeneralGroup,
281 3, {1, 1, 24}},
282 {OSPFv3RESTARTTIME, TIMETICKS, RONLY, ospfv3GeneralGroup,
283 3, {1, 1, 25}},
hassoef1bbf52004-10-08 12:04:21 +0000284
285 /* OSPFv3 Area Data Structure */
hasso2680aa22004-11-25 20:54:46 +0000286 {OSPFv3IMPORTASEXTERN, INTEGER, RWRITE, ospfv3AreaEntry,
hassoef1bbf52004-10-08 12:04:21 +0000287 4, {1, 2, 1, 2}},
hasso2680aa22004-11-25 20:54:46 +0000288 {OSPFv3AREASPFRUNS, COUNTER, RONLY, ospfv3AreaEntry,
289 4, {1, 2, 1, 3}},
290 {OSPFv3AREABDRRTRCOUNT, GAUGE, RONLY, ospfv3AreaEntry,
291 4, {1, 2, 1, 4}},
292 {OSPFv3AREAASBDRRTRCOUNT, GAUGE, RONLY, ospfv3AreaEntry,
293 4, {1, 2, 1, 5}},
294 {OSPFv3AREASCOPELSACOUNT, GAUGE, RONLY, ospfv3AreaEntry,
295 4, {1, 2, 1, 6}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200296 {OSPFv3AREASCOPELSACKSUMSUM, UNSIGNED, RONLY, ospfv3AreaEntry,
hasso2680aa22004-11-25 20:54:46 +0000297 4, {1, 2, 1, 7}},
298 {OSPFv3AREASUMMARY, INTEGER, RWRITE, ospfv3AreaEntry,
299 4, {1, 2, 1, 8}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200300 {OSPFv3AREAROWSTATUS, INTEGER, RWRITE, ospfv3AreaEntry,
hasso2680aa22004-11-25 20:54:46 +0000301 4, {1, 2, 1, 9}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200302 {OSPFv3AREASTUBMETRIC, INTEGER, RWRITE, ospfv3AreaEntry,
hasso2680aa22004-11-25 20:54:46 +0000303 4, {1, 2, 1, 10}},
304 {OSPFv3AREANSSATRANSLATORROLE, INTEGER, RWRITE, ospfv3AreaEntry,
305 4, {1, 2, 1, 11}},
306 {OSPFv3AREANSSATRANSLATORSTATE, INTEGER, RONLY, ospfv3AreaEntry,
307 4, {1, 2, 1, 12}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200308 {OSPFv3AREANSSATRANSLATORSTABINTERVAL, UNSIGNED, RWRITE, ospfv3AreaEntry,
hasso2680aa22004-11-25 20:54:46 +0000309 4, {1, 2, 1, 13}},
310 {OSPFv3AREANSSATRANSLATOREVENTS, COUNTER, RONLY, ospfv3AreaEntry,
311 4, {1, 2, 1, 14}},
312 {OSPFv3AREASTUBMETRICTYPE, INTEGER, RWRITE, ospfv3AreaEntry,
313 4, {1, 2, 1, 15}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200314 {OSPFv3AREATEENABLED, INTEGER, RWRITE, ospfv3AreaEntry,
315 4, {1, 2, 1, 16}},
hasso2680aa22004-11-25 20:54:46 +0000316
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200317 /* OSPFv3 Area LSDB */
hasso2680aa22004-11-25 20:54:46 +0000318 {OSPFv3AREALSDBSEQUENCE, INTEGER, RONLY, ospfv3AreaLsdbEntry,
319 4, {1, 4, 1, 5}},
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200320 {OSPFv3AREALSDBAGE, UNSIGNED, RONLY, ospfv3AreaLsdbEntry,
hasso2680aa22004-11-25 20:54:46 +0000321 4, {1, 4, 1, 6}},
322 {OSPFv3AREALSDBCHECKSUM, INTEGER, RONLY, ospfv3AreaLsdbEntry,
323 4, {1, 4, 1, 7}},
324 {OSPFv3AREALSDBADVERTISEMENT, STRING, RONLY, ospfv3AreaLsdbEntry,
325 4, {1, 4, 1, 8}},
326 {OSPFv3AREALSDBTYPEKNOWN, INTEGER, RONLY, ospfv3AreaLsdbEntry,
327 4, {1, 4, 1, 9}},
328
Vincent Bernat061bc732012-05-31 20:21:15 +0200329 /* OSPFv3 neighbors */
330 {OSPFv3NBRADDRESSTYPE, INTEGER, RONLY, ospfv3NbrEntry,
331 4, {1, 9, 1, 4}},
332 {OSPFv3NBRADDRESS, STRING, RONLY, ospfv3NbrEntry,
333 4, {1, 9, 1, 5}},
334 {OSPFv3NBROPTIONS, INTEGER, RONLY, ospfv3NbrEntry,
335 4, {1, 9, 1, 6}},
336 {OSPFv3NBRPRIORITY, INTEGER, RONLY, ospfv3NbrEntry,
337 4, {1, 9, 1, 7}},
338 {OSPFv3NBRSTATE, INTEGER, RONLY, ospfv3NbrEntry,
339 4, {1, 9, 1, 8}},
340 {OSPFv3NBREVENTS, COUNTER, RONLY, ospfv3NbrEntry,
341 4, {1, 9, 1, 9}},
342 {OSPFv3NBRLSRETRANSQLEN, GAUGE, RONLY, ospfv3NbrEntry,
343 4, {1, 9, 1, 10}},
344 {OSPFv3NBRHELLOSUPPRESSED, INTEGER, RONLY, ospfv3NbrEntry,
345 4, {1, 9, 1, 11}},
346 {OSPFv3NBRIFID, INTEGER, RONLY, ospfv3NbrEntry,
347 4, {1, 9, 1, 12}},
348 {OSPFv3NBRRESTARTHELPERSTATUS, INTEGER, RONLY, ospfv3NbrEntry,
349 4, {1, 9, 1, 13}},
350 {OSPFv3NBRRESTARTHELPERAGE, UNSIGNED, RONLY, ospfv3NbrEntry,
351 4, {1, 9, 1, 14}},
352 {OSPFv3NBRRESTARTHELPEREXITREASON, INTEGER, RONLY, ospfv3NbrEntry,
353 4, {1, 9, 1, 15}},
hassoef1bbf52004-10-08 12:04:21 +0000354};
355
356static u_char *
357ospfv3GeneralGroup (struct variable *v, oid *name, size_t *length,
358 int exact, size_t *var_len, WriteMethod **write_method)
359{
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200360 u_int16_t sum;
361 u_int32_t count;
362 struct ospf6_lsa *lsa = NULL;
363
hassoef1bbf52004-10-08 12:04:21 +0000364 /* Check whether the instance identifier is valid */
365 if (smux_header_generic (v, name, length, exact, var_len, write_method)
366 == MATCH_FAILED)
367 return NULL;
368
369 /* Return the current value of the variable */
370 switch (v->magic)
371 {
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200372 case OSPFv3ROUTERID:
hassoef1bbf52004-10-08 12:04:21 +0000373 /* Router-ID of this OSPF instance. */
374 if (ospf6)
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200375 return SNMP_INTEGER (ntohl (ospf6->router_id));
376 return SNMP_INTEGER (0);
377 case OSPFv3ADMINSTAT:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200378 if (ospf6)
379 return SNMP_INTEGER (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED)?
380 OSPF_STATUS_DISABLED:OSPF_STATUS_ENABLED);
381 return SNMP_INTEGER (OSPF_STATUS_DISABLED);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200382 case OSPFv3VERSIONNUMBER:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200383 return SNMP_INTEGER (3);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200384 case OSPFv3AREABDRRTRSTATUS:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200385 if (ospf6)
386 return SNMP_INTEGER (ospf6_is_router_abr (ospf6)?SNMP_TRUE:SNMP_FALSE);
387 return SNMP_INTEGER (SNMP_FALSE);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200388 case OSPFv3ASBDRRTRSTATUS:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200389 if (ospf6)
390 return SNMP_INTEGER (ospf6_asbr_is_asbr (ospf6)?SNMP_TRUE:SNMP_FALSE);
391 return SNMP_INTEGER (SNMP_FALSE);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200392 case OSPFv3ASSCOPELSACOUNT:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200393 if (ospf6)
394 return SNMP_INTEGER (ospf6->lsdb->count);
395 return SNMP_INTEGER (0);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200396 case OSPFv3ASSCOPELSACHECKSUMSUM:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200397 if (ospf6)
398 {
399 for (sum = 0, lsa = ospf6_lsdb_head (ospf6->lsdb);
400 lsa;
401 lsa = ospf6_lsdb_next (lsa))
402 sum += ntohs (lsa->header->checksum);
403 return SNMP_INTEGER (sum);
404 }
405 return SNMP_INTEGER (0);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200406 case OSPFv3ORIGINATENEWLSAS:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200407 return SNMP_INTEGER (0); /* Don't know where to get this value... */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200408 case OSPFv3RXNEWLSAS:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200409 return SNMP_INTEGER (0); /* Don't know where to get this value... */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200410 case OSPFv3EXTLSACOUNT:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200411 if (ospf6)
412 {
413 for (count = 0, lsa = ospf6_lsdb_type_head (htons (OSPF6_LSTYPE_AS_EXTERNAL),
414 ospf6->lsdb);
415 lsa;
416 lsa = ospf6_lsdb_type_next (htons (OSPF6_LSTYPE_AS_EXTERNAL),
417 lsa))
418 count += 1;
419 return SNMP_INTEGER (count);
420 }
421 return SNMP_INTEGER (0);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200422 case OSPFv3EXTAREALSDBLIMIT:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200423 return SNMP_INTEGER (-1);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200424 case OSPFv3EXITOVERFLOWINTERVAL:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200425 return SNMP_INTEGER (0); /* Not supported */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200426 case OSPFv3DEMANDEXTENSIONS:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200427 return SNMP_INTEGER (0); /* Not supported */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200428 case OSPFv3REFERENCEBANDWIDTH:
Vincent Bernat2c5f1482012-06-01 11:38:34 +0200429 return SNMP_INTEGER (100000);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200430 case OSPFv3RESTARTSUPPORT:
431 case OSPFv3RESTARTINTERVAL:
432 case OSPFv3RESTARTSTRICTLSACHECKING:
433 case OSPFv3RESTARTSTATUS:
434 case OSPFv3RESTARTAGE:
435 case OSPFv3RESTARTEXITREASON:
436 case OSPFv3NOTIFICATIONENABLE:
437 case OSPFv3STUBROUTERSUPPORT:
438 case OSPFv3STUBROUTERADVERTISEMENT:
439 case OSPFv3DISCONTINUITYTIME:
440 case OSPFv3RESTARTTIME:
441 /* TODO: Not implemented */
hassoef1bbf52004-10-08 12:04:21 +0000442 return NULL;
443 }
444 return NULL;
445}
446
447static u_char *
448ospfv3AreaEntry (struct variable *v, oid *name, size_t *length,
449 int exact, size_t *var_len, WriteMethod **write_method)
450{
451 struct ospf6_area *oa, *area = NULL;
452 u_int32_t area_id = 0;
paul0c083ee2004-10-10 12:54:58 +0000453 struct listnode *node;
454 unsigned int len;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200455 char a[16];
hassoef1bbf52004-10-08 12:04:21 +0000456
457 if (ospf6 == NULL)
458 return NULL;
459
Vincent Bernat8046ba62012-05-31 13:30:28 +0200460 if (smux_header_table(v, name, length, exact, var_len, write_method)
461 == MATCH_FAILED)
462 return NULL;
463
hassoef1bbf52004-10-08 12:04:21 +0000464 len = *length - v->namelen;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200465 len = (len >= 1 ? sizeof 1 : 0);
466 if (exact && len != 1)
hassoef1bbf52004-10-08 12:04:21 +0000467 return NULL;
468 if (len)
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200469 area_id = htonl (name[v->namelen]);
hassoef1bbf52004-10-08 12:04:21 +0000470
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200471 inet_ntop (AF_INET, &area_id, a, sizeof (a));
Andrew J. Schorreda9ba72007-04-27 18:13:15 +0000472 zlog_debug ("SNMP access by area: %s, exact=%d len=%d length=%lu",
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200473 a, exact, len, (u_long)*length);
hassoef1bbf52004-10-08 12:04:21 +0000474
paul1eb8ef22005-04-07 07:30:20 +0000475 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hassoef1bbf52004-10-08 12:04:21 +0000476 {
hassoef1bbf52004-10-08 12:04:21 +0000477 if (area == NULL)
478 {
479 if (len == 0) /* return first area entry */
480 area = oa;
481 else if (exact && ntohl (oa->area_id) == ntohl (area_id))
482 area = oa;
483 else if (ntohl (oa->area_id) > ntohl (area_id))
484 area = oa;
485 }
486 }
487
488 if (area == NULL)
489 return NULL;
490
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200491 *length = v->namelen + 1;
492 name[v->namelen] = ntohl (area->area_id);
hassoef1bbf52004-10-08 12:04:21 +0000493
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200494 inet_ntop (AF_INET, &area->area_id, a, sizeof (a));
Andrew J. Schorreda9ba72007-04-27 18:13:15 +0000495 zlog_debug ("SNMP found area: %s, exact=%d len=%d length=%lu",
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200496 a, exact, len, (u_long)*length);
hassoef1bbf52004-10-08 12:04:21 +0000497
498 switch (v->magic)
499 {
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200500 case OSPFv3IMPORTASEXTERN:
hassoef1bbf52004-10-08 12:04:21 +0000501 return SNMP_INTEGER (ospf6->external_table->count);
502 break;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200503 case OSPFv3AREASPFRUNS:
504 case OSPFv3AREABDRRTRCOUNT:
505 case OSPFv3AREAASBDRRTRCOUNT:
506 case OSPFv3AREASCOPELSACOUNT:
507 case OSPFv3AREASCOPELSACKSUMSUM:
508 case OSPFv3AREASUMMARY:
509 case OSPFv3AREAROWSTATUS:
510 case OSPFv3AREASTUBMETRIC:
511 case OSPFv3AREANSSATRANSLATORROLE:
512 case OSPFv3AREANSSATRANSLATORSTATE:
513 case OSPFv3AREANSSATRANSLATORSTABINTERVAL:
514 case OSPFv3AREANSSATRANSLATOREVENTS:
515 case OSPFv3AREASTUBMETRICTYPE:
516 case OSPFv3AREATEENABLED:
517 /* Not implemented. */
hassoef1bbf52004-10-08 12:04:21 +0000518 return NULL;
hassoef1bbf52004-10-08 12:04:21 +0000519 }
520 return NULL;
521}
522
hasso2680aa22004-11-25 20:54:46 +0000523static u_char *
524ospfv3AreaLsdbEntry (struct variable *v, oid *name, size_t *length,
525 int exact, size_t *var_len, WriteMethod **write_method)
526{
527 struct ospf6_lsa *lsa = NULL;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200528 u_int32_t area_id, id, adv_router;
hasso2680aa22004-11-25 20:54:46 +0000529 u_int16_t type;
hasso2680aa22004-11-25 20:54:46 +0000530 int len;
531 oid *offset;
532 int offsetlen;
533 char a[16], b[16], c[16];
534 struct ospf6_area *oa;
hassob3c8c462004-11-26 12:55:51 +0000535 struct listnode *node;
hasso2680aa22004-11-25 20:54:46 +0000536
Vincent Bernat8046ba62012-05-31 13:30:28 +0200537 if (smux_header_table(v, name, length, exact, var_len, write_method)
538 == MATCH_FAILED)
539 return NULL;
540
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200541 area_id = type = id = adv_router = 0;
hasso2680aa22004-11-25 20:54:46 +0000542
543 /* Check OSPFv3 instance. */
544 if (ospf6 == NULL)
545 return NULL;
546
547 /* Get variable length. */
548 offset = name + v->namelen;
549 offsetlen = *length - v->namelen;
550
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200551#define OSPFV3_AREA_LSDB_ENTRY_EXACT_OFFSET 4
hasso2680aa22004-11-25 20:54:46 +0000552
553 if (exact && offsetlen != OSPFV3_AREA_LSDB_ENTRY_EXACT_OFFSET)
554 return NULL;
555
556 /* Parse area-id */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200557 len = (offsetlen < 1 ? 0 : 1);
hasso2680aa22004-11-25 20:54:46 +0000558 if (len)
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200559 area_id = htonl (*offset);
hasso2680aa22004-11-25 20:54:46 +0000560 offset += len;
561 offsetlen -= len;
562
563 /* Parse type */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200564 len = (offsetlen < 1 ? 0 : 1);
hasso2680aa22004-11-25 20:54:46 +0000565 if (len)
566 type = htons (*offset);
567 offset += len;
568 offsetlen -= len;
569
570 /* Parse Router-ID */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200571 len = (offsetlen < 1 ? 0 : 1);
hasso2680aa22004-11-25 20:54:46 +0000572 if (len)
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200573 adv_router = htonl (*offset);
hasso2680aa22004-11-25 20:54:46 +0000574 offset += len;
575 offsetlen -= len;
576
577 /* Parse LS-ID */
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200578 len = (offsetlen < 1 ? 0 : 1);
hasso2680aa22004-11-25 20:54:46 +0000579 if (len)
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200580 id = htonl (*offset);
hasso2680aa22004-11-25 20:54:46 +0000581 offset += len;
582 offsetlen -= len;
583
584 inet_ntop (AF_INET, &area_id, a, sizeof (a));
585 inet_ntop (AF_INET, &adv_router, b, sizeof (b));
586 inet_ntop (AF_INET, &id, c, sizeof (c));
Andrew J. Schorreda9ba72007-04-27 18:13:15 +0000587 zlog_debug ("SNMP access by lsdb: area=%s exact=%d length=%lu magic=%d"
hassoc6487d62004-12-24 06:00:11 +0000588 " type=%#x adv_router=%s id=%s",
Andrew J. Schorreda9ba72007-04-27 18:13:15 +0000589 a, exact, (u_long)*length, v->magic, ntohs (type), b, c);
hasso2680aa22004-11-25 20:54:46 +0000590
591 if (exact)
592 {
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200593 oa = ospf6_area_lookup (area_id, ospf6);
594 lsa = ospf6_lsdb_lookup (type, id, adv_router, oa->lsdb);
hasso2680aa22004-11-25 20:54:46 +0000595 }
596 else
597 {
paul1eb8ef22005-04-07 07:30:20 +0000598 for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
hasso2680aa22004-11-25 20:54:46 +0000599 {
hasso2680aa22004-11-25 20:54:46 +0000600 if (lsa)
601 continue;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200602 if (oa->area_id < area_id)
hasso2680aa22004-11-25 20:54:46 +0000603 continue;
604
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200605 lsa = ospf6_lsdb_lookup_next (type, id, adv_router,
hasso2680aa22004-11-25 20:54:46 +0000606 oa->lsdb);
607 if (! lsa)
608 {
609 type = 0;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200610 id = 0;
611 adv_router = 0;
hasso2680aa22004-11-25 20:54:46 +0000612 }
613 }
614 }
615
616 if (! lsa)
617 {
hassoc6487d62004-12-24 06:00:11 +0000618 zlog_debug ("SNMP respond: No LSA to return");
hasso2680aa22004-11-25 20:54:46 +0000619 return NULL;
620 }
621 oa = OSPF6_AREA (lsa->lsdb->data);
622
hassoc6487d62004-12-24 06:00:11 +0000623 zlog_debug ("SNMP respond: area: %s lsa: %s", oa->name, lsa->name);
hasso2680aa22004-11-25 20:54:46 +0000624
625 /* Add Index (AreaId, Type, RouterId, Lsid) */
626 *length = v->namelen + OSPFV3_AREA_LSDB_ENTRY_EXACT_OFFSET;
627 offset = name + v->namelen;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200628 *offset = ntohl (oa->area_id);
629 offset++;
hasso2680aa22004-11-25 20:54:46 +0000630 *offset = ntohs (lsa->header->type);
631 offset++;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200632 *offset = ntohl (lsa->header->adv_router);
633 offset++;
634 *offset = ntohl (lsa->header->id);
635 offset++;
hasso2680aa22004-11-25 20:54:46 +0000636
637 /* Return the current value of the variable */
638 switch (v->magic)
639 {
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200640 case OSPFv3AREALSDBSEQUENCE:
641 return SNMP_INTEGER (ntohl (lsa->header->seqnum));
hasso2680aa22004-11-25 20:54:46 +0000642 break;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200643 case OSPFv3AREALSDBAGE:
hasso2680aa22004-11-25 20:54:46 +0000644 ospf6_lsa_age_current (lsa);
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200645 return SNMP_INTEGER (ntohs (lsa->header->age));
hasso2680aa22004-11-25 20:54:46 +0000646 break;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200647 case OSPFv3AREALSDBCHECKSUM:
648 return SNMP_INTEGER (ntohs (lsa->header->checksum));
hasso2680aa22004-11-25 20:54:46 +0000649 break;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200650 case OSPFv3AREALSDBADVERTISEMENT:
hasso2680aa22004-11-25 20:54:46 +0000651 *var_len = ntohs (lsa->header->length);
652 return (u_char *) lsa->header;
653 break;
Vincent Bernat0f0ab512012-05-22 13:34:24 +0200654 case OSPFv3AREALSDBTYPEKNOWN:
hasso2680aa22004-11-25 20:54:46 +0000655 return SNMP_INTEGER (OSPF6_LSA_IS_KNOWN (lsa->header->type) ?
656 SNMP_TRUE : SNMP_FALSE);
657 break;
hasso2680aa22004-11-25 20:54:46 +0000658 }
659 return NULL;
660}
661
Vincent Bernat061bc732012-05-31 20:21:15 +0200662static int
663if_icmp_func (struct interface *ifp1, struct interface *ifp2)
664{
665 return (ifp1->ifindex - ifp2->ifindex);
666}
667
668static u_char *
669ospfv3NbrEntry (struct variable *v, oid *name, size_t *length,
670 int exact, size_t *var_len, WriteMethod **write_method)
671{
672 unsigned int ifindex, instid, rtrid;
673 struct ospf6_interface *oi = NULL;
674 struct ospf6_neighbor *on = NULL;
675 struct interface *iif;
676 struct listnode *i, *j;
677 struct list *ifslist;
678 oid *offset;
679 int offsetlen, len;
680
681 if (smux_header_table (v, name, length, exact, var_len, write_method)
682 == MATCH_FAILED)
683 return NULL;
684
685 ifindex = instid = rtrid = 0;
686
687 /* Check OSPFv3 instance. */
688 if (ospf6 == NULL)
689 return NULL;
690
691 /* Get variable length. */
692 offset = name + v->namelen;
693 offsetlen = *length - v->namelen;
694
695 if (exact && offsetlen != 3)
696 return NULL;
697
698 /* Parse if index */
699 len = (offsetlen < 1 ? 0 : 1);
700 if (len)
701 ifindex = *offset;
702 offset += len;
703 offsetlen -= len;
704
705 /* Parse instance ID */
706 len = (offsetlen < 1 ? 0 : 1);
707 if (len)
708 instid = *offset;
709 offset += len;
710 offsetlen -= len;
711
712 /* Parse router ID */
713 len = (offsetlen < 1 ? 0 : 1);
714 if (len)
715 rtrid = htonl (*offset);
716 offset += len;
717 offsetlen -= len;
718
719 if (exact)
720 {
721 oi = ospf6_interface_lookup_by_ifindex (ifindex);
722 on = ospf6_neighbor_lookup (rtrid, oi);
723 if (oi->instance_id != instid) return NULL;
724 }
725 else
726 {
727 /* We build a sorted list of interfaces */
728 ifslist = list_new ();
729 if (!ifslist) return NULL;
730 ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
731 for (ALL_LIST_ELEMENTS_RO (iflist, i, iif))
732 listnode_add_sort (ifslist, iif);
733
734 for (ALL_LIST_ELEMENTS_RO (ifslist, i, iif))
735 {
736 if (!iif->ifindex) continue;
737 oi = ospf6_interface_lookup_by_ifindex (iif->ifindex);
738 if (!oi) continue;
739 for (ALL_LIST_ELEMENTS_RO (oi->neighbor_list, j, on)) {
740 if (iif->ifindex > ifindex ||
741 (iif->ifindex == ifindex &&
742 (oi->instance_id > instid ||
743 (oi->instance_id == instid &&
744 ntohl (on->router_id) > ntohl (rtrid)))))
745 break;
746 }
747 if (on) break;
748 oi = on = NULL;
749 }
750
751 list_delete_all_node (ifslist);
752 }
753
754 if (!oi || !on) return NULL;
755
756 /* Add Index (IfIndex, IfInstId, RtrId) */
757 *length = v->namelen + 3;
758 offset = name + v->namelen;
759 *offset = oi->interface->ifindex;
760 offset++;
761 *offset = oi->instance_id;
762 offset++;
763 *offset = ntohl (on->router_id);
764 offset++;
765
766 /* Return the current value of the variable */
767 switch (v->magic)
768 {
769 case OSPFv3NBRADDRESSTYPE:
770 return SNMP_INTEGER (2); /* IPv6 only */
771 case OSPFv3NBRADDRESS:
772 *var_len = sizeof (struct in6_addr);
773 return (u_char *) &on->linklocal_addr;
774 case OSPFv3NBROPTIONS:
775 return SNMP_INTEGER (on->options[2]);
776 case OSPFv3NBRPRIORITY:
777 return SNMP_INTEGER (on->priority);
778 case OSPFv3NBRSTATE:
779 return SNMP_INTEGER (on->state);
780 case OSPFv3NBREVENTS:
781 return SNMP_INTEGER (on->state_change);
782 case OSPFv3NBRLSRETRANSQLEN:
783 return SNMP_INTEGER (on->retrans_list->count);
784 case OSPFv3NBRHELLOSUPPRESSED:
785 return SNMP_INTEGER (SNMP_FALSE);
786 case OSPFv3NBRIFID:
787 return SNMP_INTEGER (on->ifindex);
788 case OSPFv3NBRRESTARTHELPERSTATUS:
789 case OSPFv3NBRRESTARTHELPERAGE:
790 case OSPFv3NBRRESTARTHELPEREXITREASON:
791 /* Not implemented. Only works if all the last ones are not
792 implemented! */
793 return NULL;
794 }
795
796 return NULL;
797}
798
hasso2680aa22004-11-25 20:54:46 +0000799
hassoef1bbf52004-10-08 12:04:21 +0000800/* Register OSPFv3-MIB. */
801void
paul0c083ee2004-10-10 12:54:58 +0000802ospf6_snmp_init (struct thread_master *master)
hassoef1bbf52004-10-08 12:04:21 +0000803{
hassoc75105a2004-10-13 10:33:26 +0000804 smux_init (master);
hassoef1bbf52004-10-08 12:04:21 +0000805 REGISTER_MIB ("OSPFv3MIB", ospfv3_variables, variable, ospfv3_oid);
hassoef1bbf52004-10-08 12:04:21 +0000806}
807
808#endif /* HAVE_SNMP */
809