sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
core/ps2ip

Imports and definitions for ps2ip. More...

Topics

 TLS layer
 Options
 Options
 Options
 Options
 Options
 Options
 Options
 Options
 Error codes
 Version
 Options (lwipopts.h)
 IANA assigned numbers
 IEEE assigned numbers
 Options
 Netconn API
 NETDB API
 DNS
 IP
 IP address handling
 Memory pools
 Network interface (NETIF)
 Packet buffers (PBUF)
 RAW
 Porting (system abstraction layer)
 TCP
 UDP
 Ethernet

Files

file  core/ps2ip/include/arch/cc.h
file  core/ps2ip/include/arch/cpu.h
file  core/ps2ip/include/arch/perf.h
file  core/ps2ip/include/arch/sys_arch.h
file  core/ps2ip/include/lwip_include/compat/posix/arpa/inet.h
file  core/ps2ip/include/lwip_include/compat/posix/net/if.h
file  core/ps2ip/include/lwip_include/compat/posix/netdb.h
file  core/ps2ip/include/lwip_include/compat/posix/sys/socket.h
file  core/ps2ip/include/lwip_include/compat/stdc/errno.h
file  core/ps2ip/include/lwip_include/lwip/acd.h
file  core/ps2ip/include/lwip_include/lwip/altcp_tcp.h
file  core/ps2ip/include/lwip_include/lwip/apps/altcp_proxyconnect.h
file  core/ps2ip/include/lwip_include/lwip/apps/altcp_tls_mbedtls_opts.h
file  core/ps2ip/include/lwip_include/lwip/apps/fs.h
file  core/ps2ip/include/lwip_include/lwip/apps/lwiperf.h
file  core/ps2ip/include/lwip_include/lwip/apps/mdns_domain.h
file  core/ps2ip/include/lwip_include/lwip/apps/mdns_out.h
file  core/ps2ip/include/lwip_include/lwip/apps/mdns_priv.h
file  core/ps2ip/include/lwip_include/lwip/apps/mqtt_priv.h
file  core/ps2ip/include/lwip_include/lwip/apps/netbiosns.h
file  core/ps2ip/include/lwip_include/lwip/apps/smtp.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_core.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_mib2.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_scalar.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_snmpv2_framework.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_snmpv2_usm.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_table.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmp_threadsync.h
file  core/ps2ip/include/lwip_include/lwip/apps/snmpv3.h
file  core/ps2ip/include/lwip_include/lwip/apps/sntp.h
file  core/ps2ip/include/lwip_include/lwip/apps/tftp_client.h
file  core/ps2ip/include/lwip_include/lwip/apps/tftp_server.h
file  core/ps2ip/include/lwip_include/lwip/autoip.h
file  core/ps2ip/include/lwip_include/lwip/dhcp.h
file  core/ps2ip/include/lwip_include/lwip/dhcp6.h
file  core/ps2ip/include/lwip_include/lwip/dns.h
file  core/ps2ip/include/lwip_include/lwip/errno.h
file  core/ps2ip/include/lwip_include/lwip/etharp.h
file  core/ps2ip/include/lwip_include/lwip/ethip6.h
file  core/ps2ip/include/lwip_include/lwip/icmp.h
file  core/ps2ip/include/lwip_include/lwip/icmp6.h
file  core/ps2ip/include/lwip_include/lwip/if_api.h
file  core/ps2ip/include/lwip_include/lwip/inet.h
file  core/ps2ip/include/lwip_include/lwip/inet_chksum.h
file  core/ps2ip/include/lwip_include/lwip/ip4.h
file  core/ps2ip/include/lwip_include/lwip/ip4_addr.h
file  core/ps2ip/include/lwip_include/lwip/ip4_frag.h
file  core/ps2ip/include/lwip_include/lwip/ip6.h
file  core/ps2ip/include/lwip_include/lwip/ip6_addr.h
file  core/ps2ip/include/lwip_include/lwip/ip6_frag.h
file  core/ps2ip/include/lwip_include/lwip/mem.h
file  core/ps2ip/include/lwip_include/lwip/memp.h
file  core/ps2ip/include/lwip_include/lwip/nd6.h
file  core/ps2ip/include/lwip_include/lwip/netbuf.h
file  core/ps2ip/include/lwip_include/lwip/priv/altcp_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/api_msg.h
file  core/ps2ip/include/lwip_include/lwip/priv/mem_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/memp_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/memp_std.h
file  core/ps2ip/include/lwip_include/lwip/priv/nd6_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/raw_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/sockets_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/tcp_priv.h
file  core/ps2ip/include/lwip_include/lwip/priv/tcpip_priv.h
file  core/ps2ip/include/lwip_include/lwip/prot/acd.h
file  core/ps2ip/include/lwip_include/lwip/prot/autoip.h
file  core/ps2ip/include/lwip_include/lwip/prot/dhcp.h
file  core/ps2ip/include/lwip_include/lwip/prot/dhcp6.h
file  core/ps2ip/include/lwip_include/lwip/prot/dns.h
file  core/ps2ip/include/lwip_include/lwip/prot/etharp.h
file  core/ps2ip/include/lwip_include/lwip/prot/ethernet.h
file  core/ps2ip/include/lwip_include/lwip/prot/icmp.h
file  core/ps2ip/include/lwip_include/lwip/prot/icmp6.h
file  core/ps2ip/include/lwip_include/lwip/prot/igmp.h
file  core/ps2ip/include/lwip_include/lwip/prot/ip.h
file  core/ps2ip/include/lwip_include/lwip/prot/ip4.h
file  core/ps2ip/include/lwip_include/lwip/prot/ip6.h
file  core/ps2ip/include/lwip_include/lwip/prot/mld6.h
file  core/ps2ip/include/lwip_include/lwip/prot/nd6.h
file  core/ps2ip/include/lwip_include/lwip/prot/tcp.h
file  core/ps2ip/include/lwip_include/lwip/prot/udp.h
file  core/ps2ip/include/lwip_include/lwip/raw.h
file  core/ps2ip/include/lwip_include/lwip/sio.h
file  core/ps2ip/include/lwip_include/lwip/tcpbase.h
file  core/ps2ip/include/lwip_include/lwip/timeouts.h
file  core/ps2ip/include/lwip_include/lwip/udp.h
file  core/ps2ip/include/lwip_include/netif/etharp.h
file  core/ps2ip/include/lwip_include/netif/ethernet.h
file  core/ps2ip/include/lwip_include/netif/ieee802154.h
file  core/ps2ip/include/lwip_include/netif/lowpan6.h
file  core/ps2ip/include/lwip_include/netif/lowpan6_ble.h
file  core/ps2ip/include/lwip_include/netif/lowpan6_common.h
file  core/ps2ip/include/lwip_include/netif/lowpan6_opts.h
file  core/ps2ip/include/lwip_include/netif/ppp/ccp.h
file  core/ps2ip/include/lwip_include/netif/ppp/chap-md5.h
file  core/ps2ip/include/lwip_include/netif/ppp/chap-new.h
file  core/ps2ip/include/lwip_include/netif/ppp/chap_ms.h
file  core/ps2ip/include/lwip_include/netif/ppp/eap.h
file  core/ps2ip/include/lwip_include/netif/ppp/ecp.h
file  core/ps2ip/include/lwip_include/netif/ppp/eui64.h
file  core/ps2ip/include/lwip_include/netif/ppp/fsm.h
file  core/ps2ip/include/lwip_include/netif/ppp/ipcp.h
file  core/ps2ip/include/lwip_include/netif/ppp/ipv6cp.h
file  core/ps2ip/include/lwip_include/netif/ppp/lcp.h
file  core/ps2ip/include/lwip_include/netif/ppp/magic.h
file  core/ps2ip/include/lwip_include/netif/ppp/mppe.h
file  core/ps2ip/include/lwip_include/netif/ppp/polarssl/arc4.h
file  core/ps2ip/include/lwip_include/netif/ppp/polarssl/des.h
file  core/ps2ip/include/lwip_include/netif/ppp/polarssl/md4.h
file  core/ps2ip/include/lwip_include/netif/ppp/polarssl/md5.h
file  core/ps2ip/include/lwip_include/netif/ppp/polarssl/sha1.h
file  core/ps2ip/include/lwip_include/netif/ppp/ppp.h
file  core/ps2ip/include/lwip_include/netif/ppp/ppp_impl.h
file  core/ps2ip/include/lwip_include/netif/ppp/ppp_opts.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppapi.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppcrypt.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppdebug.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppoe.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppol2tp.h
file  core/ps2ip/include/lwip_include/netif/ppp/pppos.h
file  core/ps2ip/include/lwip_include/netif/ppp/upap.h
file  core/ps2ip/include/lwip_include/netif/ppp/vj.h
file  core/ps2ip/include/lwip_include/netif/slipif.h
file  core/ps2ip/include/lwip_include/netif/zepif.h
file  core/ps2ip/include/lwipopts.h
file  core/ps2ip/include/ps2ip.h
file  core/ps2ip/include/ps2ipee.h
file  core/ps2ip/src/ps2ip_internal.h

