lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5926] Use function pointers instead of table index


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5926] Use function pointers instead of table index in api_lib/api_msg
Date: Thu, 10 May 2007 15:50:04 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #2, patch #5926 (project lwip):

I we don't need TCP, but we need the sockets API, I propose to patch
lwip_sendto like this :

/*...*/
  if (sock->conn->type==NETCONN_TCP)
#if LWIP_TCP
    return lwip_send( s, data, size, flags);
#else
    sock_set_errno(sock, err_to_errno(ERR_ARG));
    return -1;    
#endif /* LWIP_TCP */
/*...*/

I will avoid to link lwip_send, netconn_write, do_write...

Same thing for lwip_send (if only TCP is need):

/*...*/
  if (sock->conn->type!=NETCONN_TCP)     
#if (LWIP_UDP || LWIP_RAW)
    return lwip_sendto( s, data, size, flags, NULL, 0);
#else
    sock_set_errno(sock, err_to_errno(ERR_ARG));
    return -1;    
#endif  
/*...*/




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5926>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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