summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net.h b/include/net.h
index 59071a5..e4ca0a6 100644
--- a/include/net.h
+++ b/include/net.h
@@ -22,7 +22,7 @@
#ifndef USURPATION_NET_H_INCLUDED
#define USURPATION_NET_H_INCLUDED
-#define dgsize 512
+#define MTU 1500
enum response {
ERROR = -1,
@@ -34,7 +34,7 @@ enum response {
};
/**
- * Initialises connection with daemon and returns a network descriptor.
+ * Initialises a listening socket and returns the associated network descriptor.
*/
int net_init(const unsigned short int port);
@@ -45,9 +45,9 @@ int net_close(int nd);
/**
* Get last data received from connection associated with network descriptor.
- * Function mallocates a buffer for data received from packet. Don't forget to
- * free the buffer.
+ * If the pointer pointed by data is NULL, a buffer is allocated by the function
+ * and needs to be free()'d later. Otherwise, the supplied buffer is reused.
*/
-int net_getlastdata(int nd, char * const data);
+int net_getlastdata(int nd, char ** const data);
#endif /* USURPATION_NET_H_INCLUDED */