Classes

struct  mqtt_connect_client_info_t
struct  tftp_context
struct  bridgeif_initdata_s

Macros

#define MQTT_PORT   LWIP_IANA_PORT_MQTT
#define MQTT_TLS_PORT   LWIP_IANA_PORT_SECURE_MQTT
#define mqtt_subscribe(client, topic, qos, cb, arg)
#define mqtt_unsubscribe(client, topic, cb, arg)
#define tcpip_callback_with_block(function, ctx, block)
#define BRIDGEIF_INITDATA1(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, ethaddr)
#define BRIDGEIF_INITDATA2(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, e0, e1, e2, e3, e4, e5)

Typedefs

typedef void(*) mqtt_connection_cb_t(mqtt_client_t *client, void *arg, mqtt_connection_status_t status)
typedef void(*) mqtt_incoming_data_cb_t(void *arg, const u8_t *data, u16_t len, u8_t flags)
typedef void(*) mqtt_incoming_publish_cb_t(void *arg, const char *topic, u32_t tot_len)
typedef void(*) mqtt_request_cb_t(void *arg, err_t err)
typedef struct bridgeif_initdata_s bridgeif_initdata_t

Enumerations

enum  mqtt_connection_status_t {
  MQTT_CONNECT_ACCEPTED = 0 , MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1 , MQTT_CONNECT_REFUSED_IDENTIFIER = 2 , MQTT_CONNECT_REFUSED_SERVER = 3 ,
  MQTT_CONNECT_REFUSED_USERNAME_PASS = 4 , MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5 , MQTT_CONNECT_DISCONNECTED = 256 , MQTT_CONNECT_TIMEOUT = 257
}
enum  { MQTT_DATA_FLAG_LAST = 1 }

