21 #ifndef PLUGINS_PATHPORT_PATHPORTPACKETS_H_
22 #define PLUGINS_PATHPORT_PATHPORTPACKETS_H_
24 #include <sys/types.h>
40 enum pathport_packet_type_e {
41 PATHPORT_DATA = 0x0100,
42 PATHPORT_PATCH = 0x0200,
43 PATHPORT_PATCHREP = 0x0210,
44 PATHPORT_GET = 0x0222,
45 PATHPORT_GET_REPLY = 0x0223,
46 PATHPORT_ARP_REQUEST = 0x0301,
47 PATHPORT_ARP_REPLY = 0x0302,
48 PATHPORT_SET = 0x0400,
53 } __attribute__((packed));
56 typedef enum pathport_packet_type_e pathport_packet_type_t;
63 struct pathport_pdu_data_s {
65 uint16_t channel_count;
72 typedef struct pathport_pdu_data_s pathport_pdu_data;
79 struct pathport_pdu_get_s {
83 typedef struct pathport_pdu_get_s pathport_pdu_get;
90 struct pathport_pdu_getrep_s {
94 typedef struct pathport_pdu_getrep_s pathport_pdu_getrep;
109 struct pathport_pdu_arp_reply_s {
111 uint8_t ip[ola::network::IPV4Address::LENGTH];
112 uint8_t manufacturer_code;
113 uint8_t device_class;
115 uint8_t component_count;
118 typedef struct pathport_pdu_arp_reply_s pathport_pdu_arp_reply;
121 struct pathport_pdu_header_s {
126 typedef struct pathport_pdu_header_s pathport_pdu_header;
132 struct pathport_packet_pdu_s {
133 pathport_pdu_header head;
135 pathport_pdu_data data;
136 pathport_pdu_get
get;
137 pathport_pdu_getrep getrep;
138 pathport_pdu_arp_reply arp_reply;
142 typedef struct pathport_packet_pdu_s pathport_packet_pdu;
149 struct pathport_packet_header_s {
151 uint8_t version_major;
152 uint8_t version_minor;
156 uint32_t destination;
159 typedef struct pathport_packet_header_s pathport_packet_header;
166 struct pathport_packet_s {
167 pathport_packet_header header;
170 pathport_packet_pdu pdu;
176 #endif // PLUGINS_PATHPORT_PATHPORTPACKETS_H_