#include <stdint.h>
+#ifndef LCC_NETWORK_BUFFER_SIZE
+#define LCC_NETWORK_BUFFER_SIZE 1452
+#endif
+
LCC_BEGIN_DECLS
/* lcc_network_parser_t is a callback that parses received network packets. It
/* lcc_listener_t holds parameters for running a collectd server. */
typedef struct {
- /* conn is a UDP socket for the server to listen on. */
+ /* conn is a UDP socket for the server to listen on. If set to <0 node and
+ * service will be used to open a new UDP socket. If >=0, it is the caller's
+ * job to clean up the socket. */
int conn;
/* node is the local address to listen on if conn is <0. Defaults to "::" (any
* lcc_network_parse() if set to NULL. */
lcc_network_parser_t parser;
- /* writer is the callback used to send incoming lcc_value_list_t to. */
- lcc_value_list_writer_t writer;
+ /* parse_options contains options for parser and is passed on verbatimely. */
+ lcc_network_parse_options_t parse_options;
- /* buffer_size determines the maximum packet size to accept. */
+ /* buffer_size determines the maximum packet size to accept. Defaults to
+ * LCC_NETWORK_BUFFER_SIZE if set to zero. */
uint16_t buffer_size;
- /* password_lookup is used to look up the password for a given username. */
- lcc_password_lookup_t password_lookup;
-
- /* security_level is the minimal required security level. */
- lcc_security_level_t security_level;
-
/* interface is the name of the interface to use when subscribing to a
* multicast group. Has no effect when using unicast. */
char *interface;