|
|
| version 1.1.1.2, 2013/07/21 23:54:41 | version 1.1.1.3, 2016/11/02 10:09:10 |
|---|---|
| Line 19 | Line 19 |
| * 02111-1307, USA. | * 02111-1307, USA. |
| */ | */ |
| /* | |
| * Currently SNMP is only running properly for MIBs in the default VRF. | |
| */ | |
| #include <zebra.h> | #include <zebra.h> |
| #ifdef HAVE_SNMP | #ifdef HAVE_SNMP |
| Line 31 | Line 35 |
| #include "command.h" | #include "command.h" |
| #include "smux.h" | #include "smux.h" |
| #include "table.h" | #include "table.h" |
| #include "vrf.h" | |
| #include "zebra/rib.h" | #include "zebra/rib.h" |
| #include "zebra/zserv.h" | #include "zebra/zserv.h" |
| #define IPFWMIB 1,3,6,1,2,1,4,24 | #define IPFWMIB 1,3,6,1,2,1,4,24 |
| /* ipForwardTable */ | /* ipForwardTable */ |
| Line 78 | Line 83 |
| #define ROWSTATUS ASN_INTEGER | #define ROWSTATUS ASN_INTEGER |
| #define IPADDRESS ASN_IPADDRESS | #define IPADDRESS ASN_IPADDRESS |
| #define OBJECTIDENTIFIER ASN_OBJECT_ID | #define OBJECTIDENTIFIER ASN_OBJECT_ID |
| extern struct zebra_t zebrad; | extern struct zebra_t zebrad; |
| oid ipfw_oid [] = { IPFWMIB }; | oid ipfw_oid [] = { IPFWMIB }; |
| Line 130 struct variable zebra_variables[] = | Line 135 struct variable zebra_variables[] = |
| {IPCIDRROUTESTATUS, ROWSTATUS, RONLY, ipCidrTable, 3, {4, 1, 16}} | {IPCIDRROUTESTATUS, ROWSTATUS, RONLY, ipCidrTable, 3, {4, 1, 16}} |
| }; | }; |
| static u_char * | static u_char * |
| ipFwNumber (struct variable *v, oid objid[], size_t *objid_len, | ipFwNumber (struct variable *v, oid objid[], size_t *objid_len, |
| int exact, size_t *val_len, WriteMethod **write_method) | int exact, size_t *val_len, WriteMethod **write_method) |
| Line 143 ipFwNumber (struct variable *v, oid objid[], size_t *o | Line 148 ipFwNumber (struct variable *v, oid objid[], size_t *o |
| if (smux_header_generic(v, objid, objid_len, exact, val_len, write_method) == MATCH_FAILED) | if (smux_header_generic(v, objid, objid_len, exact, val_len, write_method) == MATCH_FAILED) |
| return NULL; | return NULL; |
| table = vrf_table (AFI_IP, SAFI_UNICAST, 0); | table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); |
| if (! table) | if (! table) |
| return NULL; | return NULL; |
| Line 168 ipCidrNumber (struct variable *v, oid objid[], size_t | Line 173 ipCidrNumber (struct variable *v, oid objid[], size_t |
| if (smux_header_generic(v, objid, objid_len, exact, val_len, write_method) == MATCH_FAILED) | if (smux_header_generic(v, objid, objid_len, exact, val_len, write_method) == MATCH_FAILED) |
| return NULL; | return NULL; |
| table = vrf_table (AFI_IP, SAFI_UNICAST, 0); | table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); |
| if (! table) | if (! table) |
| return 0; | return 0; |
| Line 330 get_fwtable_route_node(struct variable *v, oid objid[] | Line 335 get_fwtable_route_node(struct variable *v, oid objid[] |
| if (exact && (*objid_len != (unsigned) v->namelen + 10)) | if (exact && (*objid_len != (unsigned) v->namelen + 10)) |
| return; | return; |
| table = vrf_table (AFI_IP, SAFI_UNICAST, 0); | table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, VRF_DEFAULT); |
| if (! table) | if (! table) |
| return; | return; |