Lines Matching refs:sockaddr
1461 struct sockaddr_storage *sockaddr;
1465 sockaddr = talloc_zero(mem_ctx, struct sockaddr_storage);
1466 if (sockaddr == NULL) {
1473 sockaddr->ss_family = AF_INET;
1474 memcpy(&((struct sockaddr_in *) sockaddr)->sin_addr,
1477 ((struct sockaddr_in *) sockaddr)->sin_port = (in_port_t) htons(port);
1481 sockaddr->ss_family = AF_INET6;
1482 memcpy(&((struct sockaddr_in6 *) sockaddr)->sin6_addr,
1485 ((struct sockaddr_in6 *) sockaddr)->sin6_port = (in_port_t) htons(port);
1493 return sockaddr;