]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_snmp_bgp4v2.h
Merge pull request #12516 from mjstapp/fix_debug_dpdk
[mirror_frr.git] / bgpd / bgp_snmp_bgp4v2.h
1 /* BGP4V2-MIB SNMP support
2 *
3 * Using: http://www.circitor.fr/Mibs/Html/B/BGP4V2-MIB.php
4 *
5 * Copyright (C) 2022 Donatas Abraitis <donatas@opensourcerouting.org>
6 *
7 * This file is part of FRRouting (FRR).
8 *
9 * FRR is free software; you can redistribute it and/or modify it under the
10 * terms of the GNU General Public License as published by the Free Software
11 * Foundation; either version 2, or (at your option) any later version.
12 *
13 * FRR is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #ifndef _FRR_BGP_SNMP_BGP4V2_H_
24 #define _FRR_BGP_SNMP_BGP4V2_H_
25
26 /* bgp4V2 */
27 #define BGP4V2MIB 1, 3, 6, 1, 3, 5, 1
28
29 /* bgp4V2PeerEntry:
30 * offset 1.3.6.1.3.5.1.1.2.1.x.(1|2).(4|16) = 13
31 */
32 #define BGP4V2_PEER_ENTRY_OFFSET 13
33 #define BGP4V2_PEER_INSTANCE 1
34 #define BGP4V2_PEER_LOCAL_ADDR_TYPE 2
35 #define BGP4V2_PEER_LOCAL_ADDR 3
36 #define BGP4V2_PEER_REMOTE_ADDR_TYPE 4
37 #define BGP4V2_PEER_REMOTE_ADDR 5
38 #define BGP4V2_PEER_LOCAL_PORT 6
39 #define BGP4V2_PEER_LOCAL_AS 7
40 #define BGP4V2_PEER_LOCAL_IDENTIFIER 8
41 #define BGP4V2_PEER_REMOTE_PORT 9
42 #define BGP4V2_PEER_REMOTE_AS 10
43 #define BGP4V2_PEER_REMOTE_IDENTIFIER 11
44 #define BGP4V2_PEER_ADMIN_STATUS 12
45 #define BGP4V2_PEER_STATE 13
46 #define BGP4V2_PEER_DESCRIPTION 14
47
48 /* bgp4V2PeerErrorsEntry */
49 #define BGP4V2_PEER_LAST_ERROR_CODE_RECEIVED 1
50 #define BGP4V2_PEER_LAST_ERROR_SUBCODE_RECEIVED 2
51 #define BGP4V2_PEER_LAST_ERROR_RECEIVED_TIME 3
52 #define BGP4V2_PEER_LAST_ERROR_RECEIVED_TEXT 4
53 #define BGP4V2_PEER_LAST_ERROR_RECEIVED_DATA 5
54 #define BGP4V2_PEER_LAST_ERROR_CODE_SENT 6
55 #define BGP4V2_PEER_LAST_ERROR_SUBCODE_SENT 7
56 #define BGP4V2_PEER_LAST_ERROR_SENT_TIME 8
57 #define BGP4V2_PEER_LAST_ERROR_SENT_TEXT 9
58 #define BGP4V2_PEER_LAST_ERROR_SENT_DATA 10
59
60 /* bgp4V2PeerEventTimesEntry */
61 #define BGP4V2_PEER_FSM_ESTABLISHED_TIME 1
62 #define BGP4V2_PEER_PEER_IN_UPDATES_ELAPSED_TIME 2
63
64 /* bgp4V2NlriEntry
65 * offset 1.3.6.1.3.5.1.1.9.1.x.(1|2).(4|16) = 13
66 */
67 #define BGP4V2_NLRI_ENTRY_OFFSET 13
68 #define BGP4V2_NLRI_INDEX 1
69 #define BGP4V2_NLRI_AFI 2
70 #define BGP4V2_NLRI_SAFI 3
71 #define BGP4V2_NLRI_PREFIX_TYPE 4
72 #define BGP4V2_NLRI_PREFIX 5
73 #define BGP4V2_NLRI_PREFIX_LEN 6
74 #define BGP4V2_NLRI_BEST 7
75 #define BGP4V2_NLRI_CALC_LOCAL_PREF 8
76 #define BGP4V2_NLRI_ORIGIN 9
77 #define BGP4V2_NLRI_NEXT_HOP_ADDR_TYPE 10
78 #define BGP4V2_NLRI_NEXT_HOP_ADDR 11
79 #define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR_TYPE 12
80 #define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR 13
81 #define BGP4V2_NLRI_LOCAL_PREF_PRESENT 14
82 #define BGP4V2_NLRI_LOCAL_PREF 15
83 #define BGP4V2_NLRI_MED_PRESENT 16
84 #define BGP4V2_NLRI_MED 17
85 #define BGP4V2_NLRI_ATOMIC_AGGREGATE 18
86 #define BGP4V2_NLRI_AGGREGATOR_PRESENT 19
87 #define BGP4V2_NLRI_AGGREGATOR_AS 20
88 #define BGP4V2_NLRI_AGGREGATOR_ADDR 21
89 #define BGP4V2_NLRI_AS_PATH_CALC_LENGTH 22
90 #define BGP4V2_NLRI_AS_PATH_STRING 23
91 #define BGP4V2_NLRI_AS_PATH 24
92 #define BGP4V2_NLRI_PATH_ATTR_UNKNOWN 25
93
94 /* bgp4V2Notifications */
95 #define BGP4V2_ESTABLISHED_NOTIFICATION 1
96 #define BGP4V2_BACKWARD_TRANSITION_NOTIFICATION 2
97
98 extern int bgp_snmp_bgp4v2_init(struct thread_master *tm);
99
100 #endif /* _FRR_BGP_SNMP_BGP4V2_H_ */