Lines Matching refs:sin
614 const struct sockaddr_in *sin = (struct sockaddr_in *)sa; in evutil_found_ifaddr() local
615 ev_uint32_t addr = ntohl(sin->sin_addr.s_addr); in evutil_found_ifaddr()
733 struct sockaddr_in sin, sin_out; in evutil_check_interfaces() local
751 memset(&sin, 0, sizeof(sin)); in evutil_check_interfaces()
752 sin.sin_family = AF_INET; in evutil_check_interfaces()
753 sin.sin_port = htons(53); in evutil_check_interfaces()
754 r = evutil_inet_pton(AF_INET, "18.244.0.188", &sin.sin_addr); in evutil_check_interfaces()
768 connect(fd, (struct sockaddr*)&sin, sizeof(sin)) == 0 && in evutil_check_interfaces()
1011 struct sockaddr_in sin; in evutil_getaddrinfo_common_() local
1012 memset(&sin, 0, sizeof(sin)); in evutil_getaddrinfo_common_()
1013 sin.sin_family = AF_INET; in evutil_getaddrinfo_common_()
1014 sin.sin_port = htons(port); in evutil_getaddrinfo_common_()
1019 sin.sin_addr.s_addr = htonl(0x7f000001); in evutil_getaddrinfo_common_()
1021 res4 = evutil_new_addrinfo_((struct sockaddr*)&sin, in evutil_getaddrinfo_common_()
1022 sizeof(sin), hints); in evutil_getaddrinfo_common_()
1053 struct sockaddr_in sin; in evutil_getaddrinfo_common_() local
1054 memset(&sin, 0, sizeof(sin)); in evutil_getaddrinfo_common_()
1055 if (1==evutil_inet_pton(AF_INET, nodename, &sin.sin_addr)) { in evutil_getaddrinfo_common_()
1057 sin.sin_family = AF_INET; in evutil_getaddrinfo_common_()
1058 sin.sin_port = htons(port); in evutil_getaddrinfo_common_()
1059 *res = evutil_new_addrinfo_((struct sockaddr*)&sin, in evutil_getaddrinfo_common_()
1060 sizeof(sin), hints); in evutil_getaddrinfo_common_()
1143 struct sockaddr_in sin; in addrinfo_from_hostent() local
1151 memset(&sin, 0, sizeof(sin)); in addrinfo_from_hostent()
1152 sin.sin_family = AF_INET; in addrinfo_from_hostent()
1153 sin.sin_port = htons(port); in addrinfo_from_hostent()
1154 sa = (struct sockaddr *)&sin; in addrinfo_from_hostent()
1156 addrp = &sin.sin_addr; in addrinfo_from_hostent()
1157 if (ent->h_length != sizeof(sin.sin_addr)) { in addrinfo_from_hostent()
1311 struct sockaddr_in *sin = (struct sockaddr_in*)sa; in apply_numeric_port_hack() local
1312 sin->sin_port = htons(port); in apply_numeric_port_hack()
2155 struct sockaddr_in sin; in evutil_parse_sockaddr_port() local
2156 memset(&sin, 0, sizeof(sin)); in evutil_parse_sockaddr_port()
2158 sin.sin_len = sizeof(sin); in evutil_parse_sockaddr_port()
2160 sin.sin_family = AF_INET; in evutil_parse_sockaddr_port()
2161 sin.sin_port = htons(port); in evutil_parse_sockaddr_port()
2162 if (1 != evutil_inet_pton(AF_INET, addr_part, &sin.sin_addr)) in evutil_parse_sockaddr_port()
2164 if ((int)sizeof(sin) > *outlen) in evutil_parse_sockaddr_port()
2167 memcpy(out, &sin, sizeof(sin)); in evutil_parse_sockaddr_port()
2168 *outlen = sizeof(sin); in evutil_parse_sockaddr_port()
2180 const struct sockaddr_in *sin = (const struct sockaddr_in*)sa; in evutil_format_sockaddr_port_() local
2181 res = evutil_inet_ntop(AF_INET, &sin->sin_addr,b,sizeof(b)); in evutil_format_sockaddr_port_()
2182 port = ntohs(sin->sin_port); in evutil_format_sockaddr_port_()
2465 struct sockaddr_in *sin = (struct sockaddr_in *)addr; in evutil_sockaddr_is_loopback_() local
2466 return (ntohl(sin->sin_addr.s_addr) & 0xff000000) == 0x7f000000; in evutil_sockaddr_is_loopback_()