mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-15 20:56:51 +08:00
sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c: Fixed bug #20900. Now, most of the netconn_peer and netconn_addr processing is done inside tcpip_thread context in do_getaddr.
This commit is contained in:
@@ -148,29 +148,31 @@ netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
|
||||
void (*callback)(struct netconn *, enum netconn_evt, u16_t len));
|
||||
err_t netconn_delete (struct netconn *conn);
|
||||
enum netconn_type netconn_type (struct netconn *conn);
|
||||
err_t netconn_peer (struct netconn *conn,
|
||||
struct ip_addr *addr,
|
||||
u16_t *port);
|
||||
err_t netconn_addr (struct netconn *conn,
|
||||
struct ip_addr *addr,
|
||||
u16_t *port);
|
||||
|
||||
err_t netconn_getaddr (struct netconn *conn,
|
||||
struct ip_addr *addr,
|
||||
u16_t *port,
|
||||
u8_t local);
|
||||
#define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0)
|
||||
#define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1)
|
||||
|
||||
err_t netconn_bind (struct netconn *conn,
|
||||
struct ip_addr *addr,
|
||||
u16_t port);
|
||||
struct ip_addr *addr,
|
||||
u16_t port);
|
||||
err_t netconn_connect (struct netconn *conn,
|
||||
struct ip_addr *addr,
|
||||
u16_t port);
|
||||
struct ip_addr *addr,
|
||||
u16_t port);
|
||||
err_t netconn_disconnect (struct netconn *conn);
|
||||
err_t netconn_listen (struct netconn *conn);
|
||||
struct netconn * netconn_accept (struct netconn *conn);
|
||||
struct netbuf * netconn_recv (struct netconn *conn);
|
||||
err_t netconn_sendto (struct netconn *conn,
|
||||
struct netbuf *buf, struct ip_addr *addr, u16_t port);
|
||||
struct netbuf *buf, struct ip_addr *addr, u16_t port);
|
||||
err_t netconn_send (struct netconn *conn,
|
||||
struct netbuf *buf);
|
||||
struct netbuf *buf);
|
||||
err_t netconn_write (struct netconn *conn,
|
||||
const void *dataptr, int size,
|
||||
u8_t apiflags);
|
||||
const void *dataptr, int size,
|
||||
u8_t apiflags);
|
||||
err_t netconn_close (struct netconn *conn);
|
||||
|
||||
#if LWIP_IGMP
|
||||
|
||||
@@ -58,6 +58,11 @@ struct api_msg_msg {
|
||||
struct ip_addr *ipaddr;
|
||||
u16_t port;
|
||||
} bc; /* do_bind, do_connect */
|
||||
struct {
|
||||
struct ip_addr *ipaddr;
|
||||
u16_t *port;
|
||||
u8_t local;
|
||||
} ad; /* do_getaddr */
|
||||
struct {
|
||||
const void *dataptr;
|
||||
int len;
|
||||
@@ -90,6 +95,7 @@ void do_listen ( struct api_msg_msg *msg);
|
||||
void do_send ( struct api_msg_msg *msg);
|
||||
void do_recv ( struct api_msg_msg *msg);
|
||||
void do_write ( struct api_msg_msg *msg);
|
||||
void do_getaddr ( struct api_msg_msg *msg);
|
||||
void do_close ( struct api_msg_msg *msg);
|
||||
#if LWIP_IGMP
|
||||
void do_join_leave_group( struct api_msg_msg *msg);
|
||||
|
||||
Reference in New Issue
Block a user