ReactOS 0.4.16-dev-297-gc569aee
autoip.h
Go to the documentation of this file.
1
7/*
8 *
9 * Copyright (c) 2007 Dominik Spies <kontakt@dspies.de>
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without modification,
13 * are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 * 3. The name of the author may not be used to endorse or promote products
21 * derived from this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
26 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32 * OF SUCH DAMAGE.
33 *
34 * Author: Dominik Spies <kontakt@dspies.de>
35 *
36 * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform
37 * with RFC 3927.
38 *
39 */
40
41#ifndef LWIP_HDR_AUTOIP_H
42#define LWIP_HDR_AUTOIP_H
43
44#include "lwip/opt.h"
45
46#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
47
48#include "lwip/netif.h"
49/* #include "lwip/udp.h" */
50#include "lwip/etharp.h"
51#include "lwip/acd.h"
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
58struct autoip
59{
61 ip4_addr_t llipaddr;
63 u8_t state;
65 u8_t tried_llipaddr;
67 struct acd acd;
68};
69
70
71void autoip_set_struct(struct netif *netif, struct autoip *autoip);
72void autoip_remove_struct(struct netif *netif);
73err_t autoip_start(struct netif *netif);
74err_t autoip_stop(struct netif *netif);
75void autoip_network_changed_link_up(struct netif *netif);
76void autoip_network_changed_link_down(struct netif *netif);
77u8_t autoip_supplied_address(struct netif *netif);
78
79/* for lwIP internal use by ip4.c */
80u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr);
81
82#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP))
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* LWIP_IPV4 && LWIP_AUTOIP */
89
90#endif /* LWIP_HDR_AUTOIP_H */
static int state
Definition: maze.c:121
GLenum const GLvoid * addr
Definition: glext.h:9621
uint8_t u8_t
Definition: arch.h:125
s8_t err_t
Definition: err.h:96
Definition: netif.h:269