X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.h;h=261d9c3cfb40c17e0f57897c19d3c576e6329073;hb=b13e1a3c1f7252cda5ab95166d9f2d578983471f;hp=28f8cb5e687c1355662ded4f5bb947d73d1bc696;hpb=2c6b2d70e6640f39563ad7bb0aa0ba87f883848c;p=tinc diff --git a/src/net.h b/src/net.h index 28f8cb5e..261d9c3c 100644 --- a/src/net.h +++ b/src/net.h @@ -28,12 +28,16 @@ #include "digest.h" #include "event.h" +#define EPOLL_MAX_EVENTS_PER_LOOP 32 + #ifdef ENABLE_JUMBOGRAMS #define MTU 9018 /* 9000 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */ #else #define MTU 1518 /* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */ #endif +#define MINMTU 512 /* Below this we don't consider UDP to be working */ + /* MAXSIZE is the maximum size of an encapsulated packet: MTU + seqno + srcid + dstid + padding + HMAC + compressor overhead */ #define MAXSIZE (MTU + 4 + sizeof(node_id_t) + sizeof(node_id_t) + CIPHER_MAX_BLOCK_SIZE + DIGEST_MAX_SIZE + MTU/64 + 20) @@ -120,7 +124,7 @@ typedef struct outgoing_t { timeout_t ev; } outgoing_t; -extern list_t *outgoing_list; +extern list_t outgoing_list; extern int maxoutbufsize; extern int seconds_till_retry;