|
sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
|
Imports and definitions for ps2ip. More...
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) |
Imports and definitions for ps2ip.
| #define BRIDGEIF_INITDATA1 | ( | max_ports, | |
| max_fdb_dynamic_entries, | |||
| max_fdb_static_entries, | |||
| ethaddr ) |
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.
| #define BRIDGEIF_INITDATA2 | ( | max_ports, | |
| max_fdb_dynamic_entries, | |||
| max_fdb_static_entries, | |||
| e0, | |||
| e1, | |||
| e2, | |||
| e3, | |||
| e4, | |||
| e5 ) |
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.
| #define MQTT_PORT LWIP_IANA_PORT_MQTT |
| #define mqtt_subscribe | ( | client, | |
| topic, | |||
| qos, | |||
| cb, | |||
| arg ) |
| #define MQTT_TLS_PORT LWIP_IANA_PORT_SECURE_MQTT |
| #define mqtt_unsubscribe | ( | client, | |
| topic, | |||
| cb, | |||
| arg ) |
| #define tcpip_callback_with_block | ( | function, | |
| ctx, | |||
| block ) |
| typedef struct bridgeif_initdata_s 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.
| 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
| client | MQTT client itself |
| arg | Additional argument to pass to the callback function |
| status | Connect result code or disconnection notification |
| 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
| arg | Additional argument to pass to the callback function |
| data | User data, pointed object, data may not be referenced after callback return, NULL is passed when all publish data are delivered |
| len | Length of publish data fragment |
| flags | MQTT_DATA_FLAG_LAST set when this call contains the last part of data from publish message |
| 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
| arg | Additional argument to pass to the callback function |
| topic | Zero terminated Topic text string, topic may not be referenced after callback return |
| tot_len | Total length of publish data, if set to 0 (no publish payload) data callback will not be invoked |
| 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
| arg | Pointer to user data supplied when invoking request |
| err | ERR_OK on success ERR_TIMEOUT if no response was received within timeout, ERR_ABRT if (un)subscribe was denied |
| anonymous enum |
Connection status codes
| 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.
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!
| 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!
| function | the function to call |
| ctx | parameter passed to f |
| void tcpip_callbackmsg_delete | ( | struct tcpip_callback_msg * | msg | ) |
Free a callback message allocated by tcpip_callbackmsg_new().
| msg | the message to free |
| 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.
| function | the function to call |
| ctx | parameter passed to function |
| err_t tcpip_callbackmsg_trycallback | ( | struct tcpip_callback_msg * | msg | ) |
Try to post a callback-message to the tcpip_thread tcpip_mbox.
| msg | pointer to the message to post |
| 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.
| msg | pointer to the message to post |
| void tcpip_init | ( | tcpip_init_done_fn | initfunc, |
| void * | arg ) |
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().
| p | the 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) |
| inp | the network interface on which the packet was received |
| 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.
| function | the function to call |
| ctx | parameter passed to f |