lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] access to tcp_pcb data from socket+


From: Mattia Settin
Subject: [lwip-users] access to tcp_pcb data from socket+
Date: Wed, 7 Mar 2018 10:07:47 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]