sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
tcpip.h
Go to the documentation of this file.
1
5
6
/*
7
* Copyright (c) 2001-2004 Swedish Institute of Computer Science.
8
* All rights reserved.
9
*
10
* Redistribution and use in source and binary forms, with or without modification,
11
* are permitted provided that the following conditions are met:
12
*
13
* 1. Redistributions of source code must retain the above copyright notice,
14
* this list of conditions and the following disclaimer.
15
* 2. Redistributions in binary form must reproduce the above copyright notice,
16
* this list of conditions and the following disclaimer in the documentation
17
* and/or other materials provided with the distribution.
18
* 3. The name of the author may not be used to endorse or promote products
19
* derived from this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30
* OF SUCH DAMAGE.
31
*
32
* This file is part of the lwIP TCP/IP stack.
33
*
34
* Author: Adam Dunkels <adam@sics.se>
35
*
36
*/
37
#ifndef LWIP_HDR_TCPIP_H
38
#define LWIP_HDR_TCPIP_H
39
40
#include "
lwip/opt.h
"
41
42
#if !NO_SYS
/* don't build if not configured for use in lwipopts.h */
43
44
#include "
lwip/err.h
"
45
#include "
lwip/timeouts.h
"
46
#include "
lwip/netif.h
"
47
48
#ifdef __cplusplus
49
extern
"C"
{
50
#endif
51
52
#if LWIP_TCPIP_CORE_LOCKING
54
extern
sys_mutex_t lock_tcpip_core;
55
#if !defined LOCK_TCPIP_CORE || defined __DOXYGEN__
57
#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core)
59
#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core)
60
#endif
/* LOCK_TCPIP_CORE */
61
#else
/* LWIP_TCPIP_CORE_LOCKING */
62
#define LOCK_TCPIP_CORE()
63
#define UNLOCK_TCPIP_CORE()
64
#endif
/* LWIP_TCPIP_CORE_LOCKING */
65
66
struct
pbuf
;
67
struct
netif
;
68
70
typedef
void (*
tcpip_init_done_fn
)(
void
*arg);
72
typedef
void (*
tcpip_callback_fn
)(
void
*ctx);
73
74
/* Forward declarations */
75
struct
tcpip_callback_msg;
76
77
void
tcpip_init
(
tcpip_init_done_fn
tcpip_init_done,
void
*arg);
78
79
err_t
tcpip_inpkt
(
struct
pbuf
*p,
struct
netif
*inp,
netif_input_fn
input_fn);
80
err_t
tcpip_input
(
struct
pbuf
*p,
struct
netif
*inp);
81
82
err_t
tcpip_try_callback
(
tcpip_callback_fn
function,
void
*ctx);
83
err_t
tcpip_callback
(
tcpip_callback_fn
function,
void
*ctx);
84
err_t
tcpip_callback_wait
(
tcpip_callback_fn
function,
void
*ctx);
88
#define tcpip_callback_with_block(function, ctx, block) ((block != 0)? tcpip_callback(function, ctx) : tcpip_try_callback(function, ctx))
89
90
struct
tcpip_callback_msg*
tcpip_callbackmsg_new
(
tcpip_callback_fn
function,
void
*ctx);
91
void
tcpip_callbackmsg_delete
(
struct
tcpip_callback_msg* msg);
92
err_t
tcpip_callbackmsg_trycallback
(
struct
tcpip_callback_msg* msg);
93
err_t
tcpip_callbackmsg_trycallback_fromisr
(
struct
tcpip_callback_msg* msg);
94
95
/* free pbufs or heap memory from another context without blocking */
96
err_t
pbuf_free_callback
(
struct
pbuf
*p);
97
err_t
mem_free_callback
(
void
*m);
98
99
#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS
100
err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h,
void
*arg);
101
err_t tcpip_untimeout(sys_timeout_handler h,
void
*arg);
102
#endif
/* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
103
104
#ifdef TCPIP_THREAD_TEST
105
int
tcpip_thread_poll_one(
void
);
106
#endif
107
108
#ifdef __cplusplus
109
}
110
#endif
111
112
#endif
/* !NO_SYS */
113
114
#endif
/* LWIP_HDR_TCPIP_H */
netif_input_fn
err_t(*) netif_input_fn(struct pbuf *p, struct netif *inp)
Definition
tcpip.h:1207
err.h
tcpip_callbackmsg_new
struct tcpip_callback_msg * tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx)
Definition
tcpip.c:545
tcpip_init
void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg)
Definition
tcpip.c:659
tcpip_callbackmsg_trycallback_fromisr
err_t tcpip_callbackmsg_trycallback_fromisr(struct tcpip_callback_msg *msg)
Definition
tcpip.c:600
tcpip_callbackmsg_trycallback
err_t tcpip_callbackmsg_trycallback(struct tcpip_callback_msg *msg)
Definition
tcpip.c:581
tcpip_callback
err_t tcpip_callback(tcpip_callback_fn function, void *ctx)
Definition
tcpip.c:323
tcpip_callbackmsg_delete
void tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg)
Definition
tcpip.c:566
tcpip_input
err_t tcpip_input(struct pbuf *p, struct netif *inp)
Definition
tcpip.c:297
tcpip_try_callback
err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx)
Definition
tcpip.c:359
netif.h
opt.h
tcpip_callback_fn
void(*) tcpip_callback_fn(void *ctx)
Definition
ps2ip.h:74
tcpip_init_done_fn
void(*) tcpip_init_done_fn(void *arg)
Definition
tcpip.h:70
mem_free_callback
err_t mem_free_callback(void *m)
Definition
tcpip.c:710
pbuf_free_callback
err_t pbuf_free_callback(struct pbuf *p)
Definition
tcpip.c:697
tcpip_callback_wait
err_t tcpip_callback_wait(tcpip_callback_fn function, void *ctx)
Definition
tcpip.c:619
tcpip_inpkt
err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
Definition
tcpip.c:254
netif
Definition
tcpip.h:1271
pbuf
Definition
tcpip.h:234
timeouts.h
core
ps2ip
include
lwip_include
lwip
tcpip.h
Generated by
1.18.0