On 2014/06/02 18:28, Brian Chu wrote: > SIOCAIFADDR should be used to set the addresses of a tun interface on FreeBSD. OS-dependent ifdef's are so ugly, better to check for the feature rather than the OS type - SIOCAIFADDR is preferred over SIOCSIFADDR on OpenBSD, NetBSD, Dragonfly, AerieBSD, OSX...