summaryrefslogtreecommitdiff
path: root/code/esp32/components/eos/include
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-12-04 06:13:26 +0100
committerUros Majstorovic <majstor@majstor.org>2019-12-04 06:13:26 +0100
commit5454acdb6e04aa454989b78a2f20be2c25740585 (patch)
treed296067e23c50070b06e543193efb1536eb11822 /code/esp32/components/eos/include
parent4c28fb525edc64fa16c6c3bf10929dca65d9c77c (diff)
esp32: added sock interface
Diffstat (limited to 'code/esp32/components/eos/include')
-rw-r--r--code/esp32/components/eos/include/sock.h18
1 files changed, 18 insertions, 0 deletions
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 <stdint.h>
+
+#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