2 * collectd - src/libcollectdclient/network_buffer.h
3 * Copyright (C) 2010 Florian octo Forster
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; only version 2.1 of the License is
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * Florian octo Forster <octo at verplant.org>
23 #ifndef LIBCOLLECTDCLIENT_NETWORK_BUFFER_H
24 #define LIBCOLLECTDCLIENT_NETWORK_BUFFER_H 1
30 /* Ethernet frame - (IPv6 header + UDP header) */
31 #define LCC_NETWORK_BUFFER_SIZE_DEFAULT 1452
33 struct lcc_network_buffer_s;
34 typedef struct lcc_network_buffer_s lcc_network_buffer_t;
36 lcc_network_buffer_t *lcc_network_buffer_create (size_t size);
37 void lcc_network_buffer_destroy (lcc_network_buffer_t *nb);
39 int lcc_network_buffer_set_security_level (lcc_network_buffer_t *nb,
40 lcc_security_level_t level,
41 const char *user, const char *password);
43 int lcc_network_buffer_initialize (lcc_network_buffer_t *nb);
44 int lcc_network_buffer_finalize (lcc_network_buffer_t *nb);
46 int lcc_network_buffer_add_value (lcc_network_buffer_t *nb,
47 const lcc_value_list_t *vl);
49 int lcc_network_buffer_get (lcc_network_buffer_t *nb,
50 void *buffer, size_t *buffer_size);
52 #endif /* LIBCOLLECTDCLIENT_NETWORK_BUFFER_H */
53 /* vim: set sw=2 sts=2 et : */