chiark / gitweb /
496501147ad52e463a1e4d44182b773943c6d3bf
[elogind.git] / src / systemd / sd-dhcp6-client.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 #ifndef foosddhcp6clienthfoo
4 #define foosddhcp6clienthfoo
5
6 /***
7   This file is part of systemd.
8
9   Copyright (C) 2014 Intel Corporation. All rights reserved.
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 ***/
24
25 #include <net/ethernet.h>
26
27 #include "sd-event.h"
28
29 enum {
30         DHCP6_EVENT_STOP                        = 0,
31 };
32
33 typedef struct sd_dhcp6_client sd_dhcp6_client;
34
35 typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event,
36                                      void *userdata);
37 int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
38                                  sd_dhcp6_client_cb_t cb, void *userdata);
39
40 int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index);
41 int sd_dhcp6_client_set_mac(sd_dhcp6_client *client,
42                             const struct ether_addr *mac_addr);
43
44 int sd_dhcp6_client_stop(sd_dhcp6_client *client);
45 int sd_dhcp6_client_start(sd_dhcp6_client *client);
46 int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event,
47                                  int priority);
48 int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
49 sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client);
50 sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
51 sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
52 int sd_dhcp6_client_new(sd_dhcp6_client **ret);
53
54 #endif