|const char * bufferPtr,|
|const struct sockaddr * toAddressPtr,|
|const struct sockaddr * fromAddressPtr,|
|const ttUser8BitPtr toPhyAddrPtr,|
|unsigned int mhomeIndex|
Same as tfSendToFrom(), but takes 4 extra parameters to let the user specify the link layer destination address, and the interface to send the data through.
- The socket descriptor to use to send the data.
- The buffer to send.
- The length of the buffer to send.
- MSG_DONTWAIT: Don't wait for room in the socket send queue.
- 0: Wait for room in the socket send queue.
- The address to send the data to.
- The length of the area pointed to by toAddressPtr or fromAddressPtr.
- The address to send the data from.
- Destination link layer address.
- Destination link layer address length.
- Interface to send the data through as returned by tfAddInterface().
- Multihome index on the interface.
- >= 0
- The number of bytes actually sent on the socket.
|Note:|| TM_SOCKET_ERROR means that this socket call has failed and the errorCode has been set on the socket itself.
To retrieve the socket error the user must call tfGetSocketError(socketDescriptor).
Possible socket errors
- The socket descriptor is invalid.
- A parameter is invalid.
- Insufficient memory to complete the operation.
- No route to destination.
- The socket received an ICMP destination unreachable message from the remote host. This typically means that the receiver is not listening on the remote port.
- The message was too long.
- The TCP protocol requires usage of send() not tfSendToFromInterface().
- The socket is marked as non-blocking and the tfSendToFromInterface() operation would block.