]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
ff18b7b0 DA |
2 | /* BGP4V2-MIB SNMP support |
3 | * | |
4 | * Using: http://www.circitor.fr/Mibs/Html/B/BGP4V2-MIB.php | |
5 | * | |
6 | * Copyright (C) 2022 Donatas Abraitis <donatas@opensourcerouting.org> | |
ff18b7b0 DA |
7 | */ |
8 | ||
9 | #ifndef _FRR_BGP_SNMP_BGP4V2_H_ | |
10 | #define _FRR_BGP_SNMP_BGP4V2_H_ | |
11 | ||
12 | /* bgp4V2 */ | |
13 | #define BGP4V2MIB 1, 3, 6, 1, 3, 5, 1 | |
14 | ||
15 | /* bgp4V2PeerEntry: | |
16 | * offset 1.3.6.1.3.5.1.1.2.1.x.(1|2).(4|16) = 13 | |
17 | */ | |
18 | #define BGP4V2_PEER_ENTRY_OFFSET 13 | |
19 | #define BGP4V2_PEER_INSTANCE 1 | |
20 | #define BGP4V2_PEER_LOCAL_ADDR_TYPE 2 | |
21 | #define BGP4V2_PEER_LOCAL_ADDR 3 | |
22 | #define BGP4V2_PEER_REMOTE_ADDR_TYPE 4 | |
23 | #define BGP4V2_PEER_REMOTE_ADDR 5 | |
24 | #define BGP4V2_PEER_LOCAL_PORT 6 | |
25 | #define BGP4V2_PEER_LOCAL_AS 7 | |
26 | #define BGP4V2_PEER_LOCAL_IDENTIFIER 8 | |
27 | #define BGP4V2_PEER_REMOTE_PORT 9 | |
28 | #define BGP4V2_PEER_REMOTE_AS 10 | |
29 | #define BGP4V2_PEER_REMOTE_IDENTIFIER 11 | |
30 | #define BGP4V2_PEER_ADMIN_STATUS 12 | |
31 | #define BGP4V2_PEER_STATE 13 | |
32 | #define BGP4V2_PEER_DESCRIPTION 14 | |
33 | ||
34 | /* bgp4V2PeerErrorsEntry */ | |
35 | #define BGP4V2_PEER_LAST_ERROR_CODE_RECEIVED 1 | |
36 | #define BGP4V2_PEER_LAST_ERROR_SUBCODE_RECEIVED 2 | |
37 | #define BGP4V2_PEER_LAST_ERROR_RECEIVED_TIME 3 | |
38 | #define BGP4V2_PEER_LAST_ERROR_RECEIVED_TEXT 4 | |
39 | #define BGP4V2_PEER_LAST_ERROR_RECEIVED_DATA 5 | |
40 | #define BGP4V2_PEER_LAST_ERROR_CODE_SENT 6 | |
41 | #define BGP4V2_PEER_LAST_ERROR_SUBCODE_SENT 7 | |
42 | #define BGP4V2_PEER_LAST_ERROR_SENT_TIME 8 | |
43 | #define BGP4V2_PEER_LAST_ERROR_SENT_TEXT 9 | |
44 | #define BGP4V2_PEER_LAST_ERROR_SENT_DATA 10 | |
45 | ||
46 | /* bgp4V2PeerEventTimesEntry */ | |
47 | #define BGP4V2_PEER_FSM_ESTABLISHED_TIME 1 | |
48 | #define BGP4V2_PEER_PEER_IN_UPDATES_ELAPSED_TIME 2 | |
49 | ||
c681e937 DA |
50 | /* bgp4V2NlriEntry |
51 | * offset 1.3.6.1.3.5.1.1.9.1.x.(1|2).(4|16) = 13 | |
52 | */ | |
53 | #define BGP4V2_NLRI_ENTRY_OFFSET 13 | |
ff18b7b0 DA |
54 | #define BGP4V2_NLRI_INDEX 1 |
55 | #define BGP4V2_NLRI_AFI 2 | |
56 | #define BGP4V2_NLRI_SAFI 3 | |
57 | #define BGP4V2_NLRI_PREFIX_TYPE 4 | |
58 | #define BGP4V2_NLRI_PREFIX 5 | |
59 | #define BGP4V2_NLRI_PREFIX_LEN 6 | |
60 | #define BGP4V2_NLRI_BEST 7 | |
61 | #define BGP4V2_NLRI_CALC_LOCAL_PREF 8 | |
62 | #define BGP4V2_NLRI_ORIGIN 9 | |
63 | #define BGP4V2_NLRI_NEXT_HOP_ADDR_TYPE 10 | |
64 | #define BGP4V2_NLRI_NEXT_HOP_ADDR 11 | |
65 | #define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR_TYPE 12 | |
66 | #define BGP4V2_NLRI_LINK_LOCAL_NEXT_HOP_ADDR 13 | |
67 | #define BGP4V2_NLRI_LOCAL_PREF_PRESENT 14 | |
68 | #define BGP4V2_NLRI_LOCAL_PREF 15 | |
69 | #define BGP4V2_NLRI_MED_PRESENT 16 | |
70 | #define BGP4V2_NLRI_MED 17 | |
71 | #define BGP4V2_NLRI_ATOMIC_AGGREGATE 18 | |
72 | #define BGP4V2_NLRI_AGGREGATOR_PRESENT 19 | |
73 | #define BGP4V2_NLRI_AGGREGATOR_AS 20 | |
74 | #define BGP4V2_NLRI_AGGREGATOR_ADDR 21 | |
75 | #define BGP4V2_NLRI_AS_PATH_CALC_LENGTH 22 | |
76 | #define BGP4V2_NLRI_AS_PATH_STRING 23 | |
77 | #define BGP4V2_NLRI_AS_PATH 24 | |
78 | #define BGP4V2_NLRI_PATH_ATTR_UNKNOWN 25 | |
79 | ||
80 | /* bgp4V2Notifications */ | |
81 | #define BGP4V2_ESTABLISHED_NOTIFICATION 1 | |
82 | #define BGP4V2_BACKWARD_TRANSITION_NOTIFICATION 2 | |
83 | ||
cd9d0537 | 84 | extern int bgp_snmp_bgp4v2_init(struct event_loop *tm); |
ff18b7b0 DA |
85 | |
86 | #endif /* _FRR_BGP_SNMP_BGP4V2_H_ */ |