diff options
Diffstat (limited to 'stacks/lwip_stack/lwip_src/api/spl_api_msg.c')
-rw-r--r-- | stacks/lwip_stack/lwip_src/api/spl_api_msg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/stacks/lwip_stack/lwip_src/api/spl_api_msg.c b/stacks/lwip_stack/lwip_src/api/spl_api_msg.c index 1c9bf92..f437bce 100644 --- a/stacks/lwip_stack/lwip_src/api/spl_api_msg.c +++ b/stacks/lwip_stack/lwip_src/api/spl_api_msg.c @@ -22,6 +22,7 @@ //#include "sockets.h" #include <netinet/in.h> #include <errno.h> +#include <netinet/tcp.h> #include "stackx_prot_com.h" #include "spl_api.h" @@ -1572,6 +1573,7 @@ spl_do_connected (void *arg, struct tcp_pcb *pcb, err_t err) conn->state = SPL_NETCONN_NONE; SPL_NETCONN_SET_SAFE_ERR (conn, ERR_OK); + update_tcp_state (pcb->callback_arg, ESTABLISHED); SPL_API_EVENT (conn, SPL_NETCONN_EVT_SENDPLUS, 1); if (was_blocking && m != NULL) @@ -2523,7 +2525,12 @@ do_get_tcpproto_getsockopt_internal (struct common_pcb *cpcb, NSPOL_LOGDBG (SOCKETS_DEBUG, "]fd=%d,SPL_TCP_KEEPCNT=%d", cpcb->socket, *(int *) optval); break; - + case SPL_TCP_INFO: + ((struct tcp_info *) optval)->tcpi_total_retrans = (int) tpcb->nrtx; + ((struct tcp_info *) optval)->tcpi_snd_mss = (int) tpcb->mss; + ((struct tcp_info *) optval)->tcpi_rtt = (int) tpcb->sa; + ((struct tcp_info *) optval)->tcpi_snd_cwnd = (int) tpcb->cwnd; + break; default: NSPOL_LOGDBG (SOCKETS_DEBUG, "unsupported]optname=%d", optname); SET_MSG_ERR (m, EOPNOTSUPP); @@ -3316,5 +3323,7 @@ alloc_common_pcb (enum spl_netconn_type type) common_pcb_init (cpcb); cpcb->type = type; + + res_alloc (&cpcb->res_chk); return cpcb; } |