Lines Matching refs:family
301 static int find_address(int family, struct ifaddrs *if_address, in find_address() argument
311 tmp->ifa_addr->sa_family == family) { in find_address()
313 switch (family) { in find_address()
360 static int get_address(const char *if_name, int family, void *address) in get_address() argument
373 err = find_address(family, if_address, if_name, address); in get_address()
400 int family, addr_len; in main() local
480 family = AF_INET; in main()
495 family = AF_INET6; in main()
500 addr_send->sa_family = family; in main()
501 addr_recv->sa_family = family; in main()
503 fd = socket(family, tcp ? SOCK_STREAM : SOCK_DGRAM, in main()
529 ret = get_address(interface, family, address); in main()
536 printf("Binding to %s\n", inet_ntop(family, address, in main()