#include "net/opt.h"
#include "net/pbuf.h"
#include "net/sys.h"
#include "net/ipv4/ip.h"
#include "net/udp.h"
#include "net/tcp.h"
#include "net/err.h"
Go to the source code of this file.
#define NETCONN_COPY 0x01 |
enum netconn_state |
enum netconn_type |
Definition at line 78 of file api_lib.c.
References NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_RAM, PBUF_TRANSPORT, and netbuf::ptr.
Definition at line 114 of file api_lib.c.
References memp_freep(), MEMP_NETBUF, netbuf::p, pbuf_chain(), and netbuf::ptr.
Definition at line 186 of file api_lib.c.
References netbuf_copy_partial().
Referenced by bot_thread(), shell_main(), and udpecho_thread().
Definition at line 158 of file api_lib.c.
References pbuf::len, pbuf::next, NULL, netbuf::p, and pbuf::payload.
Referenced by lwip_recvfrom(), and netbuf_copy().
Definition at line 128 of file api_lib.c.
References ERR_BUF, ERR_OK, pbuf::len, NULL, pbuf::payload, and netbuf::ptr.
void netbuf_delete | ( | struct netbuf * | buf | ) |
Definition at line 66 of file api_lib.c.
References memp_freep(), MEMP_NETBUF, NULL, netbuf::p, pbuf_free(), and netbuf::ptr.
Referenced by bot_thread(), lwip_close(), lwip_recvfrom(), lwip_send(), netconn_delete(), shell_main(), and udpecho_thread().
void netbuf_first | ( | struct netbuf * | buf | ) |
void netbuf_free | ( | struct netbuf * | buf | ) |
Definition at line 192 of file api_lib.c.
References netbuf::fromaddr.
Referenced by lwip_recvfrom(), and udpecho_thread().
Definition at line 198 of file api_lib.c.
References netbuf::fromport.
Referenced by lwip_recvfrom(), and udpecho_thread().
Definition at line 122 of file api_lib.c.
References netbuf::p, and pbuf::tot_len.
Referenced by bot_thread(), lwip_recvfrom(), and shell_main().
struct netbuf* netbuf_new | ( | void | ) |
Definition at line 51 of file api_lib.c.
References memp_mallocp(), MEMP_NETBUF, NULL, netbuf::p, and netbuf::ptr.
Referenced by lwip_send().
Definition at line 102 of file api_lib.c.
References pbuf::len, NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_ROM, PBUF_TRANSPORT, netbuf::ptr, and pbuf::tot_len.
Referenced by lwip_send().
Definition at line 416 of file api_lib.c.
References netconn::acceptmbox, NULL, and sys_mbox_fetch().
Referenced by lwip_accept(), and shell_thread().
Definition at line 306 of file api_lib.c.
References netconn::err, ERR_OK, tcp_pcb::local_ip, udp_pcb::local_port, tcp_pcb::local_port, NETCONN_TCP, NETCONN_UDP, NETCONN_UDPLITE, NETCONN_UDPNOCHKSUM, netconn::pcb, netconn::tcp, netconn::type, and netconn::udp.
Definition at line 325 of file api_lib.c.
References API_MSG_BIND, api_msg_post(), api_msg_msg::bc, api_msg_msg::conn, netconn::err, ERR_MEM, ERR_VAL, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NETCONN_TCP, NULL, netconn::recvmbox, sys_mbox_fetch(), sys_mbox_new(), SYS_MBOX_NULL, and netconn::type.
Referenced by lwip_bind(), shell_thread(), and udpecho_thread().
Definition at line 612 of file api_lib.c.
References API_MSG_CLOSE, api_msg_post(), api_msg_msg::conn, netconn::err, ERR_MEM, ERR_VAL, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NETCONN_CLOSE, NETCONN_NONE, NULL, netconn::sem, netconn::state, sys_mbox_fetch(), SYS_SEM_NULL, and sys_sem_wait().
Referenced by shell_main().
Definition at line 355 of file api_lib.c.
References API_MSG_CONNECT, api_msg_post(), api_msg_msg::bc, api_msg_msg::conn, netconn::err, ERR_MEM, ERR_VAL, kprintf(), netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NULL, netconn::recvmbox, sys_mbox_fetch(), sys_mbox_new(), and SYS_MBOX_NULL.
Referenced by bot_thread(), lwip_connect(), lwip_sendto(), and udpecho_thread().
Definition at line 227 of file api_lib.c.
References netconn::acceptmbox, API_MSG_DELCONN, api_msg_post(), api_msg_msg::conn, ERR_MEM, ERR_OK, netconn::mbox, MEMP_API_MSG, memp_free(), memp_freep(), memp_mallocp(), MEMP_NETCONN, api_msg::msg, api_msg_msg::msg, netbuf_delete(), netconn_delete(), NETCONN_TCP, NULL, pbuf_free(), netconn::recvmbox, netconn::sem, sys_arch_mbox_fetch(), sys_mbox_fetch(), sys_mbox_free(), SYS_MBOX_NULL, sys_sem_free(), SYS_SEM_NULL, and netconn::type.
Referenced by lwip_accept(), lwip_close(), lwip_socket(), and netconn_delete().
Definition at line 389 of file api_lib.c.
References netconn::acceptmbox, API_MSG_LISTEN, api_msg_post(), api_msg_msg::conn, netconn::err, ERR_MEM, ERR_VAL, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NULL, sys_mbox_fetch(), sys_mbox_new(), and SYS_MBOX_NULL.
Referenced by lwip_listen(), and shell_thread().
struct netconn* netconn_new | ( | enum netconn_type | type | ) |
Definition at line 204 of file api_lib.c.
References netconn::acceptmbox, netconn::mbox, memp_freep(), memp_mallocp(), MEMP_NETCONN, NETCONN_NONE, NULL, netconn::pcb, netconn::recvmbox, netconn::sem, netconn::state, sys_mbox_new(), SYS_MBOX_NULL, SYS_SEM_NULL, netconn::tcp, and netconn::type.
Referenced by bot_thread(), lwip_socket(), shell_thread(), and udpecho_thread().
Definition at line 287 of file api_lib.c.
References netconn::err, ERR_OK, NETCONN_TCP, NETCONN_UDP, NETCONN_UDPLITE, NETCONN_UDPNOCHKSUM, netconn::pcb, udp_pcb::remote_ip, tcp_pcb::remote_ip, udp_pcb::remote_port, tcp_pcb::remote_port, netconn::tcp, netconn::type, and netconn::udp.
Referenced by lwip_accept(), and lwip_sendto().
Definition at line 430 of file api_lib.c.
References API_LIB_DEBUG, api_msg_post(), API_MSG_RECV, api_msg_msg::conn, DEBUGF, netconn::err, ERR_CONN, ERR_MEM, ERR_OK, netbuf::fromaddr, netbuf::fromport, api_msg_msg::len, LISTEN, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), MEMP_NETBUF, api_msg::msg, api_msg_msg::msg, NETCONN_TCP, NULL, netbuf::p, netconn::pcb, netbuf::ptr, netconn::recvmbox, tcp_pcb::state, sys_mbox_fetch(), sys_mbox_free(), SYS_MBOX_NULL, netconn::tcp, pbuf::tot_len, netconn::type, and api_msg::type.
Referenced by bot_thread(), lwip_recvfrom(), shell_main(), and udpecho_thread().
Definition at line 509 of file api_lib.c.
References API_LIB_DEBUG, api_msg_post(), API_MSG_SEND, api_msg_msg::conn, DEBUGF, netconn::err, ERR_MEM, ERR_OK, ERR_VAL, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NULL, netbuf::p, api_msg_msg::p, sys_mbox_fetch(), and pbuf::tot_len.
Referenced by lwip_send(), and udpecho_thread().
enum netconn_type netconn_type | ( | struct netconn * | conn | ) |
Definition at line 281 of file api_lib.c.
References netconn::type.
Referenced by lwip_recvfrom(), lwip_send(), and lwip_write().
Definition at line 537 of file api_lib.c.
References API_LIB_DEBUG, api_msg_post(), API_MSG_WRITE, api_msg_msg::conn, DEBUGF, netconn::err, ERR_MEM, ERR_OK, ERR_VAL, netconn::mbox, MEMP_API_MSG, memp_freep(), memp_mallocp(), api_msg::msg, api_msg_msg::msg, NETCONN_NONE, NETCONN_TCP, NETCONN_WRITE, NULL, netconn::pcb, netconn::sem, netconn::state, sys_mbox_fetch(), sys_sem_free(), sys_sem_new(), SYS_SEM_NULL, sys_sem_wait(), netconn::tcp, tcp_sndbuf, netconn::type, and api_msg_msg::w.
Referenced by lwip_send(), lwip_write(), and sendstr().