Functions

err_t tcpip_input (struct pbuf *p, struct netif *inp)
err_t tcpip_callback (tcpip_callback_fn function, void *ctx)
err_t tcpip_try_callback (tcpip_callback_fn function, void *ctx)
struct tcpip_callback_msg * tcpip_callbackmsg_new (tcpip_callback_fn function, void *ctx)
void tcpip_callbackmsg_delete (struct tcpip_callback_msg *msg)
err_t tcpip_callbackmsg_trycallback (struct tcpip_callback_msg *msg)
err_t tcpip_callbackmsg_trycallback_fromisr (struct tcpip_callback_msg *msg)
void tcpip_init (tcpip_init_done_fn initfunc, void *arg)
void lwip_init (void)
err_t netif_input (struct pbuf *p, struct netif *inp)

Detailed Description

Imports and definitions for ps2ip.

Macro Definition Documentation

◆ BRIDGEIF_INITDATA1

#define BRIDGEIF_INITDATA1 ( max_ports,
max_fdb_dynamic_entries,
max_fdb_static_entries,
ethaddr )
Value:
{ethaddr, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}

Use this for constant initialization of a bridgeif_initdat_t (ethaddr must be passed as ETH_ADDR())

Definition at line 87 of file bridgeif.h.

◆ BRIDGEIF_INITDATA2

#define BRIDGEIF_INITDATA2 ( max_ports,
max_fdb_dynamic_entries,
max_fdb_static_entries,
e0,
e1,
e2,
e3,
e4,
e5 )
Value:
{{e0, e1, e2, e3, e4, e5}, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}

Use this for constant initialization of a bridgeif_initdat_t (each byte of ethaddr must be passed)

Definition at line 92 of file bridgeif.h.

◆ MQTT_PORT

#define MQTT_PORT   LWIP_IANA_PORT_MQTT

Default MQTT port (non-TLS)

Definition at line 57 of file mqtt.h.

◆ mqtt_subscribe

