*/
#define MAX_NAT_D_PAYLOADS 10
-/**
- * Maximum packet size for fragmented packets (same as in sockets)
- */
-#define MAX_PACKET 10000
-
/**
* A payload rule defines the rules for a payload
* in a specific message rule. It defines if and how
}
INIT(this->frag,
.max_packet = lib->settings->get_int(lib->settings,
- "%s.max_packet", MAX_PACKET, lib->ns),
+ "%s.max_packet", PACKET_MAX_DEFAULT, lib->ns),
);
return &this->public;
}
#include <daemon.h>
#include <threading/thread.h>
-/* Maximum size of a packet */
-#define MAX_PACKET 10000
-
/* these are not defined on some platforms */
#ifndef SOL_IP
#define SOL_IP IPPROTO_IP
.natt = lib->settings->get_int(lib->settings,
"%s.port_nat_t", CHARON_NATT_PORT, lib->ns),
.max_packet = lib->settings->get_int(lib->settings,
- "%s.max_packet", MAX_PACKET, lib->ns),
+ "%s.max_packet", PACKET_MAX_DEFAULT, lib->ns),
.set_source = lib->settings->get_bool(lib->settings,
"%s.plugins.socket-default.set_source", TRUE,
lib->ns),
#include <threading/rwlock.h>
#include <collections/hashtable.h>
-/* Maximum size of a packet */
-#define MAX_PACKET 10000
-
/* these are not defined on some platforms */
#ifndef SOL_IP
#define SOL_IP IPPROTO_IP
},
.lock = rwlock_create(RWLOCK_TYPE_DEFAULT),
.max_packet = lib->settings->get_int(lib->settings,
- "%s.max_packet", MAX_PACKET, lib->ns),
+ "%s.max_packet", PACKET_MAX_DEFAULT, lib->ns),
);
if (pipe(this->notify) != 0)
#include <mswsock.h>
-/* Maximum size of a packet */
-#define MAX_PACKET 10000
-
/* number of sockets in use */
#define SOCKET_COUNT 2
"%s.port_nat_t", CHARON_NATT_PORT, lib->ns),
},
.max_packet = lib->settings->get_int(lib->settings,
- "%s.max_packet", MAX_PACKET, lib->ns),
+ "%s.max_packet", PACKET_MAX_DEFAULT, lib->ns),
);
for (i = 0; i < SOCKET_COUNT; i++)
#include <library.h>
#include <networking/host.h>
+/**
+ * Maximum packet size we handle by default
+ */
+#define PACKET_MAX_DEFAULT 10000
+
/**
* Abstraction of an IP/UDP-Packet, contains data, sender and receiver.
*/