38 #define CSP_CMP_REQUEST 0x00 39 #define CSP_CMP_REPLY 0xff 41 #define CSP_CMP_IDENT 1 42 #define CSP_CMP_IDENT_REV_LEN 20 43 #define CSP_CMP_IDENT_DATE_LEN 12 44 #define CSP_CMP_IDENT_TIME_LEN 9 45 #define CSP_CMP_ROUTE_SET 2 46 #define CSP_CMP_ROUTE_IFACE_LEN 11 47 #define CSP_CMP_IF_STATS 3 48 #define CSP_CMP_PEEK 4 49 #define CSP_CMP_PEEK_MAX_LEN 200 50 #define CSP_CMP_POKE 5 51 #define CSP_CMP_POKE_MAX_LEN 200 52 #define CSP_CMP_CLOCK 6 70 struct __attribute__((__packed__)) {
95 } __attribute__ ((packed));
97 #define CMP_SIZE(_memb) (sizeof(((struct csp_cmp_message *)0)->_memb) + sizeof(uint8_t) + sizeof(uint8_t)) 101 #define CMP_MESSAGE(_code, _memb) \ 102 static inline int csp_cmp_##_memb(uint8_t node, uint32_t timeout, struct csp_cmp_message *msg) { \ 103 return csp_cmp(node, timeout, _code, CMP_SIZE(_memb), msg); \ 117 #endif // _CSP_CMP_H_ uint8_t code
Definition: csp_cmp.h:56
uint32_t txbytes
Definition: csp_cmp.h:79
char time[CSP_CMP_IDENT_TIME_LEN]
Definition: csp_cmp.h:63
struct csp_cmp_message::@0::@4 if_stats
char revision[CSP_CMP_IDENT_REV_LEN]
Definition: csp_cmp.h:61
#define CSP_CMP_CLOCK
Definition: csp_cmp.h:52
#define CSP_CMP_IDENT_REV_LEN
Definition: csp_cmp.h:42
uint32_t autherr
Definition: csp_cmp.h:77
uint8_t type
Definition: csp_cmp.h:55
uint8_t dest_node
Definition: csp_cmp.h:66
uint32_t tx
Definition: csp_cmp.h:72
Definition: csp_clock.h:36
#define CSP_CMP_IF_STATS
Definition: csp_cmp.h:47
uint32_t tx_error
Definition: csp_cmp.h:74
uint32_t frame
Definition: csp_cmp.h:78
#define CSP_CMP_IDENT
Definition: csp_cmp.h:41
#define CSP_CMP_IDENT_TIME_LEN
Definition: csp_cmp.h:44
uint32_t rx
Definition: csp_cmp.h:73
#define CSP_CMP_PEEK
Definition: csp_cmp.h:48
#define CSP_HOSTNAME_LEN
Definition: csp_types.h:220
#define CSP_CMP_ROUTE_SET
Definition: csp_cmp.h:45
#define CMP_MESSAGE(_code, _memb)
Definition: csp_cmp.h:101
char interface[CSP_CMP_ROUTE_IFACE_LEN]
Definition: csp_cmp.h:68
#define CSP_MODEL_LEN
Definition: csp_types.h:221
uint8_t len
Definition: csp_cmp.h:85
uint32_t irq
Definition: csp_cmp.h:81
csp_timestamp_t clock
Definition: csp_cmp.h:93
struct csp_cmp_message::@0::@2 ident
struct csp_cmp_message::@0::@5 peek
char model[CSP_MODEL_LEN]
Definition: csp_cmp.h:60
uint32_t drop
Definition: csp_cmp.h:76
#define CSP_CMP_POKE_MAX_LEN
Definition: csp_cmp.h:51
#define CSP_CMP_POKE
Definition: csp_cmp.h:50
uint32_t rxbytes
Definition: csp_cmp.h:80
#define CSP_CMP_IDENT_DATE_LEN
Definition: csp_cmp.h:43
uint32_t addr
Definition: csp_cmp.h:84
char date[CSP_CMP_IDENT_DATE_LEN]
Definition: csp_cmp.h:62
#define CSP_CMP_ROUTE_IFACE_LEN
Definition: csp_cmp.h:46
uint8_t next_hop_mac
Definition: csp_cmp.h:67
#define CSP_CMP_PEEK_MAX_LEN
Definition: csp_cmp.h:49
struct csp_cmp_message::@0::@6 poke
char data[CSP_CMP_PEEK_MAX_LEN]
Definition: csp_cmp.h:86
int csp_cmp(uint8_t node, uint32_t timeout, uint8_t code, int membsize, struct csp_cmp_message *msg)
char hostname[CSP_HOSTNAME_LEN]
Definition: csp_cmp.h:59
uint32_t rx_error
Definition: csp_cmp.h:75
struct csp_cmp_message::@0::@3 route_set