#define mqtt_subscribe ( client,
topic,
qos,
cb,
arg )
Value:
mqtt_sub_unsub(client, topic, qos, cb, arg, 1)

Subscribe to topic

Definition at line 195 of file mqtt.h.

◆ MQTT_TLS_PORT

#define MQTT_TLS_PORT   LWIP_IANA_PORT_SECURE_MQTT

Default MQTT TLS port

Definition at line 60 of file mqtt.h.

◆ mqtt_unsubscribe

#define mqtt_unsubscribe ( client,
topic,
cb,
arg )
Value:
mqtt_sub_unsub(client, topic, 0, cb, arg, 0)

Unsubscribe to topic

Definition at line 198 of file mqtt.h.

◆ tcpip_callback_with_block

#define tcpip_callback_with_block ( function,
ctx,
block )
Value:
((block != 0)? tcpip_callback(function, ctx) : tcpip_try_callback(function, ctx))
err_t tcpip_callback(tcpip_callback_fn function, void *ctx)
Definition tcpip.c:323
err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx)
Definition tcpip.c:359
Deprecated
use tcpip_try_callback() or tcpip_callback() instead

Definition at line 88 of file tcpip.h.

Typedef Documentation

◆ bridgeif_initdata_t

Initialisation data for bridgeif_init. An instance of this type must be passed as parameter 'state' to netif_add when the bridge is added.

◆ mqtt_connection_cb_t

typedef void(*) mqtt_connection_cb_t(mqtt_client_t *client, void *arg, mqtt_connection_status_t status)

Function prototype for mqtt connection status callback. Called when client has connected to the server after initiating a mqtt connection attempt by calling mqtt_client_connect() or when connection is closed by server or an error

Parameters
clientMQTT client itself
argAdditional argument to pass to the callback function
statusConnect result code or disconnection notification
See also
mqtt_connection_status_t

Definition at line 128 of file mqtt.h.

◆ mqtt_incoming_data_cb_t

typedef void(*) mqtt_incoming_data_cb_t(void *arg, const u8_t *data, u16_t len, u8_t flags)

Function prototype for MQTT incoming publish data callback function. Called when data arrives to a subscribed topic

See also
mqtt_subscribe
Parameters
argAdditional argument to pass to the callback function
dataUser data, pointed object, data may not be referenced after callback return, NULL is passed when all publish data are delivered
lenLength of publish data fragment
flagsMQTT_DATA_FLAG_LAST set when this call contains the last part of data from publish message

Definition at line 151 of file mqtt.h.

◆ mqtt_incoming_publish_cb_t

typedef void(*) mqtt_incoming_publish_cb_t(void *arg, const char *topic, u32_t tot_len)

Function prototype for MQTT incoming publish function. Called when an incoming publish arrives to a subscribed topic

See also
mqtt_subscribe
Parameters
argAdditional argument to pass to the callback function
topicZero terminated Topic text string, topic may not be referenced after callback return
tot_lenTotal length of publish data, if set to 0 (no publish payload) data callback will not be invoked

Definition at line 163 of file mqtt.h.

◆ mqtt_request_cb_t

typedef void(*) mqtt_request_cb_t(void *arg, err_t err)

Function prototype for mqtt request callback. Called when a subscribe, unsubscribe or publish request has completed

Parameters
argPointer to user data supplied when invoking request
errERR_OK on success ERR_TIMEOUT if no response was received within timeout, ERR_ABRT if (un)subscribe was denied

Definition at line 175 of file mqtt.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Data callback flags

Enumerator
MQTT_DATA_FLAG_LAST 

Flag set when last fragment of data arrives in data callback

Definition at line 134 of file mqtt.h.

◆ mqtt_connection_status_t

Connection status codes

Enumerator
MQTT_CONNECT_ACCEPTED 

Accepted

MQTT_CONNECT_REFUSED_PROTOCOL_VERSION 

Refused protocol version

MQTT_CONNECT_REFUSED_IDENTIFIER 

Refused identifier

MQTT_CONNECT_REFUSED_SERVER 

Refused server

MQTT_CONNECT_REFUSED_USERNAME_PASS 

Refused user credentials

MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ 

Refused not authorized

MQTT_CONNECT_DISCONNECTED 

Disconnected

MQTT_CONNECT_TIMEOUT 

Timeout

Definition at line 97 of file mqtt.h.

