]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_snmp.c
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / bgpd / bgp_snmp.c
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
718e3744 2/* BGP4 SNMP support
896014f4 3 * Copyright (C) 1999, 2000 Kunihiro Ishiguro
896014f4 4 */
718e3744 5
6#include <zebra.h>
7
07661cb5 8#include <net-snmp/net-snmp-config.h>
fb62a3ce 9#include <net-snmp/net-snmp-includes.h>
718e3744 10
11#include "if.h"
12#include "log.h"
13#include "prefix.h"
14#include "command.h"
24a58196 15#include "frrevent.h"
718e3744 16#include "smux.h"
039f3a34 17#include "filter.h"
5986b66b
DL
18#include "hook.h"
19#include "libfrr.h"
09781197 20#include "lib/version.h"
718e3744 21
22#include "bgpd/bgpd.h"
23#include "bgpd/bgp_table.h"
24#include "bgpd/bgp_aspath.h"
25#include "bgpd/bgp_attr.h"
26#include "bgpd/bgp_route.h"
27#include "bgpd/bgp_fsm.h"
ff18b7b0
DA
28#include "bgpd/bgp_snmp.h"
29#include "bgpd/bgp_snmp_bgp4.h"
30#include "bgpd/bgp_snmp_bgp4v2.h"
aa53f693 31#include "bgpd/bgp_mplsvpn_snmp.h"
6b0655a2 32
cd9d0537 33static int bgp_snmp_init(struct event_loop *tm)
5986b66b 34{
d62a17ae 35 smux_init(tm);
ff18b7b0
DA
36 bgp_snmp_bgp4_init(tm);
37 bgp_snmp_bgp4v2_init(tm);
aa53f693 38 bgp_mpls_l3vpn_module_init();
d62a17ae 39 return 0;
5986b66b 40}
3012671f 41
d62a17ae 42static int bgp_snmp_module_init(void)
718e3744 43{
7d8d0eab 44 hook_register(peer_status_changed, bgpTrapEstablished);
d62a17ae 45 hook_register(peer_backward_transition, bgpTrapBackwardTransition);
46 hook_register(frr_late_init, bgp_snmp_init);
47 return 0;
718e3744 48}
5986b66b 49
d62a17ae 50FRR_MODULE_SETUP(.name = "bgpd_snmp", .version = FRR_VERSION,
51 .description = "bgpd AgentX SNMP module",
80413c20
DL
52 .init = bgp_snmp_module_init,
53);