0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
Vojtech Vilimek
aa14b546b8 SNMP: MIB tree
The first iteration of MIB tree with tests.
2024-04-22 12:55:33 +02:00
Vojtech Vilimek
c7ca8b66c1 SNMP: Major leap forward
Solved segmentation faults.
2024-01-24 00:23:31 +01:00
Vojtech Vilimek
e8cad1f275 SNMP: dead end
The code contains hard to debug bug where we periodically do some kind of error.
The problem is caused by weird values after the AgentX PDU header, exactly where
the first OID should lie. We expend value less than 15 but we found values like
0x00003b47. We found possible cause on assignment to socket's receive buffer
position in proto/snmp/subagent.c:snmp_rx at line 1569. An erroneous behavior
may have been caused by off-by-on error. More investigation is needed to gain
full picture.

To resolve this issue we use much more simpler approach. We will set max packet
size and wait until whole packet has arrived.
2024-01-10 12:21:46 +01:00
Vojtech Vilimek
c18e6dd58d SNMP: Major code improvements
SNMP state changes are now handled by snmp_set_state() functions.

The registration structure and related variables are renamed to remove
confusion.

Manipulation of BGP peers, a reference to BGP protocol structures, is improved
by new functions that encapsulate raw hash table macros (moved from snmp.h).
IPv4 addresses now used by bgp_mib.c because BGP4-MIB does not support IPv6
addresses.

Configuration grammar rules are revised.

We now use DBG() and TRACE() macros to output information about SNMP state
chagnes and about received and transmitted packets.

Pieces of old code are removed, minor bugfixes are included. Large debug string
array are removed.
2023-11-15 15:03:55 +01:00
Vojtech Vilimek
53856e49c9 SNMP: Use compile-time selected byte order
In the AgentX communication the subagent chooses the byte order used. To reduce
code complexity, we decide to use compile-time selected byte order in PDU sent.
Supported options are:
  - SNMP_NATIVE: use native CPU byte order
  - SNMP_NETWORK_BYTE_ORDER: use big endian in PDUs, i.e. network byte order
It is recommended not to used both options at the same time (even it is possible
on big endian platforms).
2023-11-15 13:00:24 +01:00
Vojtech Vilimek
a737f7a4d8 SNMP: Improvements in registration handling 2023-10-25 16:58:47 +02:00
Vojtech Vilimek
e15f38e082 SNMP: Bare support for agentx-TestSet-PDU 2023-10-19 16:27:04 +02:00
Vojtech Vilimek
778906d168 SNMP: BGP4-MIB add LocalIdentifier 2023-10-11 11:21:19 +02:00
Vojtech Vilimek
2211644ed3 SNMP: Context support and improved registering 2023-09-11 13:41:39 +02:00
Vojtech Vilimek
8a1f2dba66 SNMP: BGP4-MIB notifications 2023-09-04 13:53:45 +02:00
Vojtech Vilimek
7543da15d8 SNMP: Remove transmit hook, new macros 2023-09-04 13:46:02 +02:00
Vojtech Vilimek
c6bcdf8687 Fix BGP identifier values in BGP4-MIB 2023-08-08 19:54:40 +02:00
Vojtech Vilimek
4c7828779e mainly visual tweaks 2023-07-26 14:34:01 +02:00
Vojtech Vilimek
9f8950d4d7 changes in bgp_mib.c API (mainly) 2023-07-26 14:02:23 +02:00
Vojtech Vilimek
972c717c56 tmp: minor changes 2023-03-31 09:56:39 +02:00
Vojtech Vilimek
908aa67e1c tmp: minor changes 2023-03-14 14:09:45 +01:00
Vojtech Vilimek
2a4fedb6e0 tmp: compiles and runs 2022-12-10 18:08:00 +01:00
Vojtech Vilimek
9a11ec8d83 tmp: compiles 2022-11-29 16:30:20 +01:00
Vojtech Vilimek
ad9833e4f1 tmp: compiles 2022-11-19 23:00:02 +01:00
Vojtech Vilimek
508a420327 fix the Get and GetNext
missing some functionality around GetBulk
2022-11-15 16:29:03 +01:00
Vojtech Vilimek
9a75af4573 tmp: compiles, first tests 2022-11-05 16:29:00 +01:00
Vojtech Vilimek
03ab2a89c0 TMP: compiles and runs 2022-09-30 09:36:09 +02:00
Vojtech Vilimek
8ea2e991fa TMP: work on Get-PDU and GetNext-PDU 2022-09-20 14:28:57 +02:00
Vojtech Vilimek
eb5a749046 TMP new snmp PDUs 2022-09-06 18:04:29 +02:00
Vojtech Vilimek
a5bdba428b TMP: code cleanup - remove trailing whitespace 2022-08-02 16:12:09 +02:00
Vojtech Vilimek
e5a88b584e TMP: proto-snmp compiles and connects to master 2022-08-02 16:06:00 +02:00