]> git.proxmox.com Git - mirror_frr.git/blob - eigrpd/eigrp_snmp.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / eigrpd / eigrp_snmp.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * EIGRP SNMP Support.
4 * Copyright (C) 2013-2014
5 * Authors:
6 * Donnie Savage
7 * Jan Janovic
8 * Matej Perina
9 * Peter Orsag
10 * Peter Paluch
11 */
12
13 #include <zebra.h>
14
15 #ifdef HAVE_SNMP
16 #include <net-snmp/net-snmp-config.h>
17 #include <net-snmp/net-snmp-includes.h>
18
19 #include "thread.h"
20 #include "memory.h"
21 #include "linklist.h"
22 #include "prefix.h"
23 #include "if.h"
24 #include "table.h"
25 #include "sockunion.h"
26 #include "stream.h"
27 #include "log.h"
28 #include "sockopt.h"
29 #include "checksum.h"
30 #include "md5.h"
31 #include "keychain.h"
32 #include "smux.h"
33
34 #include "eigrpd/eigrp_structs.h"
35 #include "eigrpd/eigrpd.h"
36 #include "eigrpd/eigrp_interface.h"
37 #include "eigrpd/eigrp_neighbor.h"
38 #include "eigrpd/eigrp_packet.h"
39 #include "eigrpd/eigrp_zebra.h"
40 #include "eigrpd/eigrp_vty.h"
41 #include "eigrpd/eigrp_dump.h"
42 #include "eigrpd/eigrp_network.h"
43 #include "eigrpd/eigrp_topology.h"
44 #include "eigrpd/eigrp_fsm.h"
45 #include "eigrpd/eigrp_snmp.h"
46
47 struct list *eigrp_snmp_iflist;
48
49 /* Declare static local variables for convenience. */
50 SNMP_LOCAL_VARIABLES
51
52 /* EIGRP-MIB - 1.3.6.1.4.1.9.9.449.1*/
53 #define EIGRPMIB 1,3,6,1,4,1,9,9,449,1
54
55 /* EIGRP-MIB instances. */
56 oid eigrp_oid[] = {EIGRPMIB};
57
58 /* EIGRP VPN entry */
59 #define EIGRPVPNID 1
60 #define EIGRPVPNNAME 2
61
62 /* EIGRP Traffic statistics entry */
63 #define EIGRPASNUMBER 1
64 #define EIGRPNBRCOUNT 2
65 #define EIGRPHELLOSSENT 3
66 #define EIGRPHELLOSRCVD 4
67 #define EIGRPUPDATESSENT 5
68 #define EIGRPUPDATESRCVD 6
69 #define EIGRPQUERIESSENT 7
70 #define EIGRPQUERIESRCVD 8
71 #define EIGRPREPLIESSENT 9
72 #define EIGRPREPLIESRCVD 10
73 #define EIGRPACKSSENT 11
74 #define EIGRPACKSRCVD 12
75 #define EIGRPINPUTQHIGHMARK 13
76 #define EIGRPINPUTQDROPS 14
77 #define EIGRPSIAQUERIESSENT 15
78 #define EIGRPSIAQUERIESRCVD 16
79 #define EIGRPASROUTERIDTYPE 17
80 #define EIGRPASROUTERID 18
81 #define EIGRPTOPOROUTES 19
82 #define EIGRPHEADSERIAL 20
83 #define EIGRPNEXTSERIAL 21
84 #define EIGRPXMITPENDREPLIES 22
85 #define EIGRPXMITDUMMIES 23
86
87 /* EIGRP topology entry */
88 #define EIGRPDESTNETTYPE 1
89 #define EIGRPDESTNET 2
90 #define EIGRPDESTNETPREFIXLEN 4
91 #define EIGRPACTIVE 5
92 #define EIGRPSTUCKINACTIVE 6
93 #define EIGRPDESTSUCCESSORS 7
94 #define EIGRPFDISTANCE 8
95 #define EIGRPROUTEORIGINTYPE 9
96 #define EIGRPROUTEORIGINADDRTYPE 10
97 #define EIGRPROUTEORIGINADDR 11
98 #define EIGRPNEXTHOPADDRESSTYPE 12
99 #define EIGRPNEXTHOPADDRESS 13
100 #define EIGRPNEXTHOPINTERFACE 14
101 #define EIGRPDISTANCE 15
102 #define EIGRPREPORTDISTANCE 16
103
104 /* EIGRP peer entry */
105 #define EIGRPHANDLE 1
106 #define EIGRPPEERADDRTYPE 2
107 #define EIGRPPEERADDR 3
108 #define EIGRPPEERIFINDEX 4
109 #define EIGRPHOLDTIME 5
110 #define EIGRPUPTIME 6
111 #define EIGRPSRTT 7
112 #define EIGRPRTO 8
113 #define EIGRPPKTSENQUEUED 9
114 #define EIGRPLASTSEQ 10
115 #define EIGRPVERSION 11
116 #define EIGRPRETRANS 12
117 #define EIGRPRETRIES 13
118
119 /* EIGRP interface entry */
120 #define EIGRPPEERCOUNT 3
121 #define EIGRPXMITRELIABLEQ 4
122 #define EIGRPXMITUNRELIABLEQ 5
123 #define EIGRPMEANSRTT 6
124 #define EIGRPPACINGRELIABLE 7
125 #define EIGRPPACINGUNRELIABLE 8
126 #define EIGRPMFLOWTIMER 9
127 #define EIGRPPENDINGROUTES 10
128 #define EIGRPHELLOINTERVAL 11
129 #define EIGRPXMITNEXTSERIAL 12
130 #define EIGRPUMCASTS 13
131 #define EIGRPRMCASTS 14
132 #define EIGRPUUCASTS 15
133 #define EIGRPRUCASTS 16
134 #define EIGRPMCASTEXCEPTS 17
135 #define EIGRPCRPKTS 18
136 #define EIGRPACKSSUPPRESSED 19
137 #define EIGRPRETRANSSENT 20
138 #define EIGRPOOSRCVD 21
139 #define EIGRPAUTHMODE 22
140 #define EIGRPAUTHKEYCHAIN 23
141
142 /* SNMP value hack. */
143 #define COUNTER ASN_COUNTER
144 #define INTEGER ASN_INTEGER
145 #define GAUGE ASN_GAUGE
146 #define TIMETICKS ASN_TIMETICKS
147 #define IPADDRESS ASN_IPADDRESS
148 #define STRING ASN_OCTET_STR
149 #define IPADDRESSPREFIXLEN ASN_INTEGER
150 #define IPADDRESSTYPE ASN_INTEGER
151 #define INTERFACEINDEXORZERO ASN_INTEGER
152 #define UINTEGER ASN_UNSIGNED
153
154 /* Hook functions. */
155 static uint8_t *eigrpVpnEntry(struct variable *, oid *, size_t *, int, size_t *,
156 WriteMethod **);
157 static uint8_t *eigrpTraffStatsEntry(struct variable *, oid *, size_t *, int,
158 size_t *, WriteMethod **);
159 static uint8_t *eigrpTopologyEntry(struct variable *, oid *, size_t *, int,
160 size_t *, WriteMethod **);
161 static uint8_t *eigrpPeerEntry(struct variable *, oid *, size_t *, int,
162 size_t *, WriteMethod **);
163 static uint8_t *eigrpInterfaceEntry(struct variable *, oid *, size_t *, int,
164 size_t *, WriteMethod **);
165
166
167 struct variable eigrp_variables[] = {
168 /* EIGRP vpn variables */
169 {EIGRPVPNID, INTEGER, NOACCESS, eigrpVpnEntry, 4, {1, 1, 1, 1}},
170 {EIGRPVPNNAME, STRING, RONLY, eigrpVpnEntry, 4, {1, 1, 1, 2}},
171
172 /* EIGRP traffic stats variables */
173 {EIGRPASNUMBER,
174 UINTEGER,
175 NOACCESS,
176 eigrpTraffStatsEntry,
177 4,
178 {2, 1, 1, 1}},
179 {EIGRPNBRCOUNT, UINTEGER, RONLY, eigrpTraffStatsEntry, 4, {2, 1, 1, 2}},
180 {EIGRPHELLOSSENT,
181 COUNTER,
182 RONLY,
183 eigrpTraffStatsEntry,
184 4,
185 {2, 1, 1, 3}},
186 {EIGRPHELLOSRCVD,
187 COUNTER,
188 RONLY,
189 eigrpTraffStatsEntry,
190 4,
191 {2, 1, 1, 4}},
192 {EIGRPUPDATESSENT,
193 COUNTER,
194 RONLY,
195 eigrpTraffStatsEntry,
196 4,
197 {2, 1, 1, 5}},
198 {EIGRPUPDATESRCVD,
199 COUNTER,
200 RONLY,
201 eigrpTraffStatsEntry,
202 4,
203 {2, 1, 1, 6}},
204 {EIGRPQUERIESSENT,
205 COUNTER,
206 RONLY,
207 eigrpTraffStatsEntry,
208 4,
209 {2, 1, 1, 7}},
210 {EIGRPQUERIESRCVD,
211 COUNTER,
212 RONLY,
213 eigrpTraffStatsEntry,
214 4,
215 {2, 1, 1, 8}},
216 {EIGRPREPLIESSENT,
217 COUNTER,
218 RONLY,
219 eigrpTraffStatsEntry,
220 4,
221 {2, 1, 1, 9}},
222 {EIGRPREPLIESRCVD,
223 COUNTER,
224 RONLY,
225 eigrpTraffStatsEntry,
226 4,
227 {2, 1, 1, 10}},
228 {EIGRPACKSSENT, COUNTER, RONLY, eigrpTraffStatsEntry, 4, {2, 1, 1, 11}},
229 {EIGRPACKSRCVD, COUNTER, RONLY, eigrpTraffStatsEntry, 4, {2, 1, 1, 12}},
230 {EIGRPINPUTQHIGHMARK,
231 INTEGER,
232 RONLY,
233 eigrpTraffStatsEntry,
234 4,
235 {2, 1, 1, 13}},
236 {EIGRPINPUTQDROPS,
237 COUNTER,
238 RONLY,
239 eigrpTraffStatsEntry,
240 4,
241 {2, 1, 1, 14}},
242 {EIGRPSIAQUERIESSENT,
243 COUNTER,
244 RONLY,
245 eigrpTraffStatsEntry,
246 4,
247 {2, 1, 1, 15}},
248 {EIGRPSIAQUERIESRCVD,
249 COUNTER,
250 RONLY,
251 eigrpTraffStatsEntry,
252 4,
253 {2, 1, 1, 16}},
254 {EIGRPASROUTERIDTYPE,
255 IPADDRESSTYPE,
256 RONLY,
257 eigrpTraffStatsEntry,
258 4,
259 {2, 1, 1, 17}},
260 {EIGRPASROUTERID,
261 IPADDRESS,
262 RONLY,
263 eigrpTraffStatsEntry,
264 4,
265 {2, 1, 1, 18}},
266 {EIGRPTOPOROUTES,
267 COUNTER,
268 RONLY,
269 eigrpTraffStatsEntry,
270 4,
271 {2, 1, 1, 19}},
272 {EIGRPHEADSERIAL,
273 COUNTER,
274 RONLY,
275 eigrpTraffStatsEntry,
276 4,
277 {2, 1, 1, 20}},
278 {EIGRPNEXTSERIAL,
279 COUNTER,
280 RONLY,
281 eigrpTraffStatsEntry,
282 4,
283 {2, 1, 1, 21}},
284 {EIGRPXMITPENDREPLIES,
285 INTEGER,
286 RONLY,
287 eigrpTraffStatsEntry,
288 4,
289 {2, 1, 1, 22}},
290 {EIGRPXMITDUMMIES,
291 COUNTER,
292 RONLY,
293 eigrpTraffStatsEntry,
294 4,
295 {2, 1, 1, 23}},
296
297 /* EIGRP topology variables */
298 {EIGRPDESTNETTYPE,
299 IPADDRESSTYPE,
300 NOACCESS,
301 eigrpTopologyEntry,
302 4,
303 {3, 1, 1, 1}},
304 {EIGRPDESTNET,
305 IPADDRESSPREFIXLEN,
306 NOACCESS,
307 eigrpTopologyEntry,
308 4,
309 {3, 1, 1, 2}},
310 {EIGRPDESTNETPREFIXLEN,
311 IPADDRESSTYPE,
312 NOACCESS,
313 eigrpTopologyEntry,
314 4,
315 {3, 1, 1, 4}},
316 {EIGRPACTIVE, INTEGER, RONLY, eigrpTopologyEntry, 4, {3, 1, 1, 5}},
317 {EIGRPSTUCKINACTIVE,
318 INTEGER,
319 RONLY,
320 eigrpTopologyEntry,
321 4,
322 {3, 1, 1, 6}},
323 {EIGRPDESTSUCCESSORS,
324 INTEGER,
325 RONLY,
326 eigrpTopologyEntry,
327 4,
328 {3, 1, 1, 7}},
329 {EIGRPFDISTANCE, INTEGER, RONLY, eigrpTopologyEntry, 4, {3, 1, 1, 8}},
330 {EIGRPROUTEORIGINTYPE,
331 STRING,
332 RONLY,
333 eigrpTopologyEntry,
334 4,
335 {3, 1, 1, 9}},
336 {EIGRPROUTEORIGINADDRTYPE,
337 IPADDRESSTYPE,
338 RONLY,
339 eigrpTopologyEntry,
340 4,
341 {3, 1, 1, 10}},
342 {EIGRPROUTEORIGINADDR,
343 IPADDRESS,
344 RONLY,
345 eigrpTopologyEntry,
346 4,
347 {3, 1, 1, 11}},
348 {EIGRPNEXTHOPADDRESSTYPE,
349 IPADDRESSTYPE,
350 RONLY,
351 eigrpTopologyEntry,
352 4,
353 {3, 1, 1, 12}},
354 {EIGRPNEXTHOPADDRESS,
355 IPADDRESS,
356 RONLY,
357 eigrpTopologyEntry,
358 4,
359 {3, 1, 1, 13}},
360 {EIGRPNEXTHOPINTERFACE,
361 STRING,
362 RONLY,
363 eigrpTopologyEntry,
364 4,
365 {3, 1, 1, 14}},
366 {EIGRPDISTANCE, INTEGER, RONLY, eigrpTopologyEntry, 4, {3, 1, 1, 15}},
367 {EIGRPREPORTDISTANCE,
368 INTEGER,
369 RONLY,
370 eigrpTopologyEntry,
371 4,
372 {3, 1, 1, 16}},
373
374 /* EIGRP peer variables */
375 {EIGRPHANDLE, INTEGER, NOACCESS, eigrpPeerEntry, 4, {4, 1, 1, 1}},
376 {EIGRPPEERADDRTYPE,
377 IPADDRESSTYPE,
378 RONLY,
379 eigrpPeerEntry,
380 4,
381 {4, 1, 1, 2}},
382 {EIGRPPEERADDR, IPADDRESS, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 3}},
383 {EIGRPPEERIFINDEX,
384 INTERFACEINDEXORZERO,
385 RONLY,
386 eigrpPeerEntry,
387 4,
388 {4, 1, 1, 4}},
389 {EIGRPHOLDTIME, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 5}},
390 {EIGRPUPTIME, STRING, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 6}},
391 {EIGRPSRTT, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 7}},
392 {EIGRPRTO, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 8}},
393 {EIGRPPKTSENQUEUED, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 9}},
394 {EIGRPLASTSEQ, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 10}},
395 {EIGRPVERSION, STRING, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 11}},
396 {EIGRPRETRANS, COUNTER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 12}},
397 {EIGRPRETRIES, INTEGER, RONLY, eigrpPeerEntry, 4, {4, 1, 1, 13}},
398
399 /* EIGRP interface variables */
400 {EIGRPPEERCOUNT, GAUGE, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 3}},
401 {EIGRPXMITRELIABLEQ,
402 GAUGE,
403 RONLY,
404 eigrpInterfaceEntry,
405 4,
406 {5, 1, 1, 4}},
407 {EIGRPXMITUNRELIABLEQ,
408 GAUGE,
409 RONLY,
410 eigrpInterfaceEntry,
411 4,
412 {5, 1, 1, 5}},
413 {EIGRPMEANSRTT, INTEGER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 6}},
414 {EIGRPPACINGRELIABLE,
415 INTEGER,
416 RONLY,
417 eigrpInterfaceEntry,
418 4,
419 {5, 1, 1, 7}},
420 {EIGRPPACINGUNRELIABLE,
421 INTEGER,
422 RONLY,
423 eigrpInterfaceEntry,
424 4,
425 {5, 1, 1, 8}},
426 {EIGRPMFLOWTIMER, INTEGER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 9}},
427 {EIGRPPENDINGROUTES,
428 GAUGE,
429 RONLY,
430 eigrpInterfaceEntry,
431 4,
432 {5, 1, 1, 10}},
433 {EIGRPHELLOINTERVAL,
434 INTEGER,
435 RONLY,
436 eigrpInterfaceEntry,
437 4,
438 {5, 1, 1, 11}},
439 {EIGRPXMITNEXTSERIAL,
440 COUNTER,
441 RONLY,
442 eigrpInterfaceEntry,
443 4,
444 {5, 1, 1, 12}},
445 {EIGRPUMCASTS, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 13}},
446 {EIGRPRMCASTS, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 14}},
447 {EIGRPUUCASTS, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 15}},
448 {EIGRPRUCASTS, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 16}},
449 {EIGRPMCASTEXCEPTS,
450 COUNTER,
451 RONLY,
452 eigrpInterfaceEntry,
453 4,
454 {5, 1, 1, 17}},
455 {EIGRPCRPKTS, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 18}},
456 {EIGRPACKSSUPPRESSED,
457 COUNTER,
458 RONLY,
459 eigrpInterfaceEntry,
460 4,
461 {5, 1, 1, 19}},
462 {EIGRPRETRANSSENT,
463 COUNTER,
464 RONLY,
465 eigrpInterfaceEntry,
466 4,
467 {5, 1, 1, 20}},
468 {EIGRPOOSRCVD, COUNTER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 21}},
469 {EIGRPAUTHMODE, INTEGER, RONLY, eigrpInterfaceEntry, 4, {5, 1, 1, 22}},
470 {EIGRPAUTHKEYCHAIN,
471 STRING,
472 RONLY,
473 eigrpInterfaceEntry,
474 4,
475 {5, 1, 1, 23}}};
476
477 static struct eigrp_neighbor *eigrp_snmp_nbr_lookup(struct eigrp *eigrp,
478 struct in_addr *nbr_addr,
479 unsigned int *ifindex)
480 {
481 struct listnode *node, *nnode, *node2, *nnode2;
482 struct eigrp_interface *ei;
483 struct eigrp_neighbor *nbr;
484
485 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode, ei)) {
486 for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) {
487 if (IPV4_ADDR_SAME(&nbr->src, nbr_addr)) {
488 return nbr;
489 }
490 }
491 }
492 return NULL;
493 }
494
495 static struct eigrp_neighbor *
496 eigrp_snmp_nbr_lookup_next(struct in_addr *nbr_addr, unsigned int *ifindex,
497 int first)
498 {
499 struct listnode *node, *nnode, *node2, *nnode2;
500 struct eigrp_interface *ei;
501 struct eigrp_neighbor *nbr;
502 struct eigrp_neighbor *min = NULL;
503 struct eigrp *eigrp;
504
505 eigrp = eigrp_lookup();
506
507 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode, ei)) {
508 for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) {
509 if (first) {
510 if (!min)
511 min = nbr;
512 else if (ntohl(nbr->src.s_addr)
513 < ntohl(min->src.s_addr))
514 min = nbr;
515 } else if (ntohl(nbr->src.s_addr)
516 > ntohl(nbr_addr->s_addr)) {
517 if (!min)
518 min = nbr;
519 else if (ntohl(nbr->src.s_addr)
520 < ntohl(min->src.s_addr))
521 min = nbr;
522 }
523 }
524 }
525 if (min) {
526 *nbr_addr = min->src;
527 *ifindex = 0;
528 return min;
529 }
530 return NULL;
531 }
532
533 static struct eigrp_neighbor *eigrpNbrLookup(struct variable *v, oid *name,
534 size_t *length,
535 struct in_addr *nbr_addr,
536 unsigned int *ifindex, int exact)
537 {
538 unsigned int len;
539 int first;
540 struct eigrp_neighbor *nbr;
541 struct eigrp *eigrp;
542
543 eigrp = eigrp_lookup();
544
545 if (!eigrp)
546 return NULL;
547
548 if (exact) {
549 if (*length != v->namelen + IN_ADDR_SIZE + 1)
550 return NULL;
551
552 oid2in_addr(name + v->namelen, IN_ADDR_SIZE, nbr_addr);
553 *ifindex = name[v->namelen + IN_ADDR_SIZE];
554
555 return eigrp_snmp_nbr_lookup(eigrp, nbr_addr, ifindex);
556 } else {
557 first = 0;
558 len = *length - v->namelen;
559
560 if (len == 0)
561 first = 1;
562
563 if (len > IN_ADDR_SIZE)
564 len = IN_ADDR_SIZE;
565
566 oid2in_addr(name + v->namelen, len, nbr_addr);
567
568 len = *length - v->namelen - IN_ADDR_SIZE;
569 if (len >= 1)
570 *ifindex = name[v->namelen + IN_ADDR_SIZE];
571
572 nbr = eigrp_snmp_nbr_lookup_next(nbr_addr, ifindex, first);
573
574 if (nbr) {
575 *length = v->namelen + IN_ADDR_SIZE + 1;
576 oid_copy_in_addr(name + v->namelen, nbr_addr);
577 name[v->namelen + IN_ADDR_SIZE] = *ifindex;
578 return nbr;
579 }
580 }
581 return NULL;
582 }
583
584
585 static uint8_t *eigrpVpnEntry(struct variable *v, oid *name, size_t *length,
586 int exact, size_t *var_len,
587 WriteMethod **write_method)
588 {
589 struct eigrp *eigrp;
590
591 eigrp = eigrp_lookup();
592
593 /* Check whether the instance identifier is valid */
594 if (smux_header_generic(v, name, length, exact, var_len, write_method)
595 == MATCH_FAILED)
596 return NULL;
597
598 /* Return the current value of the variable */
599 switch (v->magic) {
600 case EIGRPVPNID: /* 1 */
601 /* The unique VPN identifier */
602 if (eigrp) {
603 return SNMP_INTEGER(1);
604 } else
605 return SNMP_INTEGER(0);
606 case EIGRPVPNNAME: /* 2 */
607 /* The name given to the VPN */
608 if (eigrp) {
609 return SNMP_INTEGER(1);
610 } else
611 return SNMP_INTEGER(0);
612 default:
613 return NULL;
614 }
615 return NULL;
616 }
617
618 static uint32_t eigrp_neighbor_count(struct eigrp *eigrp)
619 {
620 uint32_t count;
621 struct eigrp_interface *ei;
622 struct listnode *node, *node2, *nnode2;
623 struct eigrp_neighbor *nbr;
624
625 if (eigrp == NULL) {
626 return 0;
627 }
628
629 count = 0;
630 for (ALL_LIST_ELEMENTS_RO(eigrp->eiflist, node, ei)) {
631 for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) {
632 if (nbr->state == EIGRP_NEIGHBOR_UP)
633 count++;
634 }
635 }
636
637 return count;
638 }
639
640
641 static uint8_t *eigrpTraffStatsEntry(struct variable *v, oid *name,
642 size_t *length, int exact, size_t *var_len,
643 WriteMethod **write_method)
644 {
645 struct eigrp *eigrp;
646 struct eigrp_interface *ei;
647 struct listnode *node, *nnode;
648 int counter;
649
650 eigrp = eigrp_lookup();
651
652 /* Check whether the instance identifier is valid */
653 if (smux_header_generic(v, name, length, exact, var_len, write_method)
654 == MATCH_FAILED)
655 return NULL;
656
657 /* Return the current value of the variable */
658 switch (v->magic) {
659 case EIGRPASNUMBER: /* 1 */
660 /* AS-number of this EIGRP instance. */
661 if (eigrp)
662 return SNMP_INTEGER(eigrp->AS);
663 else
664 return SNMP_INTEGER(0);
665 case EIGRPNBRCOUNT: /* 2 */
666 /* Neighbor count of this EIGRP instance */
667 if (eigrp)
668 return SNMP_INTEGER(eigrp_neighbor_count(eigrp));
669 else
670 return SNMP_INTEGER(0);
671 case EIGRPHELLOSSENT: /* 3 */
672 /* Hello packets output count */
673 if (eigrp) {
674 counter = 0;
675 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
676 ei)) {
677 counter += ei->hello_out;
678 }
679 return SNMP_INTEGER(counter);
680 } else
681 return SNMP_INTEGER(0);
682 case EIGRPHELLOSRCVD: /* 4 */
683 /* Hello packets input count */
684 if (eigrp) {
685 counter = 0;
686 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
687 ei)) {
688 counter += ei->hello_in;
689 }
690 return SNMP_INTEGER(counter);
691 } else
692 return SNMP_INTEGER(0);
693 case EIGRPUPDATESSENT: /* 5 */
694 /* Update packets output count */
695 if (eigrp) {
696 counter = 0;
697 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
698 ei)) {
699 counter += ei->update_out;
700 }
701 return SNMP_INTEGER(counter);
702 } else
703 return SNMP_INTEGER(0);
704 case EIGRPUPDATESRCVD: /* 6 */
705 /* Update packets input count */
706 if (eigrp) {
707 counter = 0;
708 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
709 ei)) {
710 counter += ei->update_in;
711 }
712 return SNMP_INTEGER(counter);
713 } else
714 return SNMP_INTEGER(0);
715 case EIGRPQUERIESSENT: /* 7 */
716 /* Querry packets output count */
717 if (eigrp) {
718 counter = 0;
719 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
720 ei)) {
721 counter += ei->query_out;
722 }
723 return SNMP_INTEGER(counter);
724 } else
725 return SNMP_INTEGER(0);
726 case EIGRPQUERIESRCVD: /* 8 */
727 /* Querry packets input count */
728 if (eigrp) {
729 counter = 0;
730 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
731 ei)) {
732 counter += ei->query_in;
733 }
734 return SNMP_INTEGER(counter);
735 } else
736 return SNMP_INTEGER(0);
737 case EIGRPREPLIESSENT: /* 9 */
738 /* Reply packets output count */
739 if (eigrp) {
740 counter = 0;
741 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
742 ei)) {
743 counter += ei->reply_out;
744 }
745 return SNMP_INTEGER(counter);
746 } else
747 return SNMP_INTEGER(0);
748 case EIGRPREPLIESRCVD: /* 10 */
749 /* Reply packets input count */
750 if (eigrp) {
751 counter = 0;
752 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
753 ei)) {
754 counter += ei->reply_in;
755 }
756 return SNMP_INTEGER(counter);
757 } else
758 return SNMP_INTEGER(0);
759 case EIGRPACKSSENT: /* 11 */
760 /* Acknowledgement packets output count */
761 if (eigrp) {
762 counter = 0;
763 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
764 ei)) {
765 counter += ei->ack_out;
766 }
767 return SNMP_INTEGER(counter);
768 } else
769 return SNMP_INTEGER(0);
770 case EIGRPACKSRCVD: /* 12 */
771 /* Acknowledgement packets input count */
772 if (eigrp) {
773 counter = 0;
774 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
775 ei)) {
776 counter += ei->ack_in;
777 }
778 return SNMP_INTEGER(counter);
779 } else
780 return SNMP_INTEGER(0);
781 case EIGRPINPUTQHIGHMARK: /* 13 */
782 /* The highest number of EIGRP packets in the input queue */
783 if (eigrp) {
784 return SNMP_INTEGER(1);
785 } else
786 return SNMP_INTEGER(0);
787 case EIGRPINPUTQDROPS: /* 14 */
788 /* The number of EIGRP packets dropped from the input queue */
789 if (eigrp) {
790 return SNMP_INTEGER(1);
791 } else
792 return SNMP_INTEGER(0);
793 case EIGRPSIAQUERIESSENT: /* 15 */
794 /* SIA querry packets output count */
795 if (eigrp) {
796 counter = 0;
797 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
798 ei)) {
799 counter += ei->siaQuery_out;
800 }
801 return SNMP_INTEGER(counter);
802 } else
803 return SNMP_INTEGER(0);
804 case EIGRPSIAQUERIESRCVD: /* 16 */
805 /* SIA querry packets input count */
806 if (eigrp) {
807 counter = 0;
808 for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode,
809 ei)) {
810 counter += ei->siaQuery_in;
811 }
812 return SNMP_INTEGER(counter);
813 } else
814 return SNMP_INTEGER(0);
815 case EIGRPASROUTERIDTYPE: /* 17 */
816 /* Whether the router ID is set manually or automatically */
817 if (eigrp)
818 if (eigrp->router_id_static != 0)
819 return SNMP_INTEGER(1);
820 else
821 return SNMP_INTEGER(1);
822 else
823 return SNMP_INTEGER(0);
824 case EIGRPASROUTERID: /* 18 */
825 /* Router ID for this EIGRP AS */
826 if (eigrp)
827 if (eigrp->router_id_static != 0)
828 return SNMP_INTEGER(eigrp->router_id_static);
829 else
830 return SNMP_INTEGER(eigrp->router_id);
831 else
832 return SNMP_INTEGER(0);
833 case EIGRPTOPOROUTES: /* 19 */
834 /* The total number of EIGRP derived routes currently existing
835 in the topology table for the AS */
836 if (eigrp) {
837 return SNMP_INTEGER(1);
838 } else
839 return SNMP_INTEGER(0);
840 case EIGRPHEADSERIAL: /* 20 */
841 /* The serial number of the first route in the internal
842 sequence for an AS*/
843 if (eigrp) {
844 return SNMP_INTEGER(1);
845 } else
846 return SNMP_INTEGER(0);
847 case EIGRPNEXTSERIAL: /* 21 */
848 /* The serial number that would be assigned to the next new
849 or changed route in the topology table for the AS*/
850 if (eigrp) {
851 return SNMP_INTEGER(1);
852 } else
853 return SNMP_INTEGER(0);
854 case EIGRPXMITPENDREPLIES: /* 22 */
855 /* Total number of outstanding replies expected to queries
856 that have been sent to peers in the current AS*/
857 if (eigrp) {
858 return SNMP_INTEGER(1);
859 } else
860 return SNMP_INTEGER(0);
861 case EIGRPXMITDUMMIES: /* 23 */
862 /* Total number of currently existing dummies associated with
863 * the AS*/
864 if (eigrp) {
865 return SNMP_INTEGER(1);
866 } else
867 return SNMP_INTEGER(0);
868 default:
869 return NULL;
870 }
871 return NULL;
872 }
873
874 static uint8_t *eigrpTopologyEntry(struct variable *v, oid *name,
875 size_t *length, int exact, size_t *var_len,
876 WriteMethod **write_method)
877 {
878 struct eigrp *eigrp;
879
880 eigrp = eigrp_lookup();
881
882 /* Check whether the instance identifier is valid */
883 if (smux_header_generic(v, name, length, exact, var_len, write_method)
884 == MATCH_FAILED)
885 return NULL;
886
887 /* Return the current value of the variable */
888 switch (v->magic) {
889 case EIGRPDESTNETTYPE: /* 1 */
890 /* The format of the destination IP network number for a single
891 route in the topology table*/
892 if (eigrp) {
893 return SNMP_INTEGER(1);
894 } else
895 return SNMP_INTEGER(0);
896 case EIGRPDESTNET: /* 2 */
897 /* The destination IP network number for a single route in the
898 * topology table*/
899 if (eigrp) {
900 return SNMP_INTEGER(1);
901 } else
902 return SNMP_INTEGER(0);
903 case EIGRPDESTNETPREFIXLEN: /* 4 */
904 /* The prefix length associated with the destination IP network
905 address
906 for a single route in the topology table in the AS*/
907 if (eigrp) {
908 return SNMP_INTEGER(1);
909 } else
910 return SNMP_INTEGER(0);
911 case EIGRPACTIVE: /* 5 */
912 /* A value of true(1) indicates the route to the destination
913 network has failed
914 A value of false(2) indicates the route is stable
915 (passive).*/
916 if (eigrp) {
917 return SNMP_INTEGER(1);
918 } else
919 return SNMP_INTEGER(0);
920 case EIGRPSTUCKINACTIVE: /* 6 */
921 /* A value of true(1) indicates that that this route which is in
922 active state
923 has not received any replies to queries for alternate paths
924 */
925 if (eigrp) {
926 return SNMP_INTEGER(1);
927 } else
928 return SNMP_INTEGER(0);
929 case EIGRPDESTSUCCESSORS: /* 7 */
930 /* Next routing hop for a path to the destination IP network */
931 if (eigrp) {
932 return SNMP_INTEGER(1);
933 } else
934 return SNMP_INTEGER(0);
935 case EIGRPFDISTANCE: /* 8 */
936 /* Minimum distance from this router to the destination IP
937 * network */
938 if (eigrp) {
939 return SNMP_INTEGER(1);
940 } else
941 return SNMP_INTEGER(0);
942 case EIGRPROUTEORIGINTYPE: /* 9 */
943 /* Text string describing the internal origin of the EIGRP route
944 */
945 if (eigrp) {
946 return SNMP_INTEGER(1);
947 } else
948 return SNMP_INTEGER(0);
949 case EIGRPROUTEORIGINADDRTYPE: /* 10 */
950 /* The format of the IP address defined as the origin of this
951 topology route entry */
952 if (eigrp) {
953 return SNMP_INTEGER(1);
954 } else
955 return SNMP_INTEGER(0);
956 case EIGRPROUTEORIGINADDR: /* 11 */
957 /* If the origin of the topology route entry is external to this
958 router,
959 then this object is the IP address of the router from which
960 it originated */
961 if (eigrp) {
962 return SNMP_INTEGER(1);
963 } else
964 return SNMP_INTEGER(0);
965 case EIGRPNEXTHOPADDRESSTYPE: /* 12 */
966 /* The format of the next hop IP address */
967 if (eigrp) {
968 return SNMP_INTEGER(1);
969 } else
970 return SNMP_INTEGER(0);
971 case EIGRPNEXTHOPADDRESS: /* 13 */
972 /* Next hop IP address for the route */
973 if (eigrp) {
974 return SNMP_INTEGER(1);
975 } else
976 return SNMP_INTEGER(0);
977 case EIGRPNEXTHOPINTERFACE: /* 14 */
978 /* The interface through which the next hop IP address is
979 * reached */
980 if (eigrp) {
981 return SNMP_INTEGER(1);
982 } else
983 return SNMP_INTEGER(0);
984 case EIGRPDISTANCE: /* 15 */
985 /* The computed distance to the destination network entry from
986 * this router */
987 if (eigrp) {
988 return SNMP_INTEGER(1);
989 } else
990 return SNMP_INTEGER(0);
991 case EIGRPREPORTDISTANCE: /* 16 */
992 /* The computed distance to the destination network in the
993 topology entry
994 reported to this router by the originator of this route */
995 if (eigrp) {
996 return SNMP_INTEGER(1);
997 } else
998 return SNMP_INTEGER(0);
999 default:
1000 return NULL;
1001 }
1002 return NULL;
1003 }
1004
1005 static uint8_t *eigrpPeerEntry(struct variable *v, oid *name, size_t *length,
1006 int exact, size_t *var_len,
1007 WriteMethod **write_method)
1008 {
1009 struct eigrp *eigrp;
1010 struct eigrp_interface *ei;
1011 struct eigrp_neighbor *nbr;
1012 struct in_addr nbr_addr;
1013 unsigned int ifindex;
1014
1015 eigrp = eigrp_lookup();
1016
1017 /* Check whether the instance identifier is valid */
1018 if (smux_header_generic(v, name, length, exact, var_len, write_method)
1019 == MATCH_FAILED)
1020 return NULL;
1021
1022 memset(&nbr_addr, 0, sizeof(nbr_addr));
1023 ifindex = 0;
1024
1025 nbr = eigrpNbrLookup(v, name, length, &nbr_addr, &ifindex, exact);
1026 if (!nbr)
1027 return NULL;
1028 ei = nbr->ei;
1029 if (!ei)
1030 return NULL;
1031
1032 /* Return the current value of the variable */
1033 switch (v->magic) {
1034 case EIGRPHANDLE: /* 1 */
1035 /* The unique internal identifier for the peer in the AS */
1036 if (eigrp) {
1037 return SNMP_INTEGER(1);
1038 } else
1039 return SNMP_INTEGER(0);
1040 case EIGRPPEERADDRTYPE: /* 2 */
1041 /* The format of the remote source IP address used by the peer
1042 */
1043 if (eigrp) {
1044 return SNMP_INTEGER(1);
1045 } else
1046 return SNMP_INTEGER(0);
1047 case EIGRPPEERADDR: /* 3 */
1048 /* The source IP address used by the peer */
1049 if (eigrp) {
1050 return SNMP_INTEGER(1);
1051 } else
1052 return SNMP_INTEGER(0);
1053 case EIGRPPEERIFINDEX: /* 4 */
1054 /* The ifIndex of the interface on this router */
1055 if (eigrp) {
1056 return SNMP_INTEGER(1);
1057 } else
1058 return SNMP_INTEGER(0);
1059 case EIGRPHOLDTIME: /* 5 */
1060 /* How much time must pass without receiving a hello packet from
1061 this
1062 EIGRP peer before this router declares the peer down */
1063 if (eigrp) {
1064 return SNMP_INTEGER(1);
1065 } else
1066 return SNMP_INTEGER(0);
1067 case EIGRPUPTIME: /* 6 */
1068 /* The elapsed time since the EIGRP adjacency was first
1069 * established */
1070 if (eigrp) {
1071 return SNMP_INTEGER(1);
1072 } else
1073 return SNMP_INTEGER(0);
1074 case EIGRPSRTT: /* 7 */
1075 /* The computed smooth round trip time for packets to and from
1076 * the peer */
1077 if (eigrp) {
1078 return SNMP_INTEGER(1);
1079 } else
1080 return SNMP_INTEGER(0);
1081 case EIGRPRTO: /* 8 */
1082 /* The computed retransmission timeout for the peer */
1083 if (eigrp) {
1084 return SNMP_INTEGER(1);
1085 } else
1086 return SNMP_INTEGER(0);
1087 case EIGRPPKTSENQUEUED: /* 9 */
1088 /* The number of any EIGRP packets currently enqueued */
1089 if (eigrp) {
1090 return SNMP_INTEGER(1);
1091 } else
1092 return SNMP_INTEGER(0);
1093 case EIGRPLASTSEQ: /* 10 */
1094 /* sequence number of the last EIGRP packet sent to this peer */
1095 if (eigrp) {
1096 return SNMP_INTEGER(1);
1097 } else
1098 return SNMP_INTEGER(0);
1099 case EIGRPVERSION: /* 11 */
1100 /* The EIGRP version information reported by the remote peer */
1101 if (eigrp) {
1102 return SNMP_INTEGER(1);
1103 } else
1104 return SNMP_INTEGER(0);
1105 case EIGRPRETRANS: /* 12 */
1106 /* The cumulative number of retransmissions to this peer */
1107 if (eigrp) {
1108 return SNMP_INTEGER(1);
1109 } else
1110 return SNMP_INTEGER(0);
1111 case EIGRPRETRIES: /* 13 */
1112 /* The number of times the current unacknowledged packet has
1113 * been retried */
1114 if (eigrp) {
1115 return SNMP_INTEGER(1);
1116 } else
1117 return SNMP_INTEGER(0);
1118 default:
1119 return NULL;
1120 }
1121 return NULL;
1122 }
1123
1124 static uint8_t *eigrpInterfaceEntry(struct variable *v, oid *name,
1125 size_t *length, int exact, size_t *var_len,
1126 WriteMethod **write_method)
1127 {
1128 struct eigrp *eigrp;
1129 struct listnode *node, *nnode;
1130 struct keychain *keychain;
1131 struct list *keylist;
1132
1133 eigrp = eigrp_lookup();
1134
1135 /* Check whether the instance identifier is valid */
1136 if (smux_header_generic(v, name, length, exact, var_len, write_method)
1137 == MATCH_FAILED)
1138 return NULL;
1139
1140 /* Return the current value of the variable */
1141 switch (v->magic) {
1142 case EIGRPPEERCOUNT: /* 3 */
1143 /* The number of EIGRP adjacencies currently formed with
1144 peers reached through this interface */
1145 if (eigrp) {
1146 return SNMP_INTEGER(eigrp_neighbor_count(eigrp));
1147 } else
1148 return SNMP_INTEGER(0);
1149 case EIGRPXMITRELIABLEQ: /* 4 */
1150 /* The number of EIGRP packets currently waiting in the reliable
1151 transport transmission queue */
1152 if (eigrp) {
1153 return SNMP_INTEGER(1);
1154 } else
1155 return SNMP_INTEGER(0);
1156 case EIGRPXMITUNRELIABLEQ: /* 5 */
1157 /* The number of EIGRP packets currently waiting in the
1158 unreliable
1159 transport transmission queue */
1160 if (eigrp) {
1161 return SNMP_INTEGER(1);
1162 } else
1163 return SNMP_INTEGER(0);
1164 case EIGRPMEANSRTT: /* 6 */
1165 /* The average of all the computed smooth round trip time values
1166 for a packet to and from all peers established on this
1167 interface */
1168 if (eigrp) {
1169 return SNMP_INTEGER(1);
1170 } else
1171 return SNMP_INTEGER(0);
1172 case EIGRPPACINGRELIABLE: /* 7 */
1173 /* The configured time interval between EIGRP packet
1174 * transmissions */
1175 if (eigrp) {
1176 return SNMP_INTEGER(1);
1177 } else
1178 return SNMP_INTEGER(0);
1179 case EIGRPPACINGUNRELIABLE: /* 8 */
1180 /* The configured time interval between EIGRP packet
1181 transmissions
1182 on the interface when the unreliable transport method is used
1183 */
1184 if (eigrp) {
1185 return SNMP_INTEGER(1);
1186 } else
1187 return SNMP_INTEGER(0);
1188 case EIGRPMFLOWTIMER: /* 9 */
1189 /* The configured multicast flow control timer value */
1190 if (eigrp) {
1191 return SNMP_INTEGER(1);
1192 } else
1193 return SNMP_INTEGER(0);
1194 case EIGRPPENDINGROUTES: /* 10 */
1195 /* The number of queued EIGRP routing updates awaiting
1196 * transmission */
1197 if (eigrp) {
1198 return SNMP_INTEGER(1);
1199 } else
1200 return SNMP_INTEGER(0);
1201 case EIGRPHELLOINTERVAL: /* 11 */
1202 /* The configured time interval between Hello packet
1203 * transmissions */
1204 if (eigrp) {
1205 return SNMP_INTEGER(1);
1206 } else
1207 return SNMP_INTEGER(0);
1208 case EIGRPXMITNEXTSERIAL: /* 12 */
1209 /* The serial number of the next EIGRP packet that is to be
1210 queued
1211 for transmission */
1212 if (eigrp) {
1213 return SNMP_INTEGER(1);
1214 } else
1215 return SNMP_INTEGER(0);
1216 case EIGRPUMCASTS: /* 13 */
1217 /* The total number of unreliable EIGRP multicast packets sent
1218 on this interface */
1219 if (eigrp) {
1220 return SNMP_INTEGER(1);
1221 } else
1222 return SNMP_INTEGER(0);
1223 case EIGRPRMCASTS: /* 14 */
1224 /* The total number of reliable EIGRP multicast packets sent
1225 on this interface */
1226 if (eigrp) {
1227 return SNMP_INTEGER(1);
1228 } else
1229 return SNMP_INTEGER(0);
1230 case EIGRPUUCASTS: /* 15 */
1231 /* The total number of unreliable EIGRP unicast packets sent
1232 on this interface */
1233 if (eigrp) {
1234 return SNMP_INTEGER(1);
1235 } else
1236 return SNMP_INTEGER(0);
1237 case EIGRPRUCASTS: /* 16 */
1238 /* The total number of reliable EIGRP unicast packets sent
1239 on this interface */
1240 if (eigrp) {
1241 return SNMP_INTEGER(1);
1242 } else
1243 return SNMP_INTEGER(0);
1244 case EIGRPMCASTEXCEPTS: /* 17 */
1245 /* The total number of EIGRP multicast exception transmissions
1246 */
1247 if (eigrp) {
1248 return SNMP_INTEGER(1);
1249 } else
1250 return SNMP_INTEGER(0);
1251 case EIGRPCRPKTS: /* 18 */
1252 /* The total number EIGRP Conditional-Receive packets sent on
1253 * this interface */
1254 if (eigrp) {
1255 return SNMP_INTEGER(1);
1256 } else
1257 return SNMP_INTEGER(0);
1258 case EIGRPACKSSUPPRESSED: /* 19 */
1259 /* The total number of individual EIGRP acknowledgement packets
1260 that have been
1261 suppressed and combined in an already enqueued outbound
1262 reliable packet on this interface */
1263 if (eigrp) {
1264 return SNMP_INTEGER(1);
1265 } else
1266 return SNMP_INTEGER(0);
1267 case EIGRPRETRANSSENT: /* 20 */
1268 /* The total number EIGRP packet retransmissions sent on the
1269 * interface */
1270 if (eigrp) {
1271 return SNMP_INTEGER(1);
1272 } else
1273 return SNMP_INTEGER(0);
1274 case EIGRPOOSRCVD: /* 21 */
1275 /* The total number of out-of-sequence EIGRP packets received */
1276 if (eigrp) {
1277 return SNMP_INTEGER(1);
1278 } else
1279 return SNMP_INTEGER(0);
1280 case EIGRPAUTHMODE: /* 22 */
1281 /* The EIGRP authentication mode of the interface */
1282 if (eigrp) {
1283 return SNMP_INTEGER(1);
1284 } else
1285 return SNMP_INTEGER(0);
1286 case EIGRPAUTHKEYCHAIN: /* 23 */
1287 /* The name of the authentication key-chain configured
1288 on this interface. */
1289 keylist = keychain_list_get();
1290 for (ALL_LIST_ELEMENTS(keylist, node, nnode, keychain)) {
1291 return (uint8_t *)keychain->name;
1292 }
1293 if (eigrp && keychain) {
1294 *var_len = str_len(keychain->name);
1295 return (uint8_t *)keychain->name;
1296 } else
1297 return (uint8_t *)"TEST";
1298 break;
1299 default:
1300 return NULL;
1301 }
1302 return NULL;
1303 }
1304
1305 /* Register EIGRP-MIB. */
1306 void eigrp_snmp_init()
1307 {
1308 eigrp_snmp_iflist = list_new();
1309 smux_init(eigrp_om->master);
1310 REGISTER_MIB("ciscoEigrpMIB", eigrp_variables, variable, eigrp_oid);
1311 }
1312 #endif