|
Last change
on this file since 577 was
577,
checked in by perry, 7 years ago
|
|
Major cleanup of libtrace3
Lots of documentation fixes
Lots of zerocopy fixes
Lots of config option fixes
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
1.9 KB
|
| Line | |
|---|
| 1 | #ifndef _DAGFORMAT_H_ |
|---|
| 2 | #define _DAGFORMAT_H_ |
|---|
| 3 | |
|---|
| 4 | /* GPP record type defines */ |
|---|
| 5 | #define TYPE_LEGACY 0 |
|---|
| 6 | #define TYPE_HDLC_POS 1 |
|---|
| 7 | #define TYPE_ETH 2 |
|---|
| 8 | #define TYPE_ATM 3 |
|---|
| 9 | #define TYPE_AAL5 4 |
|---|
| 10 | |
|---|
| 11 | /* GPP Type 1 */ |
|---|
| 12 | typedef struct pos_rec { |
|---|
| 13 | uint32_t hdlc; |
|---|
| 14 | uint8_t pload[1]; |
|---|
| 15 | } pos_rec_t; |
|---|
| 16 | |
|---|
| 17 | /* GPP Type 2 */ |
|---|
| 18 | typedef struct eth_rec { |
|---|
| 19 | uint8_t offset; |
|---|
| 20 | uint8_t pad; |
|---|
| 21 | uint8_t dst[6]; |
|---|
| 22 | uint8_t src[6]; |
|---|
| 23 | uint16_t etype; |
|---|
| 24 | uint8_t pload[1]; |
|---|
| 25 | } eth_rec_t; |
|---|
| 26 | |
|---|
| 27 | /* GPP Type 3 */ |
|---|
| 28 | typedef struct atm_rec { |
|---|
| 29 | uint32_t header; |
|---|
| 30 | uint8_t pload[1]; |
|---|
| 31 | } atm_rec_t; |
|---|
| 32 | |
|---|
| 33 | /* GPP Type 4 */ |
|---|
| 34 | typedef struct aal5_rec { |
|---|
| 35 | uint32_t header; |
|---|
| 36 | uint8_t pload[1]; |
|---|
| 37 | } aal5_rec_t; |
|---|
| 38 | |
|---|
| 39 | typedef struct flags { |
|---|
| 40 | unsigned int iface:2; |
|---|
| 41 | unsigned int vlen:1; |
|---|
| 42 | unsigned int trunc:1; |
|---|
| 43 | unsigned int rxerror:1; |
|---|
| 44 | unsigned int dserror:1; |
|---|
| 45 | unsigned int pad:2; |
|---|
| 46 | } __attribute__((packed)) flags_t; |
|---|
| 47 | |
|---|
| 48 | /* GPP Global type */ |
|---|
| 49 | typedef struct dag_record { |
|---|
| 50 | uint64_t ts; |
|---|
| 51 | uint8_t type; |
|---|
| 52 | flags_t flags; |
|---|
| 53 | uint16_t rlen; |
|---|
| 54 | uint16_t lctr; |
|---|
| 55 | uint16_t wlen; |
|---|
| 56 | union { |
|---|
| 57 | pos_rec_t pos; |
|---|
| 58 | eth_rec_t eth; |
|---|
| 59 | atm_rec_t atm; |
|---|
| 60 | aal5_rec_t aal5; |
|---|
| 61 | } rec; |
|---|
| 62 | } __attribute__((packed)) dag_record_t; |
|---|
| 63 | |
|---|
| 64 | typedef struct duck_inf_pkt { |
|---|
| 65 | uint32_t command; |
|---|
| 66 | uint32_t config; |
|---|
| 67 | uint32_t clock_inc; |
|---|
| 68 | uint32_t clock_wrap; |
|---|
| 69 | uint32_t DDS_rate; |
|---|
| 70 | uint32_t crystal_freq; |
|---|
| 71 | uint32_t synth_freq; |
|---|
| 72 | uint32_t sync_rate; |
|---|
| 73 | uint64_t last_ticks; |
|---|
| 74 | uint32_t resyncs; |
|---|
| 75 | uint32_t bad_diffs, bad_offs, bad_pulses; |
|---|
| 76 | uint32_t worst_error, worst_off; |
|---|
| 77 | uint32_t off_limit, off_damp; |
|---|
| 78 | uint32_t pulses, single_pulses_missing, longest_pulse_missing; |
|---|
| 79 | uint32_t health; |
|---|
| 80 | uint32_t sickness; |
|---|
| 81 | int32_t error; |
|---|
| 82 | int32_t offset; |
|---|
| 83 | int32_t stat_start, stat_end; |
|---|
| 84 | uint32_t set_duck_field; |
|---|
| 85 | } duck_inf; |
|---|
| 86 | |
|---|
| 87 | #define dag_record_size 16 |
|---|
| 88 | |
|---|
| 89 | #endif /* _DAGFORMAT_H_ */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.