X-Git-Url: http://git.meshlink.io/?p=utcp;a=blobdiff_plain;f=utcp_priv.h;h=69f1b0da5347371649da4dbaa92973cfed0617eb;hp=b9979539465a7ac7e5cbae1b9e5c3258fc8a445a;hb=fb2d3fbb1fe0538ef0f137ed88322f5b3de4707f;hpb=3c10b4a62f71cdc92e7dea3ace931ec1f497a660 diff --git a/utcp_priv.h b/utcp_priv.h index b997953..69f1b0d 100644 --- a/utcp_priv.h +++ b/utcp_priv.h @@ -30,8 +30,11 @@ #define FIN 4 #define RST 8 +#define NSACKS 4 #define DEFAULT_SNDBUFSIZE 4096 #define DEFAULT_MAXSNDBUFSIZE 131072 +#define DEFAULT_RCVBUFSIZE 0 +#define DEFAULT_MAXRCVBUFSIZE 131072 struct hdr { uint16_t src; // Source port @@ -78,6 +81,11 @@ struct buffer { uint32_t maxsize; }; +struct sack { + uint32_t offset; + uint32_t len; +}; + struct utcp_connection { void *priv; struct utcp *utcp; @@ -118,9 +126,11 @@ struct utcp_connection { struct timeval conn_timeout; struct timeval rtrx_timeout; - // Send buffer + // Buffers struct buffer sndbuf; + struct buffer rcvbuf; + struct sack sacks[NSACKS]; // Per-socket options