[bedevtalk] ping for BONE?
pete at jwgibbs.cchem.berkeley.edu
pete at jwgibbs.cchem.berkeley.edu
Wed Nov 15 14:21:39 EST 2006
On Wed, Nov 15, 2006 at 12:10:27PM +0100, Philippe Houdoin wrote:
> Hi Pete,
>
> > The main catch seems to be that BONE's 'getprotobyname' just returns
> > null for "icmp".
>
> Hum, maybe because there is no /etc/protocols yet?
> IIRC, BONE provides an /etc/services file, but no etc/protocols.
Heh... I'd noticed that when looking at the Linux implementation,
but I wasn't awake enough to try actually creating one on BeOS!
I did so (just copying the Linux one) and I no longer get 'unknown
protocol'. I now see:
"sendto: Address family not supported by protocol family"
but I guess I'm getting closer!
>
> Most probably BONE just opened its sockets using constant, like:
>
> sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
Looking at the code source I have (the original BSD, I think), it's
beginning to come clearer how it's doing things. [As you can tell,
I'm not very familiar with net access code!] The socket call just
gets the 'family' parameter from the protocol structure it got from
getprotobyname, so I guess the BeOS one does just what you show above.
>
Thanks for the tips!
-- Pete --
More information about the bedevtalk
mailing list