diff options
author | 2019-05-23 11:42:08 +0300 | |
---|---|---|
committer | 2019-05-27 14:37:26 +0300 | |
commit | aef4eba5572d6b42f8ef2913ec41c0e778731960 (patch) | |
tree | 2eaa07f03734ef69ed1f93f7ba9ce59e1ad12c5a /include | |
parent | 1fffc262c572e8ba4b962af329fb0d821d95b883 (diff) | |
download | usurpation-aef4eba5572d6b42f8ef2913ec41c0e778731960.tar.gz usurpation-aef4eba5572d6b42f8ef2913ec41c0e778731960.tar.bz2 usurpation-aef4eba5572d6b42f8ef2913ec41c0e778731960.zip |
dameon: net: implement sending data.
Also, dropped some adhockery and rebased some code.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'include')
-rw-r--r-- | include/net.h | 7 | ||||
-rw-r--r-- | include/settings.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/net.h b/include/net.h index e4ca0a6..02767dc 100644 --- a/include/net.h +++ b/include/net.h @@ -22,6 +22,9 @@ #ifndef USURPATION_NET_H_INCLUDED #define USURPATION_NET_H_INCLUDED +#include <netinet/in.h> +#include <stddef.h> + #define MTU 1500 enum response { @@ -29,8 +32,6 @@ enum response { A_OK = 0, /* would be "OK", but clashes with some lib definitions */ NONEWDATA, DEAD, - NO_ESPTOOL, - TMPFILE, }; /** @@ -49,5 +50,7 @@ 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); +int net_send_addr(int nd, const char * const buf, size_t buf_size, const struct sockaddr_in * const addr); #endif /* USURPATION_NET_H_INCLUDED */ diff --git a/include/settings.h b/include/settings.h index e2e9644..538c7fd 100644 --- a/include/settings.h +++ b/include/settings.h @@ -26,7 +26,7 @@ enum verbosity { SILENT = 0, ERR = 1, WARN, - DEBUG, + INFO, ALL }; |