You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-33Lines changed: 20 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,21 @@
1
1
# C-Collector for UDP-notif
2
-
Library for collecting UDP-notif protocol messages defined in the IETF draft [draft-ietf-netconf-udp-notif-01](https://tools.ietf.org/html/draft-ietf-netconf-udp-notif-01).
2
+
Library for collecting UDP-notif protocol messages defined in the IETF draft [draft-ietf-netconf-udp-notif-03](https://datatracker.ietf.org/doc/html/draft-ietf-netconf-udp-notif-03).
3
3
4
-
## Build & install
5
-
To build the project and test example clients, just `make` on root folder. Il will compile with gcc all dependencies and the clients.
6
-
7
-
### Installing
8
-
To install the library on a machine, run `make install` with sudo and `export.sh` without sudo. Export script will export the LD_LIBRARY_PATH on user space.
9
-
```
10
-
$ make
11
-
$ sudo make install
12
-
$ ./export.sh
13
-
```
14
-
15
-
### Uninstalling
16
-
```
17
-
$ sudo make uninstall
18
-
```
19
-
You should remove the export of the lib in your bashrc manually yourself to fully remove the lib.
4
+
## Compiling and installing project
5
+
See [INSTALL](INSTALL.md)
20
6
21
7
## Usage
22
8
### Usage of the UDP-notif collector
23
9
The collector allows to read and parse UDP-notif protocol messages from a ip/port specified on the parameters. It allows to get directly the buffer and the metadata of the message in a struct.
24
10
25
-
The api is in `unyte_udp_collector.h`:
11
+
The api is in `unyte_udp_collector.h`:
26
12
-`unyte_udp_collector_t *unyte_udp_start_collector(unyte_udp_options_t *options)` from `unyte_udp_collector.h`: Initialize the UDP-notif messages collector. It accepts a struct with different options: address (the IP address to listen to), port (port to listen to), recvmmsg_vlen (vlen used on recvmmsg syscall meaning how many messages to receive on every syscall, by default 10)
13
+
-`unyte_udp_collector_t *unyte_udp_start_collector_sk(unyte_udp_sk_options_t *options)` from `unyte_udp_collector.h`: Initialize the UDP-notif messages collector binded to a socket. It accepts a struct with different options: socket file descriptor to listen on, recvmmsg_vlen (vlen used on recvmmsg syscall meaning how many messages to receive on every syscall, by default 10)
27
14
-`void *unyte_udp_queue_read(unyte_udp_queue_t *queue)` from `unyte_udp_queue.h` : read from a queue a struct with all the message buffer and metadata.
28
15
-`int unyte_udp_free_all(unyte_seg_met_t *seg)` from `unyte_udp_collector.h`: free all struct used on a message received.
-`uint16_t unyte_udp_get_message_length(unyte_seg_met_t *message);` : total length of the message within one UDP datagram, measured in octets, including the message header
117
103
-`uint32_t unyte_udp_get_generator_id(unyte_seg_met_t *message);` : observation domain id of the message
118
104
-`uint32_t unyte_udp_get_message_id(unyte_seg_met_t *message);` : message id of the message
119
-
-`uint16_t unyte_udp_get_src_port(unyte_seg_met_t *message);` : source port of the message
120
-
-`uint32_t unyte_udp_get_src_addr(unyte_seg_met_t *message);` : source address of the message
0 commit comments