diff options
Diffstat (limited to 'sbin/ipf/libipf/ftov.c')
-rw-r--r-- | sbin/ipf/libipf/ftov.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sbin/ipf/libipf/ftov.c b/sbin/ipf/libipf/ftov.c new file mode 100644 index 000000000000..5e4aaca80c80 --- /dev/null +++ b/sbin/ipf/libipf/ftov.c @@ -0,0 +1,15 @@ +#include "ipf.h" + +int +ftov(int version) +{ +#ifdef USE_INET6 + if (version == AF_INET6) + return (6); +#endif + if (version == AF_INET) + return (4); + if (version == AF_UNSPEC) + return (0); + return (-1); +} |