xref: /freebsd/sbin/ipf/libipf/vtof.c (revision 716fd348e01c5f2ba125f878a634a753436c2994)
1 #include "ipf.h"
2 
3 int
4 vtof(int version)
5 {
6 #ifdef USE_INET6
7 	if (version == 6)
8 		return (AF_INET6);
9 #endif
10 	if (version == 4)
11 		return (AF_INET);
12 	if (version == 0)
13 		return (AF_UNSPEC);
14 	return (-1);
15 }
16