source: lib/format_ndag.h @ 4bab977

cachetimestampsdevelopdpdk-ndagetsilivendag_formatrc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformance
Last change on this file since 4bab977 was 4bab977, checked in by Shane Alcock <salcock@…>, 3 years ago

Modifications in response to changes in the nDAG protocol.

  • Updated protocol to account for new laststart field in encap. header. Use this field to recognise when the monitor has been restarted.
  • When determining sequence number gap, don't count 0 as a valid sequence number -- seqno 0 is reserved in the nDAG protocol and will never be lost.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef FORMAT_NDAG_H_
2#define FORMAT_NDAG_H_
3
4#include <libtrace.h>
5
6#define NDAG_MAX_DGRAM_SIZE (8900)
7
8#define NDAG_MAGIC_NUMBER (0x4E444147)
9#define NDAG_EXPORT_VERSION 1
10
11
12enum {
13        NDAG_PKT_BEACON = 0x01,
14        NDAG_PKT_ENCAPERF = 0x02,
15        NDAG_PKT_RESTARTED = 0x03,
16        NDAG_PKT_ENCAPRT = 0x04,
17        NDAG_PKT_KEEPALIVE = 0x05
18};
19
20/* == Protocol header structures == */
21
22/* Common header -- is prepended to all exported records */
23typedef struct ndag_common_header {
24        uint32_t magic;
25        uint8_t version;
26        uint8_t type;
27        uint16_t monitorid;
28} PACKED ndag_common_t;
29
30/* Beacon -- structure is too simple to be worth defining as a struct */
31/*
32 * uint16_t numberofstreams;
33 * uint16_t firststreamport;
34 * uint16_t secondstreamport;
35 * ....
36 * uint16_t laststreamport;
37 */
38
39/* Encapsulation header -- used by both ENCAPERF and ENCAPRT records */
40typedef struct ndag_encap {
41        uint64_t started;
42        uint32_t seqno;
43        uint16_t streamid;
44        uint16_t recordcount; /* acts as RT type for ENCAPRT records */
45} PACKED ndag_encap_t;
46
47#endif
Note: See TracBrowser for help on using the repository browser.