X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.h;h=1765b1cd891a560c19677c2918b1e2140a361157;hb=373b0c12d9d0e8a3b449fd18be704e28dd6403e1;hp=f945a1f961cca891677700abdacd3fb104ed0442;hpb=0871c3095151bce6a4031a2662aa51b7193b855c;p=tinc diff --git a/src/net.h b/src/net.h index f945a1f9..1765b1cd 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) @@ -211,7 +215,7 @@ extern void load_all_nodes(void); extern void try_tx(struct node_t *n, bool mtu); extern void tarpit(int fd); -#ifndef HAVE_MINGW +#ifndef HAVE_WINDOWS #define closesocket(s) close(s) #endif