Lines Matching refs:from

41 /*!	Routing utility function: copies address \a from into a new address
43 If \a replaceWithZeros is set \a from will be replaced by an empty
45 If a \a mask is given it is applied to \a from (such that \a to is the
46 result of \a from & \a mask).
49 \return B_BAD_VALUE if any of \a from or \a mask refers to an uninitialized
54 ipv6_copy_address(const sockaddr *from, sockaddr **to,
66 if (from == NULL)
68 if (from->sa_len == 0 || (mask != NULL && mask->sa_len == 0))
70 if (from->sa_family != AF_INET6)
77 memcpy(*to, from, sizeof(sockaddr_in6));
129 \return false if \a address is NULL, or with family different from AF_INET
387 /*! Sets \a address to \a from.
388 \return B_OK if \a from has been copied into \a address
389 \return B_BAD_VALUE if either \a address or \a from is NULL or if the
390 address given in from has not been initialized
391 \return B_MISMATCHED_VALUES if from is not of family AF_INET6
394 ipv6_set_to(sockaddr *address, const sockaddr *from)
396 if (address == NULL || from == NULL || from->sa_len == 0)
399 if (from->sa_family != AF_INET6)
402 memcpy(address, from, sizeof(sockaddr_in6));
408 /*! Updates missing parts in \a address with the values in \a from.
409 \return B_OK if \a address has been updated from \a from
410 \return B_BAD_VALUE if either \a address or \a from is NULL or if the
411 address given in from has not been initialized
412 \return B_MISMATCHED_VALUES if from is not of family AF_INET6
418 const sockaddr_in6 *from = (const sockaddr_in6 *)_from;
420 if (address == NULL || from == NULL || from->sin6_len == 0)
423 if (from->sin6_family != AF_INET6)
430 address->sin6_port = from->sin6_port;
433 memcpy(address->sin6_addr.s6_addr, from->sin6_addr.s6_addr,