Microchip® Advanced Software Framework

netconn Struct Reference

A netconn descriptor.

#include <api.h>

Data Fields

sys_mbox_t acceptmbox
 mbox where new connections are stored until processed by the application thread More...
 
netconn_callback callback
 A callback function that is informed about events for this netconn. More...
 
struct api_msg_msgcurrent_msg
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message. More...
 
u8_t flags
 only used for socket layer More...
 
err_t last_err
 the last error this netconn had More...
 
sys_sem_t op_completed
 sem that is used to synchronously execute functions in the core context More...
 
union {
   struct ip_pcb *   ip
 
   struct raw_pcb *   raw
 
   struct tcp_pcb *   tcp
 
   struct udp_pcb *   udp
 
pcb
 the lwIP internal protocol control block More...
 
sys_mbox_t recvmbox
 mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big) More...
 
enum netconn_state state
 current state of the netconn More...
 
enum netconn_type type
 type of the netconn (TCP, UDP or RAW) More...
 
size_t write_offset
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores how much is already sent. More...
 

sys_mbox_t netconn::acceptmbox

mbox where new connections are stored until processed by the application thread

Referenced by accept_function(), err_tcp(), lwip_netconn_do_listen(), netconn_accept(), netconn_alloc(), netconn_drain(), netconn_free(), and netconn_new_with_proto_and_callback().

netconn_callback netconn::callback

A callback function that is informed about events for this netconn.

Referenced by accept_function(), and netconn_alloc().

struct api_msg_msg* netconn::current_msg

TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message.

Also used during connect and close.

Referenced by err_tcp(), lwip_netconn_do_close(), lwip_netconn_do_close_internal(), lwip_netconn_do_connect(), lwip_netconn_do_connected(), lwip_netconn_do_delconn(), lwip_netconn_do_write(), lwip_netconn_do_writemore(), and netconn_alloc().

u8_t netconn::flags

only used for socket layer

flags holding more netconn-internal state, see NETCONN_FLAG_* defines

Referenced by lwip_netconn_do_listen(), lwip_netconn_do_write(), lwip_netconn_do_writemore(), netconn_alloc(), poll_tcp(), and sent_tcp().

sys_sem_t netconn::op_completed

sem that is used to synchronously execute functions in the core context

Referenced by netconn_alloc(), netconn_free(), and netconn_new_with_proto_and_callback().

sys_mbox_t netconn::recvmbox

mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big)

Referenced by accept_function(), err_tcp(), lwip_netconn_do_listen(), netconn_alloc(), netconn_drain(), netconn_free(), netconn_new_with_proto_and_callback(), netconn_recv(), netconn_recv_data(), recv_raw(), recv_tcp(), and recv_udp().

size_t netconn::write_offset

TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores how much is already sent.

Referenced by lwip_netconn_do_close(), lwip_netconn_do_delconn(), lwip_netconn_do_write(), lwip_netconn_do_writemore(), and netconn_alloc().