Subject: Re: IPv6 capable tun
To: Michael Richardson <email@example.com>
From: None <firstname.lastname@example.org>
Date: 01/11/2001 15:11:12
> > for IFF_MULTICAST, I believe we need to have proper multicast group
> > management code in tunioctl().
> What do we need to do?
> Just keep track of which multicast groups are on? Or do you think that
>these things should be passed to the application?
sorry this was not correct. maybe i was dreaming.
> > another issue - there's no compatibility between *BSD, regarding to
> > packet encoding on character device side...
> What do you mean? What do you other BSDs do?
openbsd: when we read/write character device side, we always see
u_int32_t address family at the top, in network byteorder.
freebsd: no indicaiton of af (= IPv4 only)
freebsd4: in TUN_LMODE, attaches sockaddr at the head. if TUN_IFHEAD,
attach address family in network byteorder. otherwise,
no indication of af (= IPv4 only)
netbsd: in TUN_PREPADDR, attaches sockaddr at the head.
otherwise, no indication of af (= IPv4 only).
af#, u_int32_t sockaddr none
--- --- ---
net no yes yes
free yes yes yes
open yes no no
so if you would like to implement some program that is portable across
three of them, you need to implement at least two modes of operation.