[openbeos] Re: protoent

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 24 Jul 2006 15:03:38 +0200 CEST

"François Revol" <revol@xxxxxxx> wrote:
> [12:59] <CIA-3> axeld * r18247 /haiku/branches/team/network/new_stack
> /
> kits_network/dns/irs/lcl_pr.c: 
> [...]
> [12:59] <CIA-3> In any way, I don't really get the rationale behind 
> this protoent stuff.
> 
> How about, for statistical or information tools to display stuff for 
> protocols they don't explicitely know about... (netstat, ...)
> Or apps to get protocols as string argument... like, some apps allow 
> options like -listen tcp|unix|... it both avoids having to hardcode 
> them and allows some extensibility as long as the protocol has the 
> same 
> semantics as the usual ones.

Okay, that makes at least some sense :-)
I saw its use in ping.c to get the ICMP protocol number, and that's 
definitely completely useless.

Bye,
   Axel.


Other related posts: