… | |
… | |
111 | #define TCP_OVERHEAD (IP_OVERHEAD + 22) // size of a (normal) ip + tcp header + packetlength |
111 | #define TCP_OVERHEAD (IP_OVERHEAD + 22) // size of a (normal) ip + tcp header + packetlength |
112 | #define MAX_OVERHEAD UDP_OVERHEAD // the max. overhead of any protocol (ok, tcp doesn't count) |
112 | #define MAX_OVERHEAD UDP_OVERHEAD // the max. overhead of any protocol (ok, tcp doesn't count) |
113 | #define ETH_OVERHEAD 14 // the size of an ethernet header |
113 | #define ETH_OVERHEAD 14 // the size of an ethernet header |
114 | #define MAXSIZE (MAX_MTU + IP_OVERHEAD) // slightly too large, but who cares |
114 | #define MAXSIZE (MAX_MTU + IP_OVERHEAD) // slightly too large, but who cares |
115 | |
115 | |
116 | #define PKTCACHESIZE 16 // the size of the memory pool for packets |
116 | #define PKTCACHESIZE 128 // the size of the memory pool for packets |
117 | |
117 | |
118 | extern char *confbase; // directory in which all config files are |
118 | extern char *confbase; // directory in which all config files are |
119 | extern char *thisnode; // config for current node (TODO: remove) |
119 | extern char *thisnode; // config for current node (TODO: remove) |
120 | |
120 | |
121 | template<typename T, typename U> static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } |
121 | template<typename T, typename U> static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } |