5 #include <sys/socket.h>
14 int family_to_sys(Family f)
18 case UNSPEC: return AF_UNSPEC;
19 case INET: return AF_INET;
20 case INET6: return AF_INET6;
21 case UNIX: return AF_UNIX;
22 default: throw invalid_argument("family_to_sys");
26 Family family_from_sys(int f)
30 case AF_UNSPEC: return UNSPEC;
31 case AF_INET: return INET;
32 case AF_INET6: return INET6;
33 case AF_UNIX: return UNIX;
34 default: throw invalid_argument("family_from_sys");