[Top][All Lists]

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

Re: [lwip-users] sio.h Function Prototypes

From: address@hidden
Subject: Re: [lwip-users] sio.h Function Prototypes
Date: Fri, 6 May 2016 21:29:42 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Greg Smith wrote:
In lwIP 2.0.0 Beta1, it has a prototype in sio.h for sio_write, which I believe is the generic function name for the PPP output function.

Not exactly. sio_write is used for PPP, for slipif and maybe for other netifs.

Should this have a prototype of:

u32_t sio_write(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx);

instead of:

u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len);


It seems the updates to PPP demand a ppp_pcb, instead of sio_fd_t.

Yes. But to write, you need a sio_fd_t. So you need an output function that maps to your sio_write function. See the win32 or unix port in contrib. If you don't want to keep sio_fd_t static (like these ports do, unfortunately), you can pass a "void* ctx_cb" that is passed to the output function to get what you need to call sio_write.


reply via email to

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