sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
autoip.h
Go to the documentation of this file.
1
7
8/*
9 *
10 * Copyright (c) 2007 Dominik Spies <kontakt@dspies.de>
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 * Author: Dominik Spies <kontakt@dspies.de>
36 *
37 * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform
38 * with RFC 3927.
39 *
40 */
41
42#ifndef LWIP_HDR_AUTOIP_H
43#define LWIP_HDR_AUTOIP_H
44
45#include "lwip/opt.h"
46
47#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
48
49#include "lwip/netif.h"
50/* #include "lwip/udp.h" */
51#include "lwip/etharp.h"
52#include "lwip/acd.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
59struct autoip
60{
62 ip4_addr_t llipaddr;
64 u8_t state;
66 u8_t tried_llipaddr;
68 struct acd acd;
69};
70
71
72void autoip_set_struct(struct netif *netif, struct autoip *autoip);
73void autoip_remove_struct(struct netif *netif);
74err_t autoip_start(struct netif *netif);
75err_t autoip_stop(struct netif *netif);
76void autoip_network_changed_link_up(struct netif *netif);
77void autoip_network_changed_link_down(struct netif *netif);
78u8_t autoip_supplied_address(struct netif *netif);
79
80/* for lwIP internal use by ip4.c */
81u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr);
82
83#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP))
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* LWIP_IPV4 && LWIP_AUTOIP */
90
91#endif /* LWIP_HDR_AUTOIP_H */
struct ip4_addr ip4_addr_t
Definition ps2ip_rpc.h:41