Lines Matching refs:sa
950 php_sockaddr_storage sa; local
951 socklen_t php_sa_len = sizeof(sa);
961 if (!php_accept_connect(php_sock, &new_sock, (struct sockaddr*)&sa, &php_sa_len)) {
1211 struct sockaddr *sa; local
1229 sa = (struct sockaddr *) &sa_storage;
1231 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
1240 switch (sa->sa_family) {
1243 sin6 = (struct sockaddr_in6 *) sa;
1256 sin = (struct sockaddr_in *) sa;
1273 s_un = (struct sockaddr_un *) sa;
1281 php_error_docref(NULL, E_WARNING, "Unsupported address family %d", sa->sa_family);
1294 struct sockaddr *sa; local
1312 sa = (struct sockaddr *) &sa_storage;
1314 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1319 switch (sa->sa_family) {
1322 sin6 = (struct sockaddr_in6 *) sa;
1336 sin = (struct sockaddr_in *) sa;
1354 s_un = (struct sockaddr_un *) sa;
1362 php_error_docref(NULL, E_WARNING, "Unsupported address family %d", sa->sa_family);
1540 struct sockaddr_un *sa = (struct sockaddr_un *) sock_type; local
1542 sa->sun_family = AF_UNIX;
1544 if (addr_len >= sizeof(sa->sun_path)) {
1547 (int)sizeof(sa->sun_path) - 1);
1550 memcpy(&sa->sun_path, addr, addr_len);
1552 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1559 struct sockaddr_in *sa = (struct sockaddr_in *) sock_type; local
1561 sa->sin_family = AF_INET;
1562 sa->sin_port = htons((unsigned short) port);
1564 if (! php_set_inet_addr(sa, addr, php_sock)) {
1568 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1574 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) sock_type; local
1576 sa->sin6_family = AF_INET6;
1577 sa->sin6_port = htons((unsigned short) port);
1579 if (! php_set_inet6_addr(sa, addr, php_sock)) {
1583 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));