From 5454acdb6e04aa454989b78a2f20be2c25740585 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 4 Dec 2019 06:13:26 +0100 Subject: esp32: added sock interface --- code/esp32/components/eos/include/sock.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 code/esp32/components/eos/include/sock.h (limited to 'code/esp32/components/eos/include') diff --git a/code/esp32/components/eos/include/sock.h b/code/esp32/components/eos/include/sock.h new file mode 100644 index 0000000..7e937cb --- /dev/null +++ b/code/esp32/components/eos/include/sock.h @@ -0,0 +1,18 @@ +#include + +#define EOS_SOCK_MTYPE_PKT 0 +#define EOS_SOCK_MTYPE_OPEN_DGRAM 1 +#define EOS_SOCK_MTYPE_CLOSE 127 + +#define EOS_SOCK_MAX_SOCK 2 + +#define EOS_SOCK_SIZE_UDP_HDR 8 + +#define EOS_IPv4_ADDR_SIZE 4 + +typedef struct EOSNetAddr { + unsigned char host[EOS_IPv4_ADDR_SIZE]; + uint16_t port; +} EOSNetAddr; + +void eos_sock_init(void); \ No newline at end of file -- cgit v1.2.3