From eafa3df60689d3ad2b4316c42a8360ed47072a00 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Fri, 25 Aug 2017 14:53:23 +0200 Subject: Added fwmark code --- src/constants.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/constants.go') diff --git a/src/constants.go b/src/constants.go index 5ee8646..71dd98e 100644 --- a/src/constants.go +++ b/src/constants.go @@ -30,12 +30,14 @@ const ( QueueOutboundSize = 1024 QueueInboundSize = 1024 QueueHandshakeSize = 1024 - MinMessageSize = MessageTransportSize // size of keep-alive - MaxMessageSize = ((1 << 16) - 1) + MessageTransportHeaderSize - MaxPeers = 1 << 16 + MaxSegmentSize = (1 << 16) - 1 // largest possible UDP datagram + MinMessageSize = MessageKeepaliveSize // minimum size of transport message (keepalive) + MaxMessageSize = MaxSegmentSize // maximum size of transport message + MaxContentSize = MaxSegmentSize - MessageTransportSize // maximum size of transport message content ) const ( UnderLoadQueueSize = QueueHandshakeSize / 8 UnderLoadAfterTime = time.Second // how long does the device remain under load after detected + MaxPeers = 1 << 16 // maximum number of configured peers ) -- cgit v1.2.3