>1. Protocol independance is an extremely rare ideal (I
>would not call it a myth precisely). Having ported a bunch
>of simple and complex application, I can say now that only
>about 5% of them were really protocol independent. Most
>apps do all sorts of loging, setting socket options, etc...
>that is really difficult to not have even one
> if (af == AF_INET)
> ...
> else if (af == AF_INET6)
> ....
>If you have even one of these, you loose protocol independence,
>so the ideal goes out the window.
i'm just curious, but how come did you get so many "if-else" clause?
for example, i grepped through the source code like "grep -l AF_INET".
in some of NetBSD source code I had on my laptop.
- finger, fingerd: totally AF independent
- ftp, ftpd: AF dependent (PORT, PASV or EPRT, EPSV)
- telnet, telnetd: AF dependent, but not the fundamental part
(source routing for client side, IP_TOS setting for daemon side)
- tftp, tftpd: tftp is clean. in tftpd there's one switch statement,
which can easily be avoided by getaddrinfo/getnameinfo (will do).
since it is a bit off-topic, please respond privately if you prefer.
itojun
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page: http://playground.sun.com/ipng
FTP archive: ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------