TuyaOS
include
components
tal_lwip
include
lwip
dhcp6.h
浏览该文件的文档.
1
9
/*
10
* Copyright (c) 2018 Simon Goldschmidt
11
* All rights reserved.
12
*
13
* Redistribution and use in source and binary forms, with or without modification,
14
* are permitted provided that the following conditions are met:
15
*
16
* 1. Redistributions of source code must retain the above copyright notice,
17
* this list of conditions and the following disclaimer.
18
* 2. Redistributions in binary form must reproduce the above copyright notice,
19
* this list of conditions and the following disclaimer in the documentation
20
* and/or other materials provided with the distribution.
21
* 3. The name of the author may not be used to endorse or promote products
22
* derived from this software without specific prior written permission.
23
*
24
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
25
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
27
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
29
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
33
* OF SUCH DAMAGE.
34
*
35
* This file is part of the lwIP TCP/IP stack.
36
*
37
* Author: Simon Goldschmidt <goldsimon@gmx.de>
38
*/
39
40
#ifndef LWIP_HDR_IP6_DHCP6_H
41
#define LWIP_HDR_IP6_DHCP6_H
42
43
#include "
lwip/opt.h
"
44
45
#if LWIP_IPV6_DHCP6
/* don't build if not configured for use in lwipopts.h */
46
47
#include "
lwip/err.h
"
48
#include "
lwip/netif.h
"
49
50
#ifdef __cplusplus
51
extern
"C"
{
52
#endif
53
55
#define DHCP6_TIMER_MSECS 500
56
57
struct
dhcp6
58
{
60
u32_t xid;
62
u8_t pcb_allocated;
64
u8_t state;
66
u8_t tries;
68
u8_t request_config_pending;
70
u16_t request_timeout;
71
#if LWIP_IPV6_DHCP6_STATEFUL
72
/* @todo: add more members here to keep track of stateful DHCPv6 data, like lease times */
73
#endif
/* LWIP_IPV6_DHCP6_STATEFUL */
74
};
75
76
void
dhcp6_set_struct(
struct
netif
*
netif
,
struct
dhcp6 *dhcp6);
78
#define dhcp6_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6, NULL)
79
void
dhcp6_cleanup(
struct
netif
*
netif
);
80
81
err_t
dhcp6_enable_stateful(
struct
netif
*
netif
);
82
err_t
dhcp6_enable_stateless(
struct
netif
*
netif
);
83
void
dhcp6_disable(
struct
netif
*
netif
);
84
85
void
dhcp6_tmr(
void
);
86
87
void
dhcp6_nd6_ra_trigger(
struct
netif
*
netif
, u8_t managed_addr_config, u8_t other_config);
88
89
#if LWIP_DHCP6_GET_NTP_SRV
93
extern
void
dhcp6_set_ntp_servers(u8_t num_ntp_servers,
const
ip_addr_t* ntp_server_addrs);
94
#endif
/* LWIP_DHCP6_GET_NTP_SRV */
95
96
#define netif_dhcp6_data(netif) ((struct dhcp6*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6))
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* LWIP_IPV6_DHCP6 */
103
104
#endif
/* LWIP_HDR_IP6_DHCP6_H */
err.h
err_t
s8_t err_t
Definition:
err.h:96
netif.h
opt.h
netif
Definition:
netif.h:260
制作者
1.9.4