Lines Matching refs:bsdAddr
254 …ess (const deSocketAddress* address, int bsdAddrBufSize, struct sockaddr* bsdAddr, int* bsdAddrLen) in deSocketAddressToBsdAddress() argument
256 deMemset(bsdAddr, 0, bsdAddrBufSize); in deSocketAddressToBsdAddress()
287 deMemcpy(bsdAddr, result->ai_addr, (int)result->ai_addrlen); in deSocketAddressToBsdAddress()
291 if (bsdAddr->sa_family == AF_INET) in deSocketAddressToBsdAddress()
295 ((struct sockaddr_in*)bsdAddr)->sin_port = htons((deUint16)address->port); in deSocketAddressToBsdAddress()
297 else if (bsdAddr->sa_family == AF_INET6) in deSocketAddressToBsdAddress()
301 ((struct sockaddr_in6*)bsdAddr)->sin6_port = htons((deUint16)address->port); in deSocketAddressToBsdAddress()
310 struct sockaddr_in* addr4 = (struct sockaddr_in*)bsdAddr; in deSocketAddressToBsdAddress()
328 struct sockaddr_in6* addr6 = (struct sockaddr_in6*)bsdAddr; in deSocketAddressToBsdAddress()
347 void deBsdAddressToSocketAddress (deSocketAddress* address, const struct sockaddr* bsdAddr, int add… in deBsdAddressToSocketAddress() argument
350 if (bsdAddr->sa_family == AF_INET) in deBsdAddressToSocketAddress()
352 const struct sockaddr_in* addr4 = (const struct sockaddr_in*)bsdAddr; in deBsdAddressToSocketAddress()
365 else if (bsdAddr->sa_family == AF_INET6) in deBsdAddressToSocketAddress()
367 const struct sockaddr_in6* addr6 = (const struct sockaddr_in6*)bsdAddr; in deBsdAddressToSocketAddress()
474 struct sockaddr* bsdAddr = (struct sockaddr*)&bsdAddrBuf[0]; in deSocket_listen() local
481 if (!deSocketAddressToBsdAddress(address, (int)sizeof(bsdAddrBuf), bsdAddr, &bsdAddrLen)) in deSocket_listen()
485 …sock->handle = socket(bsdAddr->sa_family, deSocketTypeToBsdType(address->type), deSocketProtocolTo… in deSocket_listen()
498 if (bind(sock->handle, bsdAddr, bsdAddrLen) != 0) in deSocket_listen()
521 struct sockaddr* bsdAddr = (struct sockaddr*)&bsdAddrBuf[0]; in deSocket_accept() local
528 deMemset(bsdAddr, 0, (int)bsdAddrLen); in deSocket_accept()
531 newFd = accept(sock->handle, bsdAddr, &bsdAddrLen); in deSocket_accept()
533 newFd = accept(sock->handle, bsdAddr, (socklen_t*)&bsdAddrLen); in deSocket_accept()
555 deBsdAddressToSocketAddress(clientAddress, bsdAddr, (int)bsdAddrLen); in deSocket_accept()
563 struct sockaddr* bsdAddr = (struct sockaddr*)&bsdAddrBuf[0]; in deSocket_connect() local
567 if (!deSocketAddressToBsdAddress(address, (int)sizeof(bsdAddrBuf), bsdAddr, &bsdAddrLen)) in deSocket_connect()
571 …sock->handle = socket(bsdAddr->sa_family, deSocketTypeToBsdType(address->type), deSocketProtocolTo… in deSocket_connect()
576 if (connect(sock->handle, bsdAddr, bsdAddrLen) != 0) in deSocket_connect()