Embedded TCP/IP stack  4.7.0
fnet_autoip.h
1 /**************************************************************************
2 *
3 * Copyright 2016-2018 by Andrey Butok. FNET Community.
4 *
5 ***************************************************************************
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ***************************************************************************/
20 
21 #ifndef _FNET_AUTOIP_H_
22 #define _FNET_AUTOIP_H_
23 
24 #if FNET_CFG_AUTOIP || defined(__DOXYGEN__)
25 
56 /**************************************************************************/
61 #define FNET_AUTOIP_NETWORK FNET_IP4_ADDR_INIT(169U, 254U, 0U, 0U)
62 /**************************************************************************/
67 #define FNET_AUTOIP_NETMASK FNET_IP4_ADDR_INIT(255U, 255U, 0U, 0U)
68 
69 /**************************************************************************/
73 typedef void *fnet_autoip_desc_t;
74 
75 /**************************************************************************/
86 typedef void(*fnet_autoip_callback_t)(fnet_autoip_desc_t desc, fnet_netif_desc_t netif, void *cookie);
87 
88 /**************************************************************************/
91 typedef struct
92 {
101 
102 /***************************************************************************/
121 
122 /***************************************************************************/
138 
139 /***************************************************************************/
158 void fnet_autoip_set_callback_updated (fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_updated, void *cookie);
159 
160 /***************************************************************************/
180 void fnet_autoip_set_callback_probe (fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_probe, void *param);
181 
182 /***************************************************************************/
198 
199 /***************************************************************************/
218 
221 #endif /* FNET_CFG_AUTOIP || defined(__DOXYGEN__) */
222 
223 #endif /* _FNET_AUTOIP_H_ */
fnet_bool_t fnet_autoip_is_enabled(fnet_autoip_desc_t desc)
Detects if the Auto-IP service is enabled or disabled.
void fnet_autoip_release(fnet_autoip_desc_t desc)
Releases the Auto-IP service.
void(* fnet_autoip_callback_t)(fnet_autoip_desc_t desc, fnet_netif_desc_t netif, void *cookie)
Auto-IP event handler callback function prototype, that is called when the Auto-IP service has update...
Definition: fnet_autoip.h:86
fnet_autoip_desc_t fnet_autoip_get_by_netif(fnet_netif_desc_t netif)
Looks for a Auto-IP service assigned to the specified network interface.
fnet_autoip_desc_t fnet_autoip_init(fnet_autoip_params_t *params)
Initializes the Auto-IP service.
fnet_bool_t
Boolean type.
Definition: fnet_stdlib.h:80
fnet_netif_desc_t netif_desc
Network interface descriptor to be used by the Link-Local service.
Definition: fnet_autoip.h:93
void * fnet_autoip_desc_t
Auto-IP service descriptor.
Definition: fnet_autoip.h:73
fnet_uint32_t fnet_ip4_addr_t
32-bit IPv4 address type.
Definition: fnet_ip4.h:35
fnet_ip4_addr_t ip_address
Suggested IP address. For example, it may be used for the case when the network media indicates that ...
Definition: fnet_autoip.h:94
void fnet_autoip_set_callback_probe(fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_probe, void *param)
Registers the "Address probing" Auto-IP event handler callback.
Initialization parameters for the fnet_autoip_init() function.
Definition: fnet_autoip.h:91
void * fnet_netif_desc_t
Network interface descriptor.
Definition: fnet_netif.h:68
void fnet_autoip_set_callback_updated(fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_updated, void *cookie)
Registers the "IPv4 parameters updated" Auto-IP event handler callback.

© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net