2 * Copyright (C) 2004 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
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
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.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <net-snmp/net-snmp-config.h>
24 #include <net-snmp/net-snmp-includes.h>
35 #include "ospf6_proto.h"
36 #include "ospf6_lsa.h"
37 #include "ospf6_lsdb.h"
38 #include "ospf6_route.h"
39 #include "ospf6_top.h"
40 #include "ospf6_area.h"
41 #include "ospf6_interface.h"
42 #include "ospf6_message.h"
43 #include "ospf6_neighbor.h"
44 #include "ospf6_abr.h"
45 #include "ospf6_asbr.h"
49 #define OSPFv3MIB 1,3,6,1,2,1,191
51 /* OSPFv3 MIB General Group values. */
52 #define OSPFv3ROUTERID 1
53 #define OSPFv3ADMINSTAT 2
54 #define OSPFv3VERSIONNUMBER 3
55 #define OSPFv3AREABDRRTRSTATUS 4
56 #define OSPFv3ASBDRRTRSTATUS 5
57 #define OSPFv3ASSCOPELSACOUNT 6
58 #define OSPFv3ASSCOPELSACHECKSUMSUM 7
59 #define OSPFv3ORIGINATENEWLSAS 8
60 #define OSPFv3RXNEWLSAS 9
61 #define OSPFv3EXTLSACOUNT 10
62 #define OSPFv3EXTAREALSDBLIMIT 11
63 #define OSPFv3EXITOVERFLOWINTERVAL 12
64 #define OSPFv3DEMANDEXTENSIONS 13
65 #define OSPFv3REFERENCEBANDWIDTH 14
66 #define OSPFv3RESTARTSUPPORT 15
67 #define OSPFv3RESTARTINTERVAL 16
68 #define OSPFv3RESTARTSTRICTLSACHECKING 17
69 #define OSPFv3RESTARTSTATUS 18
70 #define OSPFv3RESTARTAGE 19
71 #define OSPFv3RESTARTEXITREASON 20
72 #define OSPFv3NOTIFICATIONENABLE 21
73 #define OSPFv3STUBROUTERSUPPORT 22
74 #define OSPFv3STUBROUTERADVERTISEMENT 23
75 #define OSPFv3DISCONTINUITYTIME 24
76 #define OSPFv3RESTARTTIME 25
78 /* OSPFv3 MIB Area Table values: ospfv3AreaTable */
79 #define OSPFv3IMPORTASEXTERN 2
80 #define OSPFv3AREASPFRUNS 3
81 #define OSPFv3AREABDRRTRCOUNT 4
82 #define OSPFv3AREAASBDRRTRCOUNT 5
83 #define OSPFv3AREASCOPELSACOUNT 6
84 #define OSPFv3AREASCOPELSACKSUMSUM 7
85 #define OSPFv3AREASUMMARY 8
86 #define OSPFv3AREAROWSTATUS 9
87 #define OSPFv3AREASTUBMETRIC 10
88 #define OSPFv3AREANSSATRANSLATORROLE 11
89 #define OSPFv3AREANSSATRANSLATORSTATE 12
90 #define OSPFv3AREANSSATRANSLATORSTABINTERVAL 13
91 #define OSPFv3AREANSSATRANSLATOREVENTS 14
92 #define OSPFv3AREASTUBMETRICTYPE 15
93 #define OSPFv3AREATEENABLED 16
95 /* OSPFv3 MIB * Lsdb Table values: ospfv3*LsdbTable */
96 #define OSPFv3WWLSDBSEQUENCE 1
97 #define OSPFv3WWLSDBAGE 2
98 #define OSPFv3WWLSDBCHECKSUM 3
99 #define OSPFv3WWLSDBADVERTISEMENT 4
100 #define OSPFv3WWLSDBTYPEKNOWN 5
102 /* Three first bits are to identify column */
103 #define OSPFv3WWCOLUMN 0x7
104 /* Then we use other bits to identify table */
105 #define OSPFv3WWASTABLE (1 << 3)
106 #define OSPFv3WWAREATABLE (1 << 4)
107 #define OSPFv3WWLINKTABLE (1 << 5)
108 #define OSPFv3WWVIRTLINKTABLE (1 << 6)
110 /* OSPFv3 MIB Host Table values: ospfv3HostTable */
111 #define OSPFv3HOSTMETRIC 3
112 #define OSPFv3HOSTROWSTATUS 4
113 #define OSPFv3HOSTAREAID 5
115 /* OSPFv3 MIB Interface Table values: ospfv3IfTable */
116 #define OSPFv3IFAREAID 3
117 #define OSPFv3IFTYPE 4
118 #define OSPFv3IFADMINSTATUS 5
119 #define OSPFv3IFRTRPRIORITY 6
120 #define OSPFv3IFTRANSITDELAY 7
121 #define OSPFv3IFRETRANSINTERVAL 8
122 #define OSPFv3IFHELLOINTERVAL 9
123 #define OSPFv3IFRTRDEADINTERVAL 10
124 #define OSPFv3IFPOLLINTERVAL 11
125 #define OSPFv3IFSTATE 12
126 #define OSPFv3IFDESIGNATEDROUTER 13
127 #define OSPFv3IFBACKUPDESIGNATEDROUTER 14
128 #define OSPFv3IFEVENTS 15
129 #define OSPFv3IFROWSTATUS 16
130 #define OSPFv3IFDEMAND 17
131 #define OSPFv3IFMETRICVALUE 18
132 #define OSPFv3IFLINKSCOPELSACOUNT 19
133 #define OSPFv3IFLINKLSACKSUMSUM 20
134 #define OSPFv3IFDEMANDNBRPROBE 21
135 #define OSPFv3IFDEMANDNBRPROBERETRANSLIMIT 22
136 #define OSPFv3IFDEMANDNBRPROBEINTERVAL 23
137 #define OSPFv3IFTEDISABLED 24
138 #define OSPFv3IFLINKLSASUPPRESSION 25
140 /* OSPFv3 MIB Virtual Interface Table values: ospfv3VirtIfTable */
141 #define OSPFv3VIRTIFINDEX 3
142 #define OSPFv3VIRTIFINSTID 4
143 #define OSPFv3VIRTIFTRANSITDELAY 5
144 #define OSPFv3VIRTIFRETRANSINTERVAL 6
145 #define OSPFv3VIRTIFHELLOINTERVAL 7
146 #define OSPFv3VIRTIFRTRDEADINTERVAL 8
147 #define OSPFv3VIRTIFSTATE 9
148 #define OSPFv3VIRTIFEVENTS 10
149 #define OSPFv3VIRTIFROWSTATUS 11
150 #define OSPFv3VIRTIFLINKSCOPELSACOUNT 12
151 #define OSPFv3VIRTIFLINKLSACKSUMSUM 13
153 /* OSPFv3 MIB Neighbors Table values: ospfv3NbrTable */
154 #define OSPFv3NBRADDRESSTYPE 4
155 #define OSPFv3NBRADDRESS 5
156 #define OSPFv3NBROPTIONS 6
157 #define OSPFv3NBRPRIORITY 7
158 #define OSPFv3NBRSTATE 8
159 #define OSPFv3NBREVENTS 9
160 #define OSPFv3NBRLSRETRANSQLEN 10
161 #define OSPFv3NBRHELLOSUPPRESSED 11
162 #define OSPFv3NBRIFID 12
163 #define OSPFv3NBRRESTARTHELPERSTATUS 13
164 #define OSPFv3NBRRESTARTHELPERAGE 14
165 #define OSPFv3NBRRESTARTHELPEREXITREASON 15
167 /* OSPFv3 MIB Configured Neighbors Table values: ospfv3CfgNbrTable */
168 #define OSPFv3CFGNBRPRIORITY 5
169 #define OSPFv3CFGNBRROWSTATUS 6
171 /* OSPFv3 MIB Virtual Neighbors Table values: ospfv3VirtNbrTable */
172 #define OSPFv3VIRTNBRIFINDEX 3
173 #define OSPFv3VIRTNBRIFINSTID 4
174 #define OSPFv3VIRTNBRADDRESSTYPE 5
175 #define OSPFv3VIRTNBRADDRESS 6
176 #define OSPFv3VIRTNBROPTIONS 7
177 #define OSPFv3VIRTNBRSTATE 8
178 #define OSPFv3VIRTNBREVENTS 9
179 #define OSPFv3VIRTNBRLSRETRANSQLEN 10
180 #define OSPFv3VIRTNBRHELLOSUPPRESSED 11
181 #define OSPFv3VIRTNBRIFID 12
182 #define OSPFv3VIRTNBRRESTARTHELPERSTATUS 13
183 #define OSPFv3VIRTNBRRESTARTHELPERAGE 14
184 #define OSPFv3VIRTNBRRESTARTHELPEREXITREASON 15
186 /* OSPFv3 MIB Area Aggregate Table values: ospfv3AreaAggregateTable */
187 #define OSPFv3AREAAGGREGATEROWSTATUS 6
188 #define OSPFv3AREAAGGREGATEEFFECT 7
189 #define OSPFv3AREAAGGREGATEROUTETAG 8
191 /* SYNTAX Status from OSPF-MIB. */
192 #define OSPF_STATUS_ENABLED 1
193 #define OSPF_STATUS_DISABLED 2
195 /* SNMP value hack. */
196 #define COUNTER ASN_COUNTER
197 #define INTEGER ASN_INTEGER
198 #define GAUGE ASN_GAUGE
199 #define UNSIGNED ASN_UNSIGNED
200 #define TIMETICKS ASN_TIMETICKS
201 #define IPADDRESS ASN_IPADDRESS
202 #define STRING ASN_OCTET_STR
204 /* For return values e.g. SNMP_INTEGER macro */
207 /* OSPFv3-MIB instances. */
208 static oid ospfv3_oid
[] = { OSPFv3MIB
};
209 static oid ospfv3_trap_oid
[] = { OSPFv3MIB
, 0 };
211 /* Hook functions. */
212 static u_char
*ospfv3GeneralGroup (struct variable
*, oid
*, size_t *,
213 int, size_t *, WriteMethod
**);
214 static u_char
*ospfv3AreaEntry (struct variable
*, oid
*, size_t *,
215 int, size_t *, WriteMethod
**);
216 static u_char
*ospfv3WwLsdbEntry (struct variable
*, oid
*, size_t *,
217 int, size_t *, WriteMethod
**);
218 static u_char
*ospfv3NbrEntry (struct variable
*, oid
*, size_t *,
219 int, size_t *, WriteMethod
**);
220 static u_char
*ospfv3IfEntry (struct variable
*, oid
*, size_t *,
221 int, size_t *, WriteMethod
**);
223 static struct variable ospfv3_variables
[] =
225 /* OSPF general variables */
226 {OSPFv3ROUTERID
, UNSIGNED
, RWRITE
, ospfv3GeneralGroup
,
228 {OSPFv3ADMINSTAT
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
230 {OSPFv3VERSIONNUMBER
, INTEGER
, RONLY
, ospfv3GeneralGroup
,
232 {OSPFv3AREABDRRTRSTATUS
, INTEGER
, RONLY
, ospfv3GeneralGroup
,
234 {OSPFv3ASBDRRTRSTATUS
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
236 {OSPFv3ASSCOPELSACOUNT
, GAUGE
, RONLY
, ospfv3GeneralGroup
,
238 {OSPFv3ASSCOPELSACHECKSUMSUM
,UNSIGNED
, RONLY
, ospfv3GeneralGroup
,
240 {OSPFv3ORIGINATENEWLSAS
, COUNTER
, RONLY
, ospfv3GeneralGroup
,
242 {OSPFv3RXNEWLSAS
, COUNTER
, RONLY
, ospfv3GeneralGroup
,
244 {OSPFv3EXTLSACOUNT
, GAUGE
, RONLY
, ospfv3GeneralGroup
,
246 {OSPFv3EXTAREALSDBLIMIT
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
248 {OSPFv3EXITOVERFLOWINTERVAL
, UNSIGNED
, RWRITE
, ospfv3GeneralGroup
,
250 {OSPFv3DEMANDEXTENSIONS
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
252 {OSPFv3REFERENCEBANDWIDTH
, UNSIGNED
, RWRITE
, ospfv3GeneralGroup
,
254 {OSPFv3RESTARTSUPPORT
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
256 {OSPFv3RESTARTINTERVAL
, UNSIGNED
, RWRITE
, ospfv3GeneralGroup
,
258 {OSPFv3RESTARTSTRICTLSACHECKING
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
260 {OSPFv3RESTARTSTATUS
, INTEGER
, RONLY
, ospfv3GeneralGroup
,
262 {OSPFv3RESTARTAGE
, UNSIGNED
, RONLY
, ospfv3GeneralGroup
,
264 {OSPFv3RESTARTEXITREASON
, INTEGER
, RONLY
, ospfv3GeneralGroup
,
266 {OSPFv3NOTIFICATIONENABLE
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
268 {OSPFv3STUBROUTERSUPPORT
, INTEGER
, RONLY
, ospfv3GeneralGroup
,
270 {OSPFv3STUBROUTERADVERTISEMENT
, INTEGER
, RWRITE
, ospfv3GeneralGroup
,
272 {OSPFv3DISCONTINUITYTIME
, TIMETICKS
, RONLY
, ospfv3GeneralGroup
,
274 {OSPFv3RESTARTTIME
, TIMETICKS
, RONLY
, ospfv3GeneralGroup
,
277 /* OSPFv3 Area Data Structure */
278 {OSPFv3IMPORTASEXTERN
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
280 {OSPFv3AREASPFRUNS
, COUNTER
, RONLY
, ospfv3AreaEntry
,
282 {OSPFv3AREABDRRTRCOUNT
, GAUGE
, RONLY
, ospfv3AreaEntry
,
284 {OSPFv3AREAASBDRRTRCOUNT
, GAUGE
, RONLY
, ospfv3AreaEntry
,
286 {OSPFv3AREASCOPELSACOUNT
, GAUGE
, RONLY
, ospfv3AreaEntry
,
288 {OSPFv3AREASCOPELSACKSUMSUM
, UNSIGNED
, RONLY
, ospfv3AreaEntry
,
290 {OSPFv3AREASUMMARY
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
292 {OSPFv3AREAROWSTATUS
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
294 {OSPFv3AREASTUBMETRIC
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
296 {OSPFv3AREANSSATRANSLATORROLE
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
298 {OSPFv3AREANSSATRANSLATORSTATE
, INTEGER
, RONLY
, ospfv3AreaEntry
,
300 {OSPFv3AREANSSATRANSLATORSTABINTERVAL
, UNSIGNED
, RWRITE
, ospfv3AreaEntry
,
302 {OSPFv3AREANSSATRANSLATOREVENTS
, COUNTER
, RONLY
, ospfv3AreaEntry
,
304 {OSPFv3AREASTUBMETRICTYPE
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
306 {OSPFv3AREATEENABLED
, INTEGER
, RWRITE
, ospfv3AreaEntry
,
310 {OSPFv3WWLSDBSEQUENCE
| OSPFv3WWASTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
312 {OSPFv3WWLSDBAGE
| OSPFv3WWASTABLE
, UNSIGNED
, RONLY
, ospfv3WwLsdbEntry
,
314 {OSPFv3WWLSDBCHECKSUM
| OSPFv3WWASTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
316 {OSPFv3WWLSDBADVERTISEMENT
| OSPFv3WWASTABLE
, STRING
, RONLY
, ospfv3WwLsdbEntry
,
318 {OSPFv3WWLSDBTYPEKNOWN
| OSPFv3WWASTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
321 /* OSPFv3 Area LSDB */
322 {OSPFv3WWLSDBSEQUENCE
| OSPFv3WWAREATABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
324 {OSPFv3WWLSDBAGE
| OSPFv3WWAREATABLE
, UNSIGNED
, RONLY
, ospfv3WwLsdbEntry
,
326 {OSPFv3WWLSDBCHECKSUM
| OSPFv3WWAREATABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
328 {OSPFv3WWLSDBADVERTISEMENT
| OSPFv3WWAREATABLE
, STRING
, RONLY
, ospfv3WwLsdbEntry
,
330 {OSPFv3WWLSDBTYPEKNOWN
| OSPFv3WWAREATABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
333 /* OSPFv3 Link LSDB */
334 {OSPFv3WWLSDBSEQUENCE
| OSPFv3WWLINKTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
336 {OSPFv3WWLSDBAGE
| OSPFv3WWLINKTABLE
, UNSIGNED
, RONLY
, ospfv3WwLsdbEntry
,
338 {OSPFv3WWLSDBCHECKSUM
| OSPFv3WWLINKTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
340 {OSPFv3WWLSDBADVERTISEMENT
| OSPFv3WWLINKTABLE
, STRING
, RONLY
, ospfv3WwLsdbEntry
,
342 {OSPFv3WWLSDBTYPEKNOWN
| OSPFv3WWLINKTABLE
, INTEGER
, RONLY
, ospfv3WwLsdbEntry
,
345 /* OSPFv3 interfaces */
346 {OSPFv3IFAREAID
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
348 {OSPFv3IFTYPE
, INTEGER
, RONLY
, ospfv3IfEntry
,
350 {OSPFv3IFADMINSTATUS
, INTEGER
, RONLY
, ospfv3IfEntry
,
352 {OSPFv3IFRTRPRIORITY
, INTEGER
, RONLY
, ospfv3IfEntry
,
354 {OSPFv3IFTRANSITDELAY
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
356 {OSPFv3IFRETRANSINTERVAL
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
358 {OSPFv3IFHELLOINTERVAL
, INTEGER
, RONLY
, ospfv3IfEntry
,
360 {OSPFv3IFRTRDEADINTERVAL
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
362 {OSPFv3IFPOLLINTERVAL
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
364 {OSPFv3IFSTATE
, INTEGER
, RONLY
, ospfv3IfEntry
,
366 {OSPFv3IFDESIGNATEDROUTER
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
368 {OSPFv3IFBACKUPDESIGNATEDROUTER
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
370 {OSPFv3IFEVENTS
, COUNTER
, RONLY
, ospfv3IfEntry
,
372 {OSPFv3IFROWSTATUS
, INTEGER
, RONLY
, ospfv3IfEntry
,
374 {OSPFv3IFDEMAND
, INTEGER
, RONLY
, ospfv3IfEntry
,
376 {OSPFv3IFMETRICVALUE
, INTEGER
, RONLY
, ospfv3IfEntry
,
378 {OSPFv3IFLINKSCOPELSACOUNT
, GAUGE
, RONLY
, ospfv3IfEntry
,
380 {OSPFv3IFLINKLSACKSUMSUM
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
382 {OSPFv3IFDEMANDNBRPROBE
, INTEGER
, RONLY
, ospfv3IfEntry
,
384 {OSPFv3IFDEMANDNBRPROBERETRANSLIMIT
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
386 {OSPFv3IFDEMANDNBRPROBEINTERVAL
, UNSIGNED
, RONLY
, ospfv3IfEntry
,
388 {OSPFv3IFTEDISABLED
, INTEGER
, RONLY
, ospfv3IfEntry
,
390 {OSPFv3IFLINKLSASUPPRESSION
, INTEGER
, RONLY
, ospfv3IfEntry
,
393 /* OSPFv3 neighbors */
394 {OSPFv3NBRADDRESSTYPE
, INTEGER
, RONLY
, ospfv3NbrEntry
,
396 {OSPFv3NBRADDRESS
, STRING
, RONLY
, ospfv3NbrEntry
,
398 {OSPFv3NBROPTIONS
, INTEGER
, RONLY
, ospfv3NbrEntry
,
400 {OSPFv3NBRPRIORITY
, INTEGER
, RONLY
, ospfv3NbrEntry
,
402 {OSPFv3NBRSTATE
, INTEGER
, RONLY
, ospfv3NbrEntry
,
404 {OSPFv3NBREVENTS
, COUNTER
, RONLY
, ospfv3NbrEntry
,
406 {OSPFv3NBRLSRETRANSQLEN
, GAUGE
, RONLY
, ospfv3NbrEntry
,
408 {OSPFv3NBRHELLOSUPPRESSED
, INTEGER
, RONLY
, ospfv3NbrEntry
,
410 {OSPFv3NBRIFID
, INTEGER
, RONLY
, ospfv3NbrEntry
,
412 {OSPFv3NBRRESTARTHELPERSTATUS
, INTEGER
, RONLY
, ospfv3NbrEntry
,
414 {OSPFv3NBRRESTARTHELPERAGE
, UNSIGNED
, RONLY
, ospfv3NbrEntry
,
416 {OSPFv3NBRRESTARTHELPEREXITREASON
, INTEGER
, RONLY
, ospfv3NbrEntry
,
421 ospfv3GeneralGroup (struct variable
*v
, oid
*name
, size_t *length
,
422 int exact
, size_t *var_len
, WriteMethod
**write_method
)
426 struct ospf6_lsa
*lsa
= NULL
;
428 /* Check whether the instance identifier is valid */
429 if (smux_header_generic (v
, name
, length
, exact
, var_len
, write_method
)
433 /* Return the current value of the variable */
437 /* Router-ID of this OSPF instance. */
439 return SNMP_INTEGER (ntohl (ospf6
->router_id
));
440 return SNMP_INTEGER (0);
441 case OSPFv3ADMINSTAT
:
443 return SNMP_INTEGER (CHECK_FLAG (ospf6
->flag
, OSPF6_DISABLED
)?
444 OSPF_STATUS_DISABLED
:OSPF_STATUS_ENABLED
);
445 return SNMP_INTEGER (OSPF_STATUS_DISABLED
);
446 case OSPFv3VERSIONNUMBER
:
447 return SNMP_INTEGER (3);
448 case OSPFv3AREABDRRTRSTATUS
:
450 return SNMP_INTEGER (ospf6_is_router_abr (ospf6
)?SNMP_TRUE
:SNMP_FALSE
);
451 return SNMP_INTEGER (SNMP_FALSE
);
452 case OSPFv3ASBDRRTRSTATUS
:
454 return SNMP_INTEGER (ospf6_asbr_is_asbr (ospf6
)?SNMP_TRUE
:SNMP_FALSE
);
455 return SNMP_INTEGER (SNMP_FALSE
);
456 case OSPFv3ASSCOPELSACOUNT
:
458 return SNMP_INTEGER (ospf6
->lsdb
->count
);
459 return SNMP_INTEGER (0);
460 case OSPFv3ASSCOPELSACHECKSUMSUM
:
463 for (sum
= 0, lsa
= ospf6_lsdb_head (ospf6
->lsdb
);
465 lsa
= ospf6_lsdb_next (lsa
))
466 sum
+= ntohs (lsa
->header
->checksum
);
467 return SNMP_INTEGER (sum
);
469 return SNMP_INTEGER (0);
470 case OSPFv3ORIGINATENEWLSAS
:
471 return SNMP_INTEGER (0); /* Don't know where to get this value... */
472 case OSPFv3RXNEWLSAS
:
473 return SNMP_INTEGER (0); /* Don't know where to get this value... */
474 case OSPFv3EXTLSACOUNT
:
477 for (count
= 0, lsa
= ospf6_lsdb_type_head (htons (OSPF6_LSTYPE_AS_EXTERNAL
),
480 lsa
= ospf6_lsdb_type_next (htons (OSPF6_LSTYPE_AS_EXTERNAL
),
483 return SNMP_INTEGER (count
);
485 return SNMP_INTEGER (0);
486 case OSPFv3EXTAREALSDBLIMIT
:
487 return SNMP_INTEGER (-1);
488 case OSPFv3EXITOVERFLOWINTERVAL
:
489 return SNMP_INTEGER (0); /* Not supported */
490 case OSPFv3DEMANDEXTENSIONS
:
491 return SNMP_INTEGER (0); /* Not supported */
492 case OSPFv3REFERENCEBANDWIDTH
:
494 return SNMP_INTEGER (ospf6
->ref_bandwidth
);
495 /* Otherwise, like for "not implemented". */
496 case OSPFv3RESTARTSUPPORT
:
497 case OSPFv3RESTARTINTERVAL
:
498 case OSPFv3RESTARTSTRICTLSACHECKING
:
499 case OSPFv3RESTARTSTATUS
:
500 case OSPFv3RESTARTAGE
:
501 case OSPFv3RESTARTEXITREASON
:
502 case OSPFv3NOTIFICATIONENABLE
:
503 case OSPFv3STUBROUTERSUPPORT
:
504 case OSPFv3STUBROUTERADVERTISEMENT
:
505 case OSPFv3DISCONTINUITYTIME
:
506 case OSPFv3RESTARTTIME
:
507 /* TODO: Not implemented */
514 ospfv3AreaEntry (struct variable
*v
, oid
*name
, size_t *length
,
515 int exact
, size_t *var_len
, WriteMethod
**write_method
)
517 struct ospf6_area
*oa
, *area
= NULL
;
518 struct ospf6_lsa
*lsa
= NULL
;
519 u_int32_t area_id
= 0;
522 struct listnode
*node
;
525 struct ospf6_route
*ro
;
530 if (smux_header_table(v
, name
, length
, exact
, var_len
, write_method
)
534 len
= *length
- v
->namelen
;
535 len
= (len
>= 1 ? 1 : 0);
536 if (exact
&& len
!= 1)
539 area_id
= htonl (name
[v
->namelen
]);
541 inet_ntop (AF_INET
, &area_id
, a
, sizeof (a
));
542 zlog_debug ("SNMP access by area: %s, exact=%d len=%d length=%lu",
543 a
, exact
, len
, (u_long
)*length
);
545 for (ALL_LIST_ELEMENTS_RO (ospf6
->area_list
, node
, oa
))
549 if (len
== 0) /* return first area entry */
551 else if (exact
&& ntohl (oa
->area_id
) == ntohl (area_id
))
553 else if (ntohl (oa
->area_id
) > ntohl (area_id
))
561 *length
= v
->namelen
+ 1;
562 name
[v
->namelen
] = ntohl (area
->area_id
);
564 inet_ntop (AF_INET
, &area
->area_id
, a
, sizeof (a
));
565 zlog_debug ("SNMP found area: %s, exact=%d len=%d length=%lu",
566 a
, exact
, len
, (u_long
)*length
);
570 case OSPFv3IMPORTASEXTERN
:
571 /* No NSSA support */
572 return SNMP_INTEGER (IS_AREA_STUB(area
)?2:1);
573 case OSPFv3AREASPFRUNS
:
574 return SNMP_INTEGER (area
->spf_calculation
);
575 case OSPFv3AREABDRRTRCOUNT
:
576 case OSPFv3AREAASBDRRTRCOUNT
:
578 for (ro
= ospf6_route_head (ospf6
->brouter_table
); ro
;
579 ro
= ospf6_route_next (ro
))
581 if (ntohl (ro
->path
.area_id
) != ntohl (area
->area_id
)) continue;
582 if (v
->magic
== OSPFv3AREABDRRTRCOUNT
&&
583 CHECK_FLAG (ro
->path
.router_bits
, OSPF6_ROUTER_BIT_B
))
585 if (v
->magic
== OSPFv3AREAASBDRRTRCOUNT
&&
586 CHECK_FLAG (ro
->path
.router_bits
, OSPF6_ROUTER_BIT_E
))
589 return SNMP_INTEGER (count
);
590 case OSPFv3AREASCOPELSACOUNT
:
591 return SNMP_INTEGER (area
->lsdb
->count
);
592 case OSPFv3AREASCOPELSACKSUMSUM
:
593 for (sum
= 0, lsa
= ospf6_lsdb_head (area
->lsdb
);
595 lsa
= ospf6_lsdb_next (lsa
))
596 sum
+= ntohs (lsa
->header
->checksum
);
597 return SNMP_INTEGER (sum
);
598 case OSPFv3AREASUMMARY
:
599 return SNMP_INTEGER (2); /* sendAreaSummary */
600 case OSPFv3AREAROWSTATUS
:
601 return SNMP_INTEGER (1); /* Active */
602 case OSPFv3AREASTUBMETRIC
:
603 case OSPFv3AREANSSATRANSLATORROLE
:
604 case OSPFv3AREANSSATRANSLATORSTATE
:
605 case OSPFv3AREANSSATRANSLATORSTABINTERVAL
:
606 case OSPFv3AREANSSATRANSLATOREVENTS
:
607 case OSPFv3AREASTUBMETRICTYPE
:
608 case OSPFv3AREATEENABLED
:
609 /* Not implemented. */
616 if_icmp_func (struct interface
*ifp1
, struct interface
*ifp2
)
618 return (ifp1
->ifindex
- ifp2
->ifindex
);
622 ospfv3WwLsdbEntry (struct variable
*v
, oid
*name
, size_t *length
,
623 int exact
, size_t *var_len
, WriteMethod
**write_method
)
625 struct ospf6_lsa
*lsa
= NULL
;
627 uint32_t area_id
, id
, instid
, adv_router
;
632 struct ospf6_area
*oa
= NULL
;
633 struct listnode
*node
;
634 struct interface
*iif
;
635 struct ospf6_interface
*oi
= NULL
;
636 struct list
*ifslist
;
638 if (smux_header_table(v
, name
, length
, exact
, var_len
, write_method
)
642 instid
= ifindex
= area_id
= type
= id
= adv_router
= 0;
644 /* Check OSPFv3 instance. */
648 /* Get variable length. */
649 offset
= name
+ v
->namelen
;
650 offsetlen
= *length
- v
->namelen
;
652 if (exact
&& (v
->magic
& OSPFv3WWASTABLE
) && offsetlen
!= 3)
654 if (exact
&& (v
->magic
& OSPFv3WWAREATABLE
) && offsetlen
!= 4)
656 if (exact
&& (v
->magic
& OSPFv3WWLINKTABLE
) && offsetlen
!= 5)
659 if (v
->magic
& OSPFv3WWLINKTABLE
)
662 len
= (offsetlen
< 1 ? 0 : 1);
668 /* Parse instance ID */
669 len
= (offsetlen
< 1 ? 0 : 1);
675 else if (v
->magic
& OSPFv3WWAREATABLE
)
678 len
= (offsetlen
< 1 ? 0 : 1);
680 area_id
= htonl (*offset
);
686 len
= (offsetlen
< 1 ? 0 : 1);
688 type
= htons (*offset
);
692 /* Parse Router-ID */
693 len
= (offsetlen
< 1 ? 0 : 1);
695 adv_router
= htonl (*offset
);
700 len
= (offsetlen
< 1 ? 0 : 1);
702 id
= htonl (*offset
);
708 if (v
->magic
& OSPFv3WWASTABLE
)
710 lsa
= ospf6_lsdb_lookup (type
, id
, adv_router
, ospf6
->lsdb
);
712 else if (v
->magic
& OSPFv3WWAREATABLE
)
714 oa
= ospf6_area_lookup (area_id
, ospf6
);
715 if (!oa
) return NULL
;
716 lsa
= ospf6_lsdb_lookup (type
, id
, adv_router
, oa
->lsdb
);
718 else if (v
->magic
& OSPFv3WWLINKTABLE
)
720 oi
= ospf6_interface_lookup_by_ifindex (ifindex
);
721 if (!oi
|| oi
->instance_id
!= instid
) return NULL
;
722 lsa
= ospf6_lsdb_lookup (type
, id
, adv_router
, oi
->lsdb
);
727 if (v
->magic
& OSPFv3WWASTABLE
)
729 if (ospf6
->lsdb
->count
)
730 lsa
= ospf6_lsdb_lookup_next (type
, id
, adv_router
,
733 else if (v
->magic
& OSPFv3WWAREATABLE
)
734 for (ALL_LIST_ELEMENTS_RO (ospf6
->area_list
, node
, oa
))
736 if (oa
->area_id
< area_id
)
740 lsa
= ospf6_lsdb_lookup_next (type
, id
, adv_router
,
747 else if (v
->magic
& OSPFv3WWLINKTABLE
)
749 /* We build a sorted list of interfaces */
750 ifslist
= list_new ();
751 if (!ifslist
) return NULL
;
752 ifslist
->cmp
= (int (*)(void *, void *))if_icmp_func
;
753 for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT
), node
, iif
))
754 listnode_add_sort (ifslist
, iif
);
756 for (ALL_LIST_ELEMENTS_RO (ifslist
, node
, iif
))
758 if (!iif
->ifindex
) continue;
759 oi
= ospf6_interface_lookup_by_ifindex (iif
->ifindex
);
761 if (iif
->ifindex
< ifindex
) continue;
762 if (oi
->instance_id
< instid
) continue;
765 lsa
= ospf6_lsdb_lookup_next (type
, id
, adv_router
,
774 list_delete_all_node (ifslist
);
782 if (v
->magic
& OSPFv3WWASTABLE
)
784 *length
= v
->namelen
+ 3;
785 offset
= name
+ v
->namelen
;
787 else if (v
->magic
& OSPFv3WWAREATABLE
)
789 *length
= v
->namelen
+ 4;
790 offset
= name
+ v
->namelen
;
791 *offset
= ntohl (oa
->area_id
);
794 else if (v
->magic
& OSPFv3WWLINKTABLE
)
796 *length
= v
->namelen
+ 5;
797 offset
= name
+ v
->namelen
;
798 *offset
= oi
->interface
->ifindex
;
800 *offset
= oi
->instance_id
;
803 *offset
= ntohs (lsa
->header
->type
);
805 *offset
= ntohl (lsa
->header
->adv_router
);
807 *offset
= ntohl (lsa
->header
->id
);
810 /* Return the current value of the variable */
811 switch (v
->magic
& OSPFv3WWCOLUMN
)
813 case OSPFv3WWLSDBSEQUENCE
:
814 return SNMP_INTEGER (ntohl (lsa
->header
->seqnum
));
816 case OSPFv3WWLSDBAGE
:
817 ospf6_lsa_age_current (lsa
);
818 return SNMP_INTEGER (ntohs (lsa
->header
->age
));
820 case OSPFv3WWLSDBCHECKSUM
:
821 return SNMP_INTEGER (ntohs (lsa
->header
->checksum
));
823 case OSPFv3WWLSDBADVERTISEMENT
:
824 *var_len
= ntohs (lsa
->header
->length
);
825 return (u_char
*) lsa
->header
;
827 case OSPFv3WWLSDBTYPEKNOWN
:
828 return SNMP_INTEGER (OSPF6_LSA_IS_KNOWN (lsa
->header
->type
) ?
829 SNMP_TRUE
: SNMP_FALSE
);
836 ospfv3IfEntry (struct variable
*v
, oid
*name
, size_t *length
,
837 int exact
, size_t *var_len
, WriteMethod
**write_method
)
839 ifindex_t ifindex
= 0;
840 unsigned int instid
= 0;
841 struct ospf6_interface
*oi
= NULL
;
842 struct ospf6_lsa
*lsa
= NULL
;
843 struct interface
*iif
;
845 struct list
*ifslist
;
850 if (smux_header_table (v
, name
, length
, exact
, var_len
, write_method
)
854 /* Check OSPFv3 instance. */
858 /* Get variable length. */
859 offset
= name
+ v
->namelen
;
860 offsetlen
= *length
- v
->namelen
;
862 if (exact
&& offsetlen
!= 2)
866 len
= (offsetlen
< 1 ? 0 : 1);
872 /* Parse instance ID */
873 len
= (offsetlen
< 1 ? 0 : 1);
881 oi
= ospf6_interface_lookup_by_ifindex (ifindex
);
882 if (!oi
|| oi
->instance_id
!= instid
) return NULL
;
886 /* We build a sorted list of interfaces */
887 ifslist
= list_new ();
888 if (!ifslist
) return NULL
;
889 ifslist
->cmp
= (int (*)(void *, void *))if_icmp_func
;
890 for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT
), i
, iif
))
891 listnode_add_sort (ifslist
, iif
);
893 for (ALL_LIST_ELEMENTS_RO (ifslist
, i
, iif
))
895 if (!iif
->ifindex
) continue;
896 oi
= ospf6_interface_lookup_by_ifindex (iif
->ifindex
);
898 if (iif
->ifindex
> ifindex
||
899 (iif
->ifindex
== ifindex
&&
900 (oi
->instance_id
> instid
)))
905 list_delete_all_node (ifslist
);
908 if (!oi
) return NULL
;
910 /* Add Index (IfIndex, IfInstId) */
911 *length
= v
->namelen
+ 2;
912 offset
= name
+ v
->namelen
;
913 *offset
= oi
->interface
->ifindex
;
915 *offset
= oi
->instance_id
;
918 /* Return the current value of the variable */
923 return SNMP_INTEGER (ntohl (oi
->area
->area_id
));
926 if (if_is_broadcast (oi
->interface
))
927 return SNMP_INTEGER (1);
928 else if (if_is_pointopoint (oi
->interface
))
929 return SNMP_INTEGER (3);
930 else break; /* Unknown, don't put anything */
931 case OSPFv3IFADMINSTATUS
:
933 return SNMP_INTEGER (OSPF_STATUS_ENABLED
);
934 return SNMP_INTEGER (OSPF_STATUS_DISABLED
);
935 case OSPFv3IFRTRPRIORITY
:
936 return SNMP_INTEGER (oi
->priority
);
937 case OSPFv3IFTRANSITDELAY
:
938 return SNMP_INTEGER (oi
->transdelay
);
939 case OSPFv3IFRETRANSINTERVAL
:
940 return SNMP_INTEGER (oi
->rxmt_interval
);
941 case OSPFv3IFHELLOINTERVAL
:
942 return SNMP_INTEGER (oi
->hello_interval
);
943 case OSPFv3IFRTRDEADINTERVAL
:
944 return SNMP_INTEGER (oi
->dead_interval
);
945 case OSPFv3IFPOLLINTERVAL
:
946 /* No support for NBMA */
949 return SNMP_INTEGER (oi
->state
);
950 case OSPFv3IFDESIGNATEDROUTER
:
951 return SNMP_INTEGER (ntohl (oi
->drouter
));
952 case OSPFv3IFBACKUPDESIGNATEDROUTER
:
953 return SNMP_INTEGER (ntohl (oi
->bdrouter
));
955 return SNMP_INTEGER (oi
->state_change
);
956 case OSPFv3IFROWSTATUS
:
957 return SNMP_INTEGER (1);
959 return SNMP_INTEGER (SNMP_FALSE
);
960 case OSPFv3IFMETRICVALUE
:
961 return SNMP_INTEGER (oi
->cost
);
962 case OSPFv3IFLINKSCOPELSACOUNT
:
963 return SNMP_INTEGER (oi
->lsdb
->count
);
964 case OSPFv3IFLINKLSACKSUMSUM
:
965 for (sum
= 0, lsa
= ospf6_lsdb_head (oi
->lsdb
);
967 lsa
= ospf6_lsdb_next (lsa
))
968 sum
+= ntohs (lsa
->header
->checksum
);
969 return SNMP_INTEGER (sum
);
970 case OSPFv3IFDEMANDNBRPROBE
:
971 case OSPFv3IFDEMANDNBRPROBERETRANSLIMIT
:
972 case OSPFv3IFDEMANDNBRPROBEINTERVAL
:
973 case OSPFv3IFTEDISABLED
:
974 case OSPFv3IFLINKLSASUPPRESSION
:
975 /* Not implemented. Only works if all the last ones are not
980 /* Try an internal getnext. Some columns are missing in this table. */
981 if (!exact
&& (name
[*length
-1] < MAX_SUBID
))
982 return ospfv3IfEntry(v
, name
, length
,
983 exact
, var_len
, write_method
);
988 ospfv3NbrEntry (struct variable
*v
, oid
*name
, size_t *length
,
989 int exact
, size_t *var_len
, WriteMethod
**write_method
)
991 ifindex_t ifindex
= 0;
992 unsigned int instid
, rtrid
;
993 struct ospf6_interface
*oi
= NULL
;
994 struct ospf6_neighbor
*on
= NULL
;
995 struct interface
*iif
;
996 struct listnode
*i
, *j
;
997 struct list
*ifslist
;
1001 if (smux_header_table (v
, name
, length
, exact
, var_len
, write_method
)
1007 /* Check OSPFv3 instance. */
1011 /* Get variable length. */
1012 offset
= name
+ v
->namelen
;
1013 offsetlen
= *length
- v
->namelen
;
1015 if (exact
&& offsetlen
!= 3)
1018 /* Parse if index */
1019 len
= (offsetlen
< 1 ? 0 : 1);
1025 /* Parse instance ID */
1026 len
= (offsetlen
< 1 ? 0 : 1);
1032 /* Parse router ID */
1033 len
= (offsetlen
< 1 ? 0 : 1);
1035 rtrid
= htonl (*offset
);
1041 oi
= ospf6_interface_lookup_by_ifindex (ifindex
);
1042 if (!oi
|| oi
->instance_id
!= instid
) return NULL
;
1043 on
= ospf6_neighbor_lookup (rtrid
, oi
);
1047 /* We build a sorted list of interfaces */
1048 ifslist
= list_new ();
1049 if (!ifslist
) return NULL
;
1050 ifslist
->cmp
= (int (*)(void *, void *))if_icmp_func
;
1051 for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT
), i
, iif
))
1052 listnode_add_sort (ifslist
, iif
);
1054 for (ALL_LIST_ELEMENTS_RO (ifslist
, i
, iif
))
1056 if (!iif
->ifindex
) continue;
1057 oi
= ospf6_interface_lookup_by_ifindex (iif
->ifindex
);
1059 for (ALL_LIST_ELEMENTS_RO (oi
->neighbor_list
, j
, on
)) {
1060 if (iif
->ifindex
> ifindex
||
1061 (iif
->ifindex
== ifindex
&&
1062 (oi
->instance_id
> instid
||
1063 (oi
->instance_id
== instid
&&
1064 ntohl (on
->router_id
) > ntohl (rtrid
)))))
1072 list_delete_all_node (ifslist
);
1075 if (!oi
|| !on
) return NULL
;
1077 /* Add Index (IfIndex, IfInstId, RtrId) */
1078 *length
= v
->namelen
+ 3;
1079 offset
= name
+ v
->namelen
;
1080 *offset
= oi
->interface
->ifindex
;
1082 *offset
= oi
->instance_id
;
1084 *offset
= ntohl (on
->router_id
);
1087 /* Return the current value of the variable */
1090 case OSPFv3NBRADDRESSTYPE
:
1091 return SNMP_INTEGER (2); /* IPv6 only */
1092 case OSPFv3NBRADDRESS
:
1093 *var_len
= sizeof (struct in6_addr
);
1094 return (u_char
*) &on
->linklocal_addr
;
1095 case OSPFv3NBROPTIONS
:
1096 return SNMP_INTEGER (on
->options
[2]);
1097 case OSPFv3NBRPRIORITY
:
1098 return SNMP_INTEGER (on
->priority
);
1099 case OSPFv3NBRSTATE
:
1100 return SNMP_INTEGER (on
->state
);
1101 case OSPFv3NBREVENTS
:
1102 return SNMP_INTEGER (on
->state_change
);
1103 case OSPFv3NBRLSRETRANSQLEN
:
1104 return SNMP_INTEGER (on
->retrans_list
->count
);
1105 case OSPFv3NBRHELLOSUPPRESSED
:
1106 return SNMP_INTEGER (SNMP_FALSE
);
1108 return SNMP_INTEGER (on
->ifindex
);
1109 case OSPFv3NBRRESTARTHELPERSTATUS
:
1110 case OSPFv3NBRRESTARTHELPERAGE
:
1111 case OSPFv3NBRRESTARTHELPEREXITREASON
:
1112 /* Not implemented. Only works if all the last ones are not
1121 #define NBRSTATECHANGE 2
1122 #define IFSTATECHANGE 10
1124 static struct trap_object ospf6NbrTrapList
[] =
1126 {-3, {1, 1, OSPFv3ROUTERID
}},
1127 {4, {1, 9, 1, OSPFv3NBRADDRESSTYPE
}},
1128 {4, {1, 9, 1, OSPFv3NBRADDRESS
}},
1129 {4, {1, 9, 1, OSPFv3NBRSTATE
}}
1132 static struct trap_object ospf6IfTrapList
[] =
1134 {-3, {1, 1, OSPFv3ROUTERID
}},
1135 {4, {1, 7, 1, OSPFv3IFSTATE
}},
1136 {4, {1, 7, 1, OSPFv3IFADMINSTATUS
}},
1137 {4, {1, 7, 1, OSPFv3IFAREAID
}}
1141 ospf6TrapNbrStateChange (struct ospf6_neighbor
*on
,
1142 int next_state
, int prev_state
)
1146 /* Terminal state or regression */
1147 if ((next_state
!= OSPF6_NEIGHBOR_FULL
) &&
1148 (next_state
!= OSPF6_NEIGHBOR_TWOWAY
) &&
1149 (next_state
>= prev_state
))
1152 index
[0] = on
->ospf6_if
->interface
->ifindex
;
1153 index
[1] = on
->ospf6_if
->instance_id
;
1154 index
[2] = ntohl (on
->router_id
);
1156 smux_trap (ospfv3_variables
, sizeof ospfv3_variables
/ sizeof (struct variable
),
1157 ospfv3_trap_oid
, sizeof ospfv3_trap_oid
/ sizeof (oid
),
1158 ospfv3_oid
, sizeof ospfv3_oid
/ sizeof (oid
),
1161 sizeof ospf6NbrTrapList
/ sizeof (struct trap_object
),
1167 ospf6TrapIfStateChange (struct ospf6_interface
*oi
,
1168 int next_state
, int prev_state
)
1172 /* Terminal state or regression */
1173 if ((next_state
!= OSPF6_INTERFACE_POINTTOPOINT
) &&
1174 (next_state
!= OSPF6_INTERFACE_DROTHER
) &&
1175 (next_state
!= OSPF6_INTERFACE_BDR
) &&
1176 (next_state
!= OSPF6_INTERFACE_DR
) &&
1177 (next_state
>= prev_state
))
1180 index
[0] = oi
->interface
->ifindex
;
1181 index
[1] = oi
->instance_id
;
1183 smux_trap (ospfv3_variables
, sizeof ospfv3_variables
/ sizeof (struct variable
),
1184 ospfv3_trap_oid
, sizeof ospfv3_trap_oid
/ sizeof (oid
),
1185 ospfv3_oid
, sizeof ospfv3_oid
/ sizeof (oid
),
1188 sizeof ospf6IfTrapList
/ sizeof (struct trap_object
),
1193 /* Register OSPFv3-MIB. */
1195 ospf6_snmp_init (struct thread_master
*master
)
1198 REGISTER_MIB ("OSPFv3MIB", ospfv3_variables
, variable
, ospfv3_oid
);
1203 ospf6_snmp_module_init (void)
1205 hook_register(ospf6_interface_change
, ospf6TrapIfStateChange
);
1206 hook_register(ospf6_neighbor_change
, ospf6TrapNbrStateChange
);
1207 hook_register(frr_late_init
, ospf6_snmp_init
);
1212 .name
= "ospf6d_snmp",
1213 .version
= FRR_VERSION
,
1214 .description
= "ospf6d AgentX SNMP module",
1215 .init
= ospf6_snmp_module_init
,