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: doc/high-frequency-telemetry/high-frequency-telemetry-hld.md
+79-9Lines changed: 79 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,7 +392,45 @@ The IPFIX template should be provided by vendors. This document does not restric
392
392
393
393
#### 7.2.4. Netlink message
394
394
395
-
We expect all control messages and out-of-band information to be transmitted by the SAI. Therefore, it is unnecessary to read the attribute header of netlink and the message header of Genetlink from the socket. Instead, we can insert a bulk of IPFIX recordings as the payload of the netlink message. The sample code for building the message from the kernel side is as follows:
395
+
The netlink message consists of a netlink header, a genetlink header, and IPFIX message as the payload. All control messages and out-of-band information are transmitted by the SAI. The IPFIX recordings are directly placed as the payload without additional netlink attributes.
396
+
397
+
The message structure is as follows:
398
+
399
+
```mermaid
400
+
401
+
---
402
+
title: Netlink message structure
403
+
---
404
+
packet-beta
405
+
0-31: "nlmsg_len: 16+4+payload length"
406
+
32-47: "nlmsg_type: family ID"
407
+
48-63: "nlmsg_flags: 0x0000"
408
+
64-95: "nlmsg_seq: 0x00000000"
409
+
96-127: "nlmsg_pid: 0x00000000"
410
+
128-135: "cmd: 0x00"
411
+
136-143: "version: protocol version"
412
+
144-159: "reserved: 0x0000"
413
+
160-191: "IPFIX Message Payload"
414
+
192-223: "..."
415
+
416
+
```
417
+
418
+
**Netlink Header (16 bytes):**
419
+
-`nlmsg_len` (4 bytes): Total message length including headers = 16 (nlheader) + 4 (genheader) + payload length
420
+
-`nlmsg_type` (2 bytes): Message type = family ID (assigned by kernel when family is registered)
421
+
-`nlmsg_flags` (2 bytes): Message flags = 0x0000 (no special flags for multicast data)
422
+
-`nlmsg_seq` (4 bytes): Sequence number = 0x00000000 (not used for multicast messages)
423
+
-`nlmsg_pid` (4 bytes): Process ID = 0x00000000 (kernel originated message)
424
+
425
+
**Generic Netlink Header (4 bytes):**
426
+
-`cmd` (1 byte): Command type = 0x00 (always 0)
427
+
-`version` (1 byte): Protocol version (implementation dependent)
428
+
-`reserved` (2 bytes): Reserved for future use = 0x0000
429
+
430
+
**IPFIX Message Payload:**
431
+
- Direct IPFIX message content without netlink attributes
432
+
433
+
The sample code for building the message from the kernel side is as follows:
0 commit comments