2 #include "platform_api.h"
10 int family_to_sys(Family f)
14 case UNSPEC: return AF_UNSPEC;
15 case INET: return AF_INET;
16 case INET6: return AF_INET6;
17 case UNIX: return AF_UNIX;
18 default: throw invalid_argument("family_to_sys");
22 Family family_from_sys(int f)
26 case AF_UNSPEC: return UNSPEC;
27 case AF_INET: return INET;
28 case AF_INET6: return INET6;
29 case AF_UNIX: return UNIX;
30 default: throw invalid_argument("family_from_sys");