21 #ifndef PLUGINS_SANDNET_SANDNETPACKETS_H_ 22 #define PLUGINS_SANDNET_SANDNETPACKETS_H_ 24 #include <sys/types.h> 27 #include <netinet/in.h> 33 #include "plugins/sandnet/SandNetCommon.h" 39 enum { SANDNET_NAME_LENGTH = 31};
50 SANDNET_ADVERTISEMENT = 0x0100,
51 SANDNET_CONTROL = 0x0200,
53 SANDNET_NAME = 0x0400,
54 SANDNET_IDENTIFY = 0x0500,
55 SANDNET_PROG = 0x0600,
57 SANDNET_COMPRESSED_DMX = 0x0a00,
62 } __attribute__((packed));
65 typedef enum packet_type_e packet_type_t;
72 SANDNET_SANDNET = 0x02,
73 SANDNET_ARTNET = 0x04,
74 SANDNET_COMPULIGHT = 0x06,
75 SANDNET_SHOWNET = 0x09,
82 } __attribute__((packed));
85 typedef enum protocol_id_e protocol_id_t;
88 struct sandnet_packet_advertisement_port_s {
89 protocol_id_t protocol;
103 struct sandnet_advertisement_s {
104 uint8_t mac[ola::network::MACAddress::LENGTH];
106 struct sandnet_packet_advertisement_port_s ports[SANDNET_MAX_PORTS];
108 char name[SANDNET_NAME_LENGTH];
115 typedef struct sandnet_advertisement_s sandnet_advertisement;
122 struct sandnet_dmx_s {
129 typedef struct sandnet_dmx_s sandnet_dmx;
136 struct sandnet_port_control_s {
137 uint8_t mac[ola::network::MACAddress::LENGTH];
139 struct sandnet_packet_advertisement_port_s ports[SANDNET_MAX_PORTS];
142 typedef struct sandnet_port_control_s sandnet_port_control;
149 struct sandnet_name_s {
150 uint8_t mac[ola::network::MACAddress::LENGTH];
152 uint8_t name[SANDNET_NAME_LENGTH];
155 typedef struct sandnet_name_s sandnet_name;
163 struct sandnet_identify_s {
164 uint8_t mac[ola::network::MACAddress::LENGTH];
167 typedef struct sandnet_identify_s sandnet_identify;
175 struct sandnet_program_s {
176 uint8_t mac[ola::network::MACAddress::LENGTH];
177 uint8_t ip[ola::network::IPV4Address::LENGTH];
179 uint8_t netmask[ola::network::IPV4Address::LENGTH];
182 typedef struct sandnet_program_s sandnet_program;
189 struct sandnet_led_s {
190 uint8_t mac[ola::network::MACAddress::LENGTH];
194 typedef struct sandnet_led_s sandnet_led;
201 struct sandnet_compressed_dmx_s {
211 typedef struct sandnet_compressed_dmx_s sandnet_compressed_dmx;
216 struct sandnet_packet {
219 sandnet_advertisement advertisement;
220 sandnet_port_control port_control;
224 sandnet_program program;
226 sandnet_compressed_dmx compressed_dmx;
232 #endif // PLUGINS_SANDNET_SANDNETPACKETS_H_ #define PACK(__Declaration__)
Pack structures.
Definition: Macro.h:170
Constants used throughout OLA.
Definition: Constants.h:36
Represents an IPv4 Address.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Represents a MAC Address.