2 * collectd - src/libcollectdclient/network.h
3 * Copyright (C) 2005-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_H
24 #define LIBCOLLECTDCLIENT_NETWORK_H 1
31 #define NET_DEFAULT_V4_ADDR "239.192.74.66"
32 #define NET_DEFAULT_V6_ADDR "ff18::efc0:4a42"
33 #define NET_DEFAULT_PORT "25826"
36 typedef struct lcc_network_s lcc_network_t;
39 typedef struct lcc_server_s lcc_server_t;
41 enum lcc_security_level_e
47 typedef enum lcc_security_level_e lcc_security_level_t;
50 * Create / destroy object
52 lcc_network_t *lcc_network_create (void);
53 void lcc_network_destroy (lcc_network_t *net);
58 lcc_server_t *lcc_server_create (lcc_network_t *net,
59 const char *node, const char *service);
60 int lcc_server_destroy (lcc_network_t *net, lcc_server_t *srv);
62 /* Configure servers */
63 int lcc_server_set_ttl (lcc_server_t *srv, uint8_t ttl);
64 int lcc_server_set_security_level (lcc_server_t *srv,
65 lcc_security_level_t level,
66 const char *username, const char *password);
71 int lcc_network_values_send (lcc_network_t *net,
72 const lcc_value_list_t *vl);
74 int lcc_network_notification_send (lcc_network_t *net,
75 const lcc_notification_t *notif);
78 /* vim: set sw=2 sts=2 et : */
79 #endif /* LIBCOLLECTDCLIENT_NETWORK_H */