[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Socket API on top of the raw API
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] Socket API on top of the raw API |
Date: |
Sun, 15 Mar 2009 02:47:36 +0100 |
Hello,
On Fri, Mar 13, 2009 at 6:01 PM, Kieran Mansley <address@hidden> wrote:
> On Fri, 2009-03-13 at 16:20 +0100, Clément David wrote:
>
>> Where I can study this socket2.c implementation ?
>
> It's not yet been written, only discussed.
>
We internally implemented a socket interface on top of lwIP / uCOS-II,
but only for the UDP part. We didn't found it complete enough to
commit back into lwIP, but here's a link and the prototypes:
http://www.sidebranch.com/leon/
see socket.{c,h} files in there.
/** protocol specific functions */
static signed char socket_udp(unsigned char protocol);
static signed int recvfrom_udp(signed char i, unsigned char *buffer,
unsigned int length, unsigned int timeout, struct ip_addr *addr_ptr,
u16_t *port_ptr);
static signed int sendto_udp(signed char i, const union
aligned_octet_t *buffer, const unsigned int length, struct ip_addr
*addr_ptr, u16_t *port_ptr);
/** protocol specific, socket generic callback functions for lwIP */
static signed int send_udp(signed char i, const union aligned_octet_t
*buffer, const unsigned int length);
static void socket_udp_recv(void *arg, struct udp_pcb *pcb, struct
pbuf *p, struct ip_addr *addr, u16_t port);
static void close_udp(signed char i);
/* static void shutdown_udp(signed char i, unsigned char how); */
Regards,
--
Leon
RE: [lwip-users] Socket API on top of the raw API, Bill Auerbach, 2009/03/13