4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 83e0a25 was
299e9a0,
checked in by Daniel Lawson <dlawson@…>, 18 years ago
|
setting the packed attribute on some datastructures to fix AMD64 alignment issues
|
-
Property mode set to
100644
|
File size:
1.5 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 | unsigned hdlc; |
---|
14 | unsigned char pload[1]; |
---|
15 | } pos_rec_t; |
---|
16 | |
---|
17 | /* GPP Type 2 */ |
---|
18 | typedef struct eth_rec { |
---|
19 | unsigned char offset; |
---|
20 | unsigned char pad; |
---|
21 | unsigned char dst[6]; |
---|
22 | unsigned char src[6]; |
---|
23 | unsigned short etype; |
---|
24 | unsigned char pload[1]; |
---|
25 | } eth_rec_t; |
---|
26 | |
---|
27 | /* GPP Type 3 */ |
---|
28 | typedef struct atm_rec { |
---|
29 | unsigned header; |
---|
30 | unsigned char pload[1]; |
---|
31 | } atm_rec_t; |
---|
32 | |
---|
33 | /* GPP Type 4 */ |
---|
34 | typedef struct aal5_rec { |
---|
35 | unsigned header; |
---|
36 | unsigned char pload[1]; |
---|
37 | } aal5_rec_t; |
---|
38 | |
---|
39 | typedef struct flags { |
---|
40 | unsigned char iface:2; |
---|
41 | unsigned char vlen:1; |
---|
42 | unsigned char trunc:1; |
---|
43 | unsigned char rxerror:1; |
---|
44 | unsigned char dserror:1; |
---|
45 | unsigned char pad:2; |
---|
46 | } __attribute__((packed)) flags_t; |
---|
47 | |
---|
48 | /* GPP Global type */ |
---|
49 | typedef struct dag_record { |
---|
50 | unsigned long long ts; |
---|
51 | unsigned char type; |
---|
52 | flags_t flags; |
---|
53 | unsigned short rlen; |
---|
54 | unsigned short lctr; |
---|
55 | unsigned short 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 | #define dag_record_size 16 |
---|
65 | |
---|
66 | |
---|
67 | #endif // _DAGFORMAT_H_ |
---|
Note: See
TracBrowser
for help on using the repository browser.