Dear all
I developing an application wih lwip 2.0.3 using socket bsd.
The tcp server performs the following operation:
s = socket()
bind
accept //wait a new connection
read  //packet received

I need to perform some check on the pcb data of my socket.
I note the get_socket is defined as static and the get_sockopt do not
return all data I need.
I solve adding following function in socket.c:
struct tcp_pcb * lwip_getsockpcb(int s)
{
  struct lwip_sock *sock = get_socket(s);
  if (!sock) {
    return NULL;
  }
  return sock->conn->pcb.tcp;
}

My question is:
how can acces to the tcp_pcb of my socket with out modify the library ?
Which is the smart way ?
Thank all
regard


-- 
Mattia Settin
Software and System Engineer
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to