]> git.meshlink.io Git - utcp/blobdiff - utcp_priv.h
Allow debug messages to be compiled out.
[utcp] / utcp_priv.h
index 5a72ce9a1fd58a0ffecd9872a102d8cc899123d9..24ae4cc4655a0b3d440369f042dc4eb6d705d843 100644 (file)
@@ -30,6 +30,9 @@
 #define FIN 4
 #define RST 8
 
+#define DEFAULT_SNDBUFSIZE 4096
+#define DEFAULT_MAXSNDBUFSIZE 131072
+
 struct hdr {
        uint16_t src; // Source port
        uint16_t dst; // Destination port
@@ -54,7 +57,7 @@ enum state {
        TIME_WAIT
 };
 
-static const char *strstate[] = {
+static const char *strstate[] __attribute__((unused)) = {
        [CLOSED] = "CLOSED",
        [LISTEN] = "LISTEN",
        [SYN_SENT] = "SYN_SENT",
@@ -73,6 +76,9 @@ struct utcp_connection {
        struct utcp *utcp;
        bool reapable;
 
+       bool nodelay;
+       bool keepalive;
+
        uint16_t src;
        uint16_t dst;
        enum state state;
@@ -99,6 +105,7 @@ struct utcp_connection {
 
        char *sndbuf;
        uint32_t sndbufsize;
+       uint32_t maxsndbufsize;
 };
 
 struct utcp {