summaryrefslogtreecommitdiff
path: root/src/systemd/src/systemd/sd-dhcp6-client.h
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-04-08 09:17:51 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-04-08 09:17:51 +0200
commit8af18182f3bf55270aadc83f32c518935d553a2a (patch)
tree0dc71797e779414b472f588efb3259f9c641f4f8 /src/systemd/src/systemd/sd-dhcp6-client.h
parentddb5112180f68480157f67addcbf36e9c5154d85 (diff)
build: move systemd DHCP files to a common directory
Create a new directory 'src/systemd' and move systemd DHCP files there. This new directory will contain all the files imported from systemd.
Diffstat (limited to 'src/systemd/src/systemd/sd-dhcp6-client.h')
-rw-r--r--src/systemd/src/systemd/sd-dhcp6-client.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h
new file mode 100644
index 0000000000..e9663c0c71
--- /dev/null
+++ b/src/systemd/src/systemd/sd-dhcp6-client.h
@@ -0,0 +1,70 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#ifndef foosddhcp6clienthfoo
+#define foosddhcp6clienthfoo
+
+/***
+ This file is part of systemd.
+
+ Copyright (C) 2014 Intel Corporation. All rights reserved.
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <net/ethernet.h>
+
+#include "sd-event.h"
+
+#include "sd-dhcp6-lease.h"
+
+enum {
+ DHCP6_EVENT_STOP = 0,
+ DHCP6_EVENT_RESEND_EXPIRE = 10,
+ DHCP6_EVENT_RETRANS_MAX = 11,
+ DHCP6_EVENT_IP_ACQUIRE = 12,
+ DHCP6_EVENT_INFORMATION_REQUEST = 13,
+};
+
+typedef struct sd_dhcp6_client sd_dhcp6_client;
+
+typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event,
+ void *userdata);
+int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
+ sd_dhcp6_client_cb_t cb, void *userdata);
+
+int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index);
+int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
+ size_t addr_len, uint16_t arp_type);
+int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
+ size_t duid_len);
+int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client,
+ bool enabled);
+int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client,
+ bool *enabled);
+int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
+ uint16_t option);
+
+int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret);
+
+int sd_dhcp6_client_stop(sd_dhcp6_client *client);
+int sd_dhcp6_client_start(sd_dhcp6_client *client);
+int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event,
+ int priority);
+int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
+sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client);
+sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
+sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
+int sd_dhcp6_client_new(sd_dhcp6_client **ret);
+
+#endif