summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/net.h b/include/net.h
index e4ca0a6..8385943 100644
--- a/include/net.h
+++ b/include/net.h
@@ -22,6 +22,13 @@
#ifndef USURPATION_NET_H_INCLUDED
#define USURPATION_NET_H_INCLUDED
+#ifdef unix
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include <stddef.h>
+
#define MTU 1500
enum response {
@@ -29,8 +36,6 @@ enum response {
A_OK = 0, /* would be "OK", but clashes with some lib definitions */
NONEWDATA,
DEAD,
- NO_ESPTOOL,
- TMPFILE,
};
/**
@@ -49,5 +54,10 @@ int net_close(int nd);
* and needs to be free()'d later. Otherwise, the supplied buffer is reused.
*/
int net_getlastdata(int nd, char ** const data);
+int net_send(int nd, const char * const buf, size_t buf_size);
+
+#ifdef unix
+int net_send_addr(int nd, const char * const buf, size_t buf_size, const struct sockaddr_in * const addr);
+#endif
#endif /* USURPATION_NET_H_INCLUDED */