-#define MAXSOCKETS 8 /* Probably overkill... */
-
-typedef struct mac_t {
- uint8_t x[6];
-} mac_t;
-
-typedef struct ipv4_t {
- uint8_t x[4];
-} ipv4_t;
-
-typedef struct ipv6_t {
- uint16_t x[8];
-} ipv6_t;
-
-typedef short length_t;
-
-#define AF_UNKNOWN 255
-
-struct sockaddr_unknown {
- uint16_t family;
- uint16_t pad1;
- uint32_t pad2;
- char *address;
- char *port;
-};
-
-typedef union sockaddr_t {
- struct sockaddr sa;
- struct sockaddr_in in;
- struct sockaddr_in6 in6;
- struct sockaddr_unknown unknown;
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
- struct sockaddr_storage storage;
-#endif
-} sockaddr_t;
-
-#ifdef SA_LEN
-#define SALEN(s) SA_LEN(&s)
-#else
-#define SALEN(s) (s.sa_family==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6))
-#endif
+/* MAXBUFSIZE is the maximum size of a request: enough for a MAXSIZEd packet or a 8192 bits RSA key */
+#define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128)