Hello,
I'm new to FreeBSD (or any flavor BSD in that case), and come from a Windows/Linux programming background. Thus, I have never developed anything for FreeBSD.
I have an application implemented on Linux which carries out some tasks related to TUN/TAP devices (basically creates a TUN, gets a file descriptor, adds routes, reads and writes data). There does not seem to be any samples on how to do these, for Linux such examples do exist (maybe I need to get out of the Linux mindset for a while).
I have been having problems with defines and structures. For example, Linux uses TUNSETIFF for ioctl(), but I've not been able to find it on FreeBSD.
<linux/if_tun.h> is (obviously) missing, and it seems that the proper counterpart is <net/if_tun.h> but this misses some defines. Furthermore, some structures like rtentry seem to be implemented differently.
Can anyone direct me to the proper starting place in order to do the above (or rather, port the above) on FreeBSD? Maybe OS sources or whatever, I have not been able to find anything of much help.
Regards,
Armie
I'm new to FreeBSD (or any flavor BSD in that case), and come from a Windows/Linux programming background. Thus, I have never developed anything for FreeBSD.
I have an application implemented on Linux which carries out some tasks related to TUN/TAP devices (basically creates a TUN, gets a file descriptor, adds routes, reads and writes data). There does not seem to be any samples on how to do these, for Linux such examples do exist (maybe I need to get out of the Linux mindset for a while).
I have been having problems with defines and structures. For example, Linux uses TUNSETIFF for ioctl(), but I've not been able to find it on FreeBSD.
<linux/if_tun.h> is (obviously) missing, and it seems that the proper counterpart is <net/if_tun.h> but this misses some defines. Furthermore, some structures like rtentry seem to be implemented differently.
Can anyone direct me to the proper starting place in order to do the above (or rather, port the above) on FreeBSD? Maybe OS sources or whatever, I have not been able to find anything of much help.
Regards,
Armie