Lines Matching refs:sa
697 php_sockaddr_storage sa; local
698 socklen_t php_sa_len = sizeof(sa);
710 if (!php_accept_connect(php_sock, new_sock, (struct sockaddr*)&sa, &php_sa_len)) {
957 struct sockaddr *sa; local
977 sa = (struct sockaddr *) &sa_storage;
979 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
984 switch (sa->sa_family) {
987 sin6 = (struct sockaddr_in6 *) sa;
998 sin = (struct sockaddr_in *) sa;
1009 s_un = (struct sockaddr_un *) sa;
1028 struct sockaddr *sa; local
1048 sa = (struct sockaddr *) &sa_storage;
1050 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1055 switch (sa->sa_family) {
1058 sin6 = (struct sockaddr_in6 *) sa;
1071 sin = (struct sockaddr_in *) sa;
1083 s_un = (struct sockaddr_un *) sa;
1285 struct sockaddr_un *sa = (struct sockaddr_un *) sock_type; local
1287 sa->sun_family = AF_UNIX;
1289 if (addr_len >= sizeof(sa->sun_path)) {
1290 zend_argument_value_error(2, "must be less than %d", sizeof(sa->sun_path));
1293 memcpy(&sa->sun_path, addr, addr_len);
1295 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1302 struct sockaddr_in *sa = (struct sockaddr_in *) sock_type; local
1304 sa->sin_family = AF_INET;
1305 sa->sin_port = htons((unsigned short) port);
1307 if (! php_set_inet_addr(sa, addr, php_sock)) {
1311 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1317 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) sock_type; local
1319 sa->sin6_family = AF_INET6;
1320 sa->sin6_port = htons((unsigned short) port);
1322 if (! php_set_inet6_addr(sa, addr, php_sock)) {
1326 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));
2663 struct sockaddr_in *sa = (struct sockaddr_in *) ai->addrinfo.ai_addr; local
2666 add_assoc_long(&sockaddr, "sin_port", ntohs((unsigned short) sa->sin_port));
2667 inet_ntop(ai->addrinfo.ai_family, &sa->sin_addr, addr, sizeof(addr));
2674 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) ai->addrinfo.ai_addr; local
2677 add_assoc_long(&sockaddr, "sin6_port", ntohs((unsigned short) sa->sin6_port));
2678 inet_ntop(ai->addrinfo.ai_family, &sa->sin6_addr, addr, sizeof(addr));