Searched refs:sin (Results 1 – 5 of 5) sorted by relevance
49 sockaddr_in sin; in bindRandomAddr() local50 sin.sin_family = AF_INET; in bindRandomAddr()51 sin.sin_port = 0; in bindRandomAddr()52 sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in bindRandomAddr()54 while (sin.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) { in bindRandomAddr()56 ((uint8_t *) &sin.sin_addr.s_addr) + 1, in bindRandomAddr()57 sizeof(sin.sin_addr.s_addr) - 1); in bindRandomAddr()62 if (bind(listensock, (sockaddr *) &sin, sizeof(sin)) == -1) PERROR_EXIT("bind"); in bindRandomAddr()131 struct sockaddr_in sin; in main() local132 socklen_t len = sizeof(sin); in main()[all …]
86 auto sin = reinterpret_cast<const sockaddr_in*>(address_struct); in IPAddress() local88 auto bytes = reinterpret_cast<const uint8_t*>(&sin->sin_addr.s_addr); in IPAddress()89 address_ = ByteString(bytes, sizeof(sin->sin_addr.s_addr)); in IPAddress()260 auto sin = reinterpret_cast<sockaddr_in*>(address_struct); in IntoSockAddr() local261 memcpy(&sin->sin_addr.s_addr, GetConstData(), GetLength()); in IntoSockAddr()
98 auto sin = reinterpret_cast<sockaddr_in*>(addr); in TestAddress() local99 inet_pton(AF_INET, good_string.c_str(), &sin->sin_addr.s_addr); in TestAddress()
232 struct sockaddr_in *sin = (struct sockaddr_in *) sa; in init_sockaddr_in() local233 sin->sin_family = AF_INET; in init_sockaddr_in()234 sin->sin_port = 0; in init_sockaddr_in()235 sin->sin_addr.s_addr = addr; in init_sockaddr_in()298 struct sockaddr_in *sin = (struct sockaddr_in *) &ss; in ifc_act_on_address() local299 addr = &sin->sin_addr; in ifc_act_on_address()
227 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix() local228 rawAddress = &sin->sin_addr; in parsePrefix()