]> git.proxmox.com Git - systemd.git/blame - src/systemd/sd-dhcp6-client.h
Imported Upstream version 217
[systemd.git] / src / systemd / sd-dhcp6-client.h
CommitLineData
e842803a
MB
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#include "sd-dhcp6-lease.h"
30
31enum {
32 DHCP6_EVENT_STOP = 0,
33 DHCP6_EVENT_RESEND_EXPIRE = 10,
34 DHCP6_EVENT_RETRANS_MAX = 11,
35 DHCP6_EVENT_IP_ACQUIRE = 12,
36};
37
38typedef struct sd_dhcp6_client sd_dhcp6_client;
39
40typedef void (*sd_dhcp6_client_cb_t)(sd_dhcp6_client *client, int event,
41 void *userdata);
42int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
43 sd_dhcp6_client_cb_t cb, void *userdata);
44
45int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index);
5eef597e
MP
46int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
47 size_t addr_len, uint16_t arp_type);
48int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
49 size_t duid_len);
e842803a
MB
50int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
51 uint16_t option);
52
53int sd_dhcp6_client_get_lease(sd_dhcp6_client *client, sd_dhcp6_lease **ret);
54
55int sd_dhcp6_client_stop(sd_dhcp6_client *client);
56int sd_dhcp6_client_start(sd_dhcp6_client *client);
57int sd_dhcp6_client_attach_event(sd_dhcp6_client *client, sd_event *event,
58 int priority);
59int sd_dhcp6_client_detach_event(sd_dhcp6_client *client);
60sd_event *sd_dhcp6_client_get_event(sd_dhcp6_client *client);
61sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
62sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
63int sd_dhcp6_client_new(sd_dhcp6_client **ret);
64
65#endif