]> git.meshlink.io Git - utcp/blobdiff - utcp_priv.h
Turn constants back into macros.
[utcp] / utcp_priv.h
index 1cf9e8743da561020be4165e533b553778798639..fe3fa6d799c84502ad97c5212f868ccf01da9126 100644 (file)
 
 #define DEFAULT_MTU 1000
 
-static const long USEC_PER_SEC = 1000000;
-static const long NSEC_PER_SEC = 1000000000;
-static const int DEFAULT_USER_TIMEOUT = 60; // sec
-static const long START_RTO = 1 * USEC_PER_SEC; // usec
-static const long MAX_RTO  = 3 * USEC_PER_SEC; // usec
+#define USEC_PER_SEC 1000000L
+#define NSEC_PER_SEC 1000000000L
+#define DEFAULT_USER_TIMEOUT 60
+#define START_RTO (1 * USEC_PER_SEC)
+#define MAX_RTO (3 * USEC_PER_SEC)
 
 struct hdr {
        uint16_t src; // Source port
@@ -106,6 +106,7 @@ struct utcp_connection {
        uint32_t flags;
 
        bool reapable;
+       bool do_poll;
 
        // Callbacks
 
@@ -145,6 +146,7 @@ struct utcp_connection {
 
        // Buffers
 
+       uint32_t prev_free;
        struct buffer sndbuf;
        struct buffer rcvbuf;
        struct sack sacks[NSACKS];