<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 23 Jul 2009 14:28:44 +0100
From   : philb@... (Phil Blundell)
Subject: RFC: BBC Ethernet API

On Thu, 2009-07-23 at 13:04 +0100, Steve Inglis wrote:
> On 23 Jul 2009, at 01:50, Jonathan Graham Harston wrote:
> 
> >         Request For Comments - Proposed BBC Ethernet API
> 
> <Snip>
> 
> > On entry: A%=192, X%=control block, Y%=X%DIV256
> >          X%?0  = OSWORD send block length
> >          X%?1  = OSWORD receive block length
> >          X%?2  = command - same as RISC OS SWI Socket_ command number
> >          X%?3  = 0
> >          X%!4  = socket
> >          X%!8  = address
> >          X%!12 = length
> >          X%!16 = flags
> >          X%!20 = address
> >          X%!24 = address length
> >
> <Snip>
> 
> It may well be worth the time now to increase the size of the address  
> space from/to if we are not going to limit the API to ipv4.

The way this works in BSD sockets (and in RISC OS I think) is that the
value at X%!20 is a pointer to a block of memory containing the actual
address (and the value at X%!24 is the length of that block).  So,
assuming that this API is intended to work the same way, it'd already be
IPv6-ready.

Putting the 32-bit IPv4 address directly at X%!20 does seem like it'd be
a bad idea, but if that had been the intent then there would have been
no need for the word at X%!24 at all.

p.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>