]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_snmp_bgp4v2.h
Merge pull request #12317 from mobash-rasool/ospf-fixes
[mirror_frr.git] / bgpd / bgp_snmp_bgp4v2.h
CommitLineData
ff18b7b0
DA
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#define BGP4V2_NLRI_INDEX 1
66#define BGP4V2_NLRI_AFI 2
67#define BGP4V2_NLRI_SAFI 3
68#define BGP4V2_NLRI_PREFIX_TYPE 4
69#define BGP4V2_NLRI_PREFIX 5
70#define BGP4V2_NLRI_PREFIX_LEN 6
71#define BGP4V2_NLRI_BEST 7
72#define BGP4V2_NLRI_CALC_LOCAL_PREF 8
73#define BGP4V2_NLRI_ORIGIN 9
74#define BGP4V2_NLRI_NEXT_HOP_ADDR_TYPE 10
75#define BGP4V2_NLRI_NEXT_HOP_ADDR 11
76#define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR_TYPE 12
77#define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR 13
78#define BGP4V2_NLRI_LOCAL_PREF_PRESENT 14
79#define BGP4V2_NLRI_LOCAL_PREF 15
80#define BGP4V2_NLRI_MED_PRESENT 16
81#define BGP4V2_NLRI_MED 17
82#define BGP4V2_NLRI_ATOMIC_AGGREGATE 18
83#define BGP4V2_NLRI_AGGREGATOR_PRESENT 19
84#define BGP4V2_NLRI_AGGREGATOR_AS 20
85#define BGP4V2_NLRI_AGGREGATOR_ADDR 21
86#define BGP4V2_NLRI_AS_PATH_CALC_LENGTH 22
87#define BGP4V2_NLRI_AS_PATH_STRING 23
88#define BGP4V2_NLRI_AS_PATH 24
89#define BGP4V2_NLRI_PATH_ATTR_UNKNOWN 25
90
91/* bgp4V2Notifications */
92#define BGP4V2_ESTABLISHED_NOTIFICATION 1
93#define BGP4V2_BACKWARD_TRANSITION_NOTIFICATION 2
94
95extern int bgp_snmp_bgp4v2_init(struct thread_master *tm);
96
97#endif /* _FRR_BGP_SNMP_BGP4V2_H_ */