Lines Matching refs:sa
701 php_sockaddr_storage sa; local
702 socklen_t php_sa_len = sizeof(sa);
714 if (!php_accept_connect(php_sock, new_sock, (struct sockaddr*)&sa, &php_sa_len)) {
961 struct sockaddr *sa; local
981 sa = (struct sockaddr *) &sa_storage;
983 if (getsockname(php_sock->bsd_socket, sa, &salen) != 0) {
988 switch (sa->sa_family) {
991 sin6 = (struct sockaddr_in6 *) sa;
1002 sin = (struct sockaddr_in *) sa;
1013 s_un = (struct sockaddr_un *) sa;
1032 struct sockaddr *sa; local
1052 sa = (struct sockaddr *) &sa_storage;
1054 if (getpeername(php_sock->bsd_socket, sa, &salen) < 0) {
1059 switch (sa->sa_family) {
1062 sin6 = (struct sockaddr_in6 *) sa;
1075 sin = (struct sockaddr_in *) sa;
1087 s_un = (struct sockaddr_un *) sa;
1289 struct sockaddr_un *sa = (struct sockaddr_un *) sock_type; local
1291 sa->sun_family = AF_UNIX;
1293 if (addr_len >= sizeof(sa->sun_path)) {
1294 zend_argument_value_error(2, "must be less than %d", sizeof(sa->sun_path));
1297 memcpy(&sa->sun_path, addr, addr_len);
1299 retval = bind(php_sock->bsd_socket, (struct sockaddr *) sa,
1306 struct sockaddr_in *sa = (struct sockaddr_in *) sock_type; local
1308 sa->sin_family = AF_INET;
1309 sa->sin_port = htons((unsigned short) port);
1311 if (! php_set_inet_addr(sa, addr, php_sock)) {
1315 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in));
1321 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) sock_type; local
1323 sa->sin6_family = AF_INET6;
1324 sa->sin6_port = htons((unsigned short) port);
1326 if (! php_set_inet6_addr(sa, addr, php_sock)) {
1330 retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa, sizeof(struct sockaddr_in6));
2749 struct sockaddr_in *sa = (struct sockaddr_in *) ai->addrinfo.ai_addr; local
2752 add_assoc_long(&sockaddr, "sin_port", ntohs((unsigned short) sa->sin_port));
2753 inet_ntop(ai->addrinfo.ai_family, &sa->sin_addr, addr, sizeof(addr));
2760 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) ai->addrinfo.ai_addr; local
2763 add_assoc_long(&sockaddr, "sin6_port", ntohs((unsigned short) sa->sin6_port));
2764 inet_ntop(ai->addrinfo.ai_family, &sa->sin6_addr, addr, sizeof(addr));