sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
acd.h
Go to the documentation of this file.
1
7
8/*
9 *
10 * Copyright (c) 2007 Dominik Spies <kontakt@dspies.de>
11 * Copyright (c) 2018 Jasper Verschueren <jasper.verschueren@apart-audio.com>
12 * All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without modification,
15 * are permitted provided that the following conditions are met:
16 *
17 * 1. Redistributions of source code must retain the above copyright notice,
18 * this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright notice,
20 * this list of conditions and the following disclaimer in the documentation
21 * and/or other materials provided with the distribution.
22 * 3. The name of the author may not be used to endorse or promote products
23 * derived from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
26 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
28 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
30 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
34 * OF SUCH DAMAGE.
35 *
36 * Author: Jasper Verschueren <jasper.verschueren@apart-audio.com>
37 * Author: Dominik Spies <kontakt@dspies.de>
38 */
39
40#ifndef LWIP_HDR_ACD_H
41#define LWIP_HDR_ACD_H
42
43#include "lwip/opt.h"
44
45/* don't build if not configured for use in lwipopts.h */
46#if LWIP_IPV4 && LWIP_ACD
47
48#include "lwip/netif.h"
49#include "lwip/etharp.h"
50#include "lwip/prot/acd.h"
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
61#define ACD_TMR_INTERVAL 100
62
69typedef void (*acd_conflict_callback_t)(struct netif *netif, acd_callback_enum_t state);
70
72struct acd
73{
75 struct acd *next;
77 ip4_addr_t ipaddr;
79 acd_state_enum_t state;
81 u8_t sent_num;
83 u16_t ttw;
85 u8_t lastconflict;
87 u8_t num_conflicts;
90 acd_conflict_callback_t acd_conflict_callback;
91};
92
93err_t acd_add(struct netif *netif, struct acd *acd,
94 acd_conflict_callback_t acd_conflict_callback);
95void acd_remove(struct netif *netif, struct acd *acd);
96err_t acd_start(struct netif *netif, struct acd *acd, ip4_addr_t ipaddr);
97err_t acd_stop(struct acd *acd);
98void acd_arp_reply(struct netif *netif, struct etharp_hdr *hdr);
99void acd_tmr(void);
100void acd_network_changed_link_down(struct netif *netif);
101void acd_netif_ip_addr_changed(struct netif *netif, const ip_addr_t *old_addr,
102 const ip_addr_t *new_addr);
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif /* LWIP_IPV4 && LWIP_ACD */
109
110#endif /* LWIP_HDR_ACD_H */
struct ip4_addr ip4_addr_t
Definition ps2ip_rpc.h:41
void * state
Definition tcpip.h:1325