Function Documentation

◆ lwip_init()

void lwip_init ( void )

Initialize all modules. Use this in NO_SYS mode. Use tcpip_init() otherwise.

Definition at line 342 of file lwip_init.c.

◆ netif_input()

err_t netif_input ( struct pbuf * p,
struct netif * inp )

Forwards a received packet for input processing with ethernet_input() or ip_input() depending on netif flags. Don't call directly, pass to netif_add() and call netif->input(). Only works if the netif driver correctly sets NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag!

Definition at line 228 of file netif.c.

◆ tcpip_callback()

err_t tcpip_callback ( tcpip_callback_fn function,
void * ctx )

Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access. Blocks until the request is posted. Must not be called from interrupt context!

Parameters
functionthe function to call
ctxparameter passed to f
Returns
ERR_OK if the function was called, another err_t if not
See also
tcpip_try_callback

Definition at line 323 of file tcpip.c.

◆ tcpip_callbackmsg_delete()

void tcpip_callbackmsg_delete ( struct tcpip_callback_msg * msg)

Free a callback message allocated by tcpip_callbackmsg_new().

Parameters
msgthe message to free
See also
tcpip_callbackmsg_new()

Definition at line 566 of file tcpip.c.

◆ tcpip_callbackmsg_new()

struct tcpip_callback_msg * tcpip_callbackmsg_new ( tcpip_callback_fn function,
void * ctx )

Allocate a structure for a static callback message and initialize it. The message has a special type such that lwIP never frees it. This is intended to be used to send "static" messages from interrupt context, e.g. the message is allocated once and posted several times from an IRQ using tcpip_callbackmsg_trycallback(). Example usage: Trigger execution of an ethernet IRQ DPC routine in lwIP thread context.

Parameters
functionthe function to call
ctxparameter passed to function
Returns
a struct pointer to pass to tcpip_callbackmsg_trycallback().
See also
tcpip_callbackmsg_trycallback()
tcpip_callbackmsg_delete()

Definition at line 545 of file tcpip.c.

◆ tcpip_callbackmsg_trycallback()

err_t tcpip_callbackmsg_trycallback ( struct tcpip_callback_msg * msg)

Try to post a callback-message to the tcpip_thread tcpip_mbox.

Parameters
msgpointer to the message to post
Returns
sys_mbox_trypost() return code
See also
tcpip_callbackmsg_new()

Definition at line 581 of file tcpip.c.

◆ tcpip_callbackmsg_trycallback_fromisr()

err_t tcpip_callbackmsg_trycallback_fromisr ( struct tcpip_callback_msg * msg)

Try to post a callback-message to the tcpip_thread mbox. Same as tcpip_callbackmsg_trycallback but calls sys_mbox_trypost_fromisr(), mainly to help FreeRTOS, where calls differ between task level and ISR level.

Parameters
msgpointer to the message to post
Returns
sys_mbox_trypost_fromisr() return code (without change, so this knowledge can be used to e.g. propagate "bool needs_scheduling")
See also
tcpip_callbackmsg_new()

Definition at line 600 of file tcpip.c.

◆ tcpip_init()

void tcpip_init ( tcpip_init_done_fn initfunc,
void * arg )

Initialize this module:

  • initialize all sub modules
  • start the tcpip_thread
Parameters
initfunca function to call when tcpip_thread is running and finished initializing
argargument to pass to initfunc

Definition at line 659 of file tcpip.c.

◆ tcpip_input()

err_t tcpip_input ( struct pbuf * p,
struct netif * inp )

Pass a received packet to tcpip_thread for input processing with ethernet_input or ip_input. Don't call directly, pass to netif_add() and call netif->input().

Parameters
pthe received packet, p->payload pointing to the Ethernet header or to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or NETIF_FLAG_ETHERNET flags)
inpthe network interface on which the packet was received

Definition at line 297 of file tcpip.c.

◆ tcpip_try_callback()

err_t tcpip_try_callback ( tcpip_callback_fn function,
void * ctx )

Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access. Does NOT block when the request cannot be posted because the tcpip_mbox is full, but returns ERR_MEM instead. Can be called from interrupt context.

Parameters
functionthe function to call
ctxparameter passed to f
Returns
ERR_OK if the function was called, another err_t if not
See also
tcpip_callback

Definition at line 359 of file tcpip.c.