]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_snmp.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / bgpd / bgp_snmp.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* BGP4 SNMP support
3 * Copyright (C) 1999, 2000 Kunihiro Ishiguro
4 */
5
6 #include <zebra.h>
7
8 #include <net-snmp/net-snmp-config.h>
9 #include <net-snmp/net-snmp-includes.h>
10
11 #include "if.h"
12 #include "log.h"
13 #include "prefix.h"
14 #include "command.h"
15 #include "thread.h"
16 #include "smux.h"
17 #include "filter.h"
18 #include "hook.h"
19 #include "libfrr.h"
20 #include "lib/version.h"
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"
28 #include "bgpd/bgp_snmp.h"
29 #include "bgpd/bgp_snmp_bgp4.h"
30 #include "bgpd/bgp_snmp_bgp4v2.h"
31 #include "bgpd/bgp_mplsvpn_snmp.h"
32
33 static int bgp_snmp_init(struct thread_master *tm)
34 {
35 smux_init(tm);
36 bgp_snmp_bgp4_init(tm);
37 bgp_snmp_bgp4v2_init(tm);
38 bgp_mpls_l3vpn_module_init();
39 return 0;
40 }
41
42 static int bgp_snmp_module_init(void)
43 {
44 hook_register(peer_status_changed, bgpTrapEstablished);
45 hook_register(peer_backward_transition, bgpTrapBackwardTransition);
46 hook_register(frr_late_init, bgp_snmp_init);
47 return 0;
48 }
49
50 FRR_MODULE_SETUP(.name = "bgpd_snmp", .version = FRR_VERSION,
51 .description = "bgpd AgentX SNMP module",
52 .init = bgp_snmp_module_init,
53 );