Lines Matching refs:saddr
543 struct sockaddr_in saddr = {0}; in from_zval_write_sin_addr() local
547 res = php_set_inet_addr(&saddr, ZSTR_VAL(addr_str), ctx->sock); in from_zval_write_sin_addr()
549 memcpy(inaddr, &saddr.sin_addr, sizeof saddr.sin_addr); in from_zval_write_sin_addr()
646 struct sockaddr_un *saddr = (struct sockaddr_un*)sockaddr_un_c; in from_zval_write_sun_path() local
657 if (ZSTR_LEN(path_str) >= sizeof(saddr->sun_path)) { in from_zval_write_sun_path()
659 "length is %zd", sizeof(saddr->sun_path) - 1); in from_zval_write_sun_path()
663 memcpy(&saddr->sun_path, ZSTR_VAL(path_str), ZSTR_LEN(path_str)); in from_zval_write_sun_path()
664 saddr->sun_path[ZSTR_LEN(path_str)] = '\0'; in from_zval_write_sun_path()
669 struct sockaddr_un *saddr = (struct sockaddr_un*)data; in to_zval_read_sun_path() local
672 nul_pos = memchr(&saddr->sun_path, '\0', sizeof(saddr->sun_path)); in to_zval_read_sun_path()
678 ZVAL_STRINGL(zv, saddr->sun_path, nul_pos - (char*)&saddr->sun_path); in to_zval_read_sun_path()
785 const struct sockaddr *saddr = (struct sockaddr *)sockaddr_c; in to_zval_read_sockaddr_aux() local
787 if (saddr->sa_family == 0) { in to_zval_read_sockaddr_aux()
794 switch (saddr->sa_family) { in to_zval_read_sockaddr_aux()
812 (int)saddr->sa_family); in to_zval_read_sockaddr_aux()