[Top][All Lists]

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

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

From: Sylvain Rochet
Subject: Re: [lwip-users] sio.h Function Prototypes
Date: Tue, 10 May 2016 23:14:02 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Greg,

On Tue, May 10, 2016 at 03:24:36PM +0000, Greg Smith wrote:
> From: Sylvain Rochet [mailto:address@hidden
> >  
> > Not really, the last user of the SIO framework is SLIP. The SIO API 
> > sucks, I proposed my help to get rid of it in SLIP in 
> > <address@hidden<mailto:address@hidden>> 
> > but the change was not acknowledged.
> There are so many other changes in the PPP, that I, personally, have 
> had to make enough changes that this would not bother me if it broke 
> compatibility.

I guess you misread. PPP is not SLIP. PPP is not using the SIO API 
anymore, SLIP is the last SIO user.

> (It almost does anyway because sio_write() can be passed directly to 
> pppos_create(), for example.)

Well, considering:

PPP output callback signature is:
  u32_t ppp_output_cb(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx);

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

If it works, that's only by luck, because you only need data and len, 
and because the size of a sio_fd_t is the same size of a ppp_pcb* 
because they are probably both pointers, that's not something that was 
done on purpose.

> This is basically where I was headed myself, but it seems redundant; 
> therefore, I was figuring I was doing something wrote.  Ideally, if I 
> could get rid of sio.h altogether, that would seem to be cleaner.  Do 
> you think that is possible in the current state of 2.0.0RC1? Either 
> way, for now, I'll do much like what you've listed here.

Of course it is, PPP is not using the SIO API anymore for, humm, almost 
a year. There is not a single reference to SIO in the whole PPP code 
(except in the documentation maybe to tell that we are not using it 
anymore :p).

> Thank you for all your help!

You're welcome :)


Attachment: signature.asc
Description: Digital signature

reply via email to

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