#include <sofia-sip/msg.h>
#include <sofia-sip/su.h>
Include dependency graph for msg_addr.h:

Go to the source code of this file.
Typedefs | |
| typedef su_iovec_s | msg_iovec_t |
| I/O vector type. | |
Enumerations | |
| enum | { msg_min_size, msg_min_block, msg_n_fragments } |
Functions | |
| void | msg_addr_zero (msg_t *msg) |
| Zero the message address. | |
| su_addrinfo_t * | msg_addrinfo (msg_t *msg) |
| Get addrinfo structure. | |
| su_sockaddr_t * | msg_addr (msg_t *msg) |
| Get pointer to socket address structure. | |
| int | msg_get_address (msg_t *msg, su_sockaddr_t *, socklen_t *) |
| Get message address. | |
| int | msg_set_address (msg_t *msg, su_sockaddr_t const *, socklen_t) |
| Set message address. | |
| void | msg_addr_copy (msg_t *dst, msg_t const *src) |
| Copy message address. | |
| int | msg_errno (msg_t const *msg) |
| Get error number associated with message. | |
| void | msg_set_errno (msg_t *msg, int err) |
| Set error number associated with message. | |
| isize_t | msg_iovec (msg_t *msg, msg_iovec_t vec[], isize_t veclen) |
| Fill an I/O vector with message contents. | |
| issize_t | msg_recv_iovec (msg_t *msg, msg_iovec_t vec[], isize_t veclen, usize_t n, int exact) |
| Obtain I/O vector for receiving the data. | |
| isize_t | msg_recv_commit (msg_t *msg, usize_t n, int eos) |
| Commit n bytes of buffers. | |
| issize_t | msg_recv_buffer (msg_t *msg, void **return_buffer) |
| Obtain a buffer for receiving data. | |
| msg_t * | msg_next (msg_t *msg) |
| Get a next message of the stream. | |
| int | msg_set_next (msg_t *msg, msg_t *next) |
| Set next message of the stream. | |
| void | msg_clear_committed (msg_t *msg) |
| Clear committed data. | |
| issize_t | msg_buf_external (msg_t *msg, usize_t N, usize_t blocksize) |
| Allocate a list of external buffers. | |
|
|
I/O vector type.
|
|
|
|
|
|
Get pointer to socket address structure.
|
|
||||||||||||
|
Copy message address. Copy the addrinfo and socket address structures from src to the dst message object.
|
|
|
Zero the message address. Zero the address and addressinfo structures associated with the message.
|
|
|
Get addrinfo structure. Get pointer to the addrinfo structure associated with the message.
|
|
||||||||||||||||
|
Allocate a list of external buffers. The function msg_buf_external() allocates at most msg_n_fragments external buffers for the message body.
|
|
|
Get error number associated with message.
|
|
||||||||||||||||
|
Get message address. Copy the socket address associated with the message to the supplied socket address struture.
|
|
||||||||||||||||
|
Fill an I/O vector with message contents. Calculate number of entries in the I/O vector required to send a message msg. It also fills in the I/O vector array, if it is provided by the caller and it is large enough.
|
|
|
Get a next message of the stream. When parsing a transport stream, only the first message in the stream is created with msg_create(). The rest of the messages should be created with msg_next() after previous message has been completely received and parsed. |
|
||||||||||||||||
|
Commit n bytes of buffers. The function msg_recv_commit() is called after n bytes of data has been received to the message buffers and the parser can extract the received data.
|
|
||||||||||||||||||||||||
|
Obtain I/O vector for receiving the data. Allocate buffers for receiving n bytes of data available from network. Function returns the buffers in the I/O vector vec. The vec is allocated by the caller, the available length is given as veclen. If the protocol is message-oriented like UDP or SCTP and the available data ends at message boundary, the caller should set the exact as 1. Otherwise some extra buffer (known as slack) is allocated). Currently, the msg_recv_iovec() allocates receive buffers in at most two blocks, so the caller should allocate at least two elements for the I/O vector vec.
|
|
||||||||||||||||
|
Set message address. Copy the supplied socket address to the socket address structure associated with the message.
|
|
||||||||||||
|
Set error number associated with message.
|