Commit db7b2003 authored by Pekka Pessi's avatar Pekka Pessi

msg module: updated documentation.

darcs-hash:20060920204549-65a35-68084006e85bebc385744ed675e2385a12994863.gz
parent 4fa60292
......@@ -22,7 +22,7 @@
*
*/
/**@CFILE msg.c Message object implementation.
/**@file msg.c Message object implementation.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
......@@ -51,7 +51,7 @@
/**
* Create a message.
*
* @relates msg_s
* @relatesalso msg_s
*
* @param mc message class
* @param flags message control flags
......@@ -88,7 +88,7 @@ msg_t *msg_create(msg_mclass_t const *mc, int flags)
/**Increment a message reference count.
*
* @relates msg_s
* @relatesalso msg_s
*
* Creates a reference to a message. The
* referenced message is not freed until all the references have been
......@@ -111,7 +111,7 @@ msg_t *msg_ref_create(msg_t *msg)
/**Set a message parent.
*
* @relates msg_s
* @relatesalso msg_s
*
* Set a parent for a message. The parent message is not destroyed until all
* its kids have been destroyed - each kid keeps a reference to its parent
......@@ -134,7 +134,7 @@ void msg_set_parent(msg_t *kid, msg_t *dad)
/** Destroy a reference to a message.
*
* @relates msg_s
* @relatesalso msg_s
*
* @param ref pointer to msg object
*
......@@ -147,7 +147,7 @@ void msg_ref_destroy(msg_t *ref)
/**Deinitialize and free a message.
*
* @relates msg_s
* @relatesalso msg_s
*
* @param msg message to be destroyed
*/
......@@ -190,7 +190,7 @@ msg_pub_t *msg_object(msg_t const *msg)
/**Retrieve public message structure of given type.
*
* @relates msg_s
* @relatesalso msg_s
*
* Get a pointer to the public message structure of the
* given protocol.
......@@ -212,7 +212,7 @@ msg_pub_t *msg_public(msg_t const *msg, void *tag)
/**Retrieve message class.
*
* @relates msg_s
* @relatesalso msg_s
*
* Get a pointer to the message class object
* (factory object for the message).
......@@ -234,7 +234,7 @@ msg_mclass_t const *msg_mclass(msg_t const *msg)
/** Zero the message address.
*
* @relates msg_s
* @relatesalso msg_s
*
* Zero the address and addressinfo structures associated with the message.
*
......@@ -251,7 +251,7 @@ void msg_addr_zero(msg_t *msg)
/** Get pointer to socket address structure.
*
* @relates msg_s
* @relatesalso msg_s
*
* @deprecated Use msg_get_address() or msg_set_address() instead.
*/
......@@ -262,7 +262,7 @@ su_sockaddr_t *msg_addr(msg_t *msg)
/** Get message address.
*
* @relates msg_s
* @relatesalso msg_s
*
* Copy the socket address associated with the message to the supplied
* socket address struture.
......@@ -289,7 +289,7 @@ int msg_get_address(msg_t *msg, su_sockaddr_t *su, socklen_t *return_len)
/** Set message address.
*
* @relates msg_s
* @relatesalso msg_s
*
* Copy the supplied socket address to the socket address structure
* associated with the message.
......@@ -314,7 +314,7 @@ int msg_set_address(msg_t *msg, su_sockaddr_t const *su, socklen_t sulen)
/** Get addrinfo structure.
*
* @relates msg_s
* @relatesalso msg_s
*
* Get pointer to the addrinfo structure associated with the message.
*
......@@ -332,7 +332,7 @@ su_addrinfo_t *msg_addrinfo(msg_t *msg)
/**Copy message address.
*
* @relates msg_s
* @relatesalso msg_s
*
* Copy the addrinfo and socket address structures from @a src to the @a dst
* message object.
......@@ -357,7 +357,7 @@ void msg_addr_copy(msg_t *dst, msg_t const *src)
/** Get error classification flags.
*
* @relates msg_s
* @relatesalso msg_s
*
* If the message parser fails to parse certain headers in the message, it
* sets the corresponding extract error flags. The flags corresponding to
......@@ -384,7 +384,7 @@ unsigned msg_extract_errors(msg_t const *msg)
/** Get error number associated with message.
*
* @relates msg_s
* @relatesalso msg_s
*
* @param msg pointer to msg object
*
......@@ -396,7 +396,7 @@ int msg_errno(msg_t const *msg)
/** Set error number associated with message.
*
* @relates msg_s
* @relatesalso msg_s
*
* @param msg pointer to msg object
* @param err error value (as defined in <sofia-sip/su_errno.h>).
......
......@@ -21,18 +21,17 @@ these protocols.
@section msg_contents Contents of msg Module
The msg module contains the public header files as follows:
- <msg.h> base message interfaces
- <msg_types.h> message and header struct definitions and typedefs
- <msg_protos.h> prototypes of header-specific functions for generic headers
- <msg_header.h> function prototypes and macros for manipulating message
headers
- <msg_addr.h> functions for accessing network addresses and I/O vectors
associated with the message
- <msg_date.h> types and functions for handling dates and times
- <msg_mime.h> types, function prototypes and macros for MIME headers
and @ref msg_multipart "multipart messages"
- <msg_mime_protos.h> prototypes of header-specific functions for
MIME headers
- <sofia-sip/msg.h> base message interfaces
- <sofia-sip/msg_types.h> message and header struct definitions and typedefs
- <sofia-sip/msg_protos.h> prototypes of header-specific functions for generic headers
- <sofia-sip/msg_header.h> function prototypes and macros for manipulating message
headers
- <sofia-sip/msg_addr.h> functions for accessing network addresses and I/O vectors
associated with the message
- <sofia-sip/msg_date.h> types and functions for handling dates and times
- <sofia-sip/msg_mime.h> types, function prototypes and macros for MIME headers
and @ref msg_multipart "multipart messages"
- <sofia-sip/msg_mime_protos.h> prototypes of MIME-header-specific functions
In addition to this interface, the @ref msg_parser "parser documentation"
contains description of the functionality required when an existing parser
......@@ -40,35 +39,34 @@ is extended by a new header or a parser is created for a completely new
protocol. It is possible to add new headers to the parser or extend the
definition of existing ones. The header files used for constructing these
parsers are as follows:
- <msg_parser.h> parsing functions, macros
- <msg_mclass.h> message factory object definition
- <msg_mclass_hash.h> hashing of header names
- <sofia-sip/msg_parser.h> parsing functions, macros
- <sofia-sip/msg_mclass.h> message factory object definition
- <sofia-sip/msg_mclass_hash.h> hashing of header names
@section msg_overview Parsers, Messages and Headers
The Sofia @b msg module contains interface to the text-based parsers for
RFC822-like message, the header and message objects. Currently, there
are four parsers defined: SIP, HTTP, RTSP and MIME.
are three parsers defined: SIP, HTTP, and MIME.
The C structure corresponding to each header is defined either in a
<msg_types.h> or in a protocol-specific header file. These
protocol-specific header files include <sip.h>, <http.h>, <rtsp.h> and
<msg_mime.h>. For each header, there is defined a @em header @em class
<sofia-sip/msg_types.h> or in a protocol-specific header file. These
protocol-specific header files include <sofia-sip/sip.h>, <sofia-sip/http.h>, and
<sofia-sip/msg_mime.h>. For each header, there is defined a @em header @em class
structure, some standard functions, and tags for including them in tag
lists.
As a convention, all the identifiers for SIP headers start with prefix @c
sip and all the macros with @c SIP. Same thing holds for HTTP and RTSP: they
use prefixes @c http and @c rtsp, respectively. However, the MIME headers
and the functions related to them are defined with the @b msg module and
they use prefix @c msg. If a SIP, HTTP, or RTSP header uses a structure
defined in <msg_types.h>, there is a typedef suitable for the particular
protocol, for example @b Accept header:
sip and all the macros with @c SIP. Same thing holds for HTTP, too: it
uses prefix @c http. However, the MIME headers
and the functions related to them are defined within the @b msg module and
they use prefix @c msg. If a SIP or HTTP header uses a structure
defined in <sofia-sip/msg_types.h>, there is a typedef suitable for the particular
protocol, for example @b Accept header is defined multiple times:
@code
typedef struct msg_accept_s sip_accept_t;
typedef struct msg_accept_s http_accept_t;
typedef struct msg_accept_s rtsp_accept_t;
@endcode
For header @e X of protocol @e NS, there are types, functions, macros and
......@@ -89,11 +87,11 @@ header class as follows:
- @c NSTAG_X_STR() is used to include string containing value header
in a tag list.
The declarations of header class, tags and the prototypes for these
functions can be imported separately from the type definitions, for
instance, the tags related to SIP headers are declared in the include file
<sip_tag.h>, the header classes in <sip_hclasses.h>, and the functions in
<sip_header.h>,
The declarations of header tags and the prototypes for these functions can
be imported separately from the type definitions, for instance, the tags
related to SIP headers are declared in the include file
<sofia-sip/sip_tag.h>, and the header-specific functions in
<sofia-sip/sip_header.h>.
@section parser_intro Parsing Text Messages
......@@ -221,18 +219,18 @@ at the message level, for example, accessing directly the @b Accept header
instead of going through all headers and examining their name. The
structured view to the message is provided via a message-specific C struct.
In general, its type is msg_pub_t (it provides public view to message). The
protocol-specific type is #sip_t, #http_t, #rtsp_t or #msg_multipart_t for
SIP, HTTP, RTSP and MIME, respectively.
protocol-specific type is #sip_t, #http_t or #msg_multipart_t for
SIP, HTTP and MIME, respectively.
So, a single message is represented by two objects, first object (#msg_t) is
private to the @b msg module and opaque by an application programmer, second
(#sip_t, #http_t, #rtsp_t or #msg_multipart_t) is a public protocol-specific
(#sip_t, #http_t or #msg_multipart_t) is a public protocol-specific
structure accessible by all.
@note The application programmer can obtain a pointer to the
protocol-specific structure from an #msg_t object using msg_public()
function. The msg_public() takes a protocol tag, a well-known identifier, as
its argument. The SIP, HTTP, RTSP and MIME already define a wrapper around
its argument. The SIP, HTTP and MIME already define a wrapper around
msg_public(), for example, a #sip_t structure can be obtained with
sip_object() function (or macro).
......@@ -433,16 +431,16 @@ encountered.
*
* @brief Message object.
*
* The message object is used by Sofia parsers for SIP, RTSP and HTTP
* The message object is used by Sofia parsers for SIP and HTTP
* protocols. The message object has an abstract, protocol-independent
* inteface type #msg_t, and a separate public protocol-specific interface
* #msg_pub_t (which is typedef'ed to #sip_t, #rtsp_t or #http_t depending
* #msg_pub_t (which is typedef'ed to #sip_t or #http_t depending
* on the protocol).
*
* The main interface to abstract messages is defined in <msg.h>. The
* The main interface to abstract messages is defined in <sofia-sip/msg.h>. The
* network I/O interface used by transport protocols is defined in
* <msg_addr.h>. The protocol-specific parser table, also known as message
* class, is defined in <msg_mclass.h>. (The message class is used as a
* <sofia-sip/msg_addr.h>. The protocol-specific parser table, also known as message
* class, is defined in <sofia-sip/msg_mclass.h>. (The message class is used as a
* factory object when a message object is created with msg_create()).
*/
......
......@@ -313,7 +313,7 @@ msg_hclass_t msg_separator_class[] =
MSG_HEADER_CLASS(msg_, separator, NULL, "", sep_common, single,
msg_default, msg_generic);
/** Calculate length of line ending (0, 1 or 2) */
/** Calculate length of line ending (0, 1 or 2). @internal */
#define CRLF_TEST(s) ((s[0]) == '\r' ? ((s[1]) == '\n') + 1 : (s[0])=='\n')
/** Parse a separator line. */
......
......@@ -55,14 +55,14 @@ msg_time_t msg_now(void)
#define is_digit(c) ((c) >= '0' && (c) <= '9')
/**Epoch year.
/**Epoch year. @internal
*
* First day of the epoch year should be Monday.
*/
#define EPOCH 1900
/** Is this year a leap year? */
/** Is this year a leap year? @internal */
#define LEAP_YEAR(y) ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
/** Day number of New Year Day of given year */
/** Day number of New Year Day of given year. @internal */
#define YEAR_DAYS(y) \
(((y)-1) * 365 + ((y)-1) / 4 - ((y)-1) / 100 + ((y)-1) / 400)
......
......@@ -365,7 +365,7 @@ static int msg_dup_or_copy_all(msg_t *msg,
/**Copy a message shallowly.
*
* @relates msg_s
* @relatesalso msg_s
*
* Copy a message and the header structures. The copied message will share
* all the strings with the original message. It will keep a reference to
......@@ -442,7 +442,7 @@ int msg_copy_chain(msg_t *msg, msg_t const *original)
/**Deep copy a message.
*
* @relates msg_s
* @relatesalso msg_s
*
* Copy a message, the header structures and all the related strings. The
* duplicated message does not share any (non-const) data with original.
......
......@@ -55,7 +55,7 @@
/** Clone a message class.
*
* @relates msg_mclass_s
* @relatesalso msg_mclass_s
*
* The function msg_mclass_clone() makes a copy of message class object @a
* old. It is possible to resize the hash table by giving a non-zero @a
......@@ -141,7 +141,7 @@ msg_mclass_t *msg_mclass_clone(msg_mclass_t const *old, int newsize, int empty)
/**Add a new header to the message class.
*
* @relates msg_mclass_s
* @relatesalso msg_mclass_s
*
* Insert a header class @a hc to the message class object @a mc. If the
* given @a offset of the header in @ref msg_pub_t "public message
......@@ -184,7 +184,7 @@ int msg_mclass_insert_header(msg_mclass_t *mc,
/**Add a new header to the message class.
*
* @relates msg_mclass_s
* @relatesalso msg_mclass_s
*
* Insert a header class @a hc to the message class @a mc. If the given @a
* offset of the header in @ref msg_pub_t "public message structure" is
......@@ -225,7 +225,7 @@ int msg_mclass_insert_with_mask(msg_mclass_t *mc,
/** Add a header reference to the message class.
*
* @relates msg_mclass_s
* @relatesalso msg_mclass_s
*
* @param[in,out] mc pointer to a message class object
* @param[in] hr header reference object
......@@ -280,12 +280,12 @@ int msg_mclass_insert(msg_mclass_t *mc, msg_href_t const *hr)
return collisions;
}
/** Calculate length of line ending (0, 1 or 2) */
/** Calculate length of line ending (0, 1 or 2). @internal */
#define CRLF_TEST(cr, lf) ((cr) == '\r' ? ((lf) == '\n') + 1 : (cr)=='\n')
/**Search for a header class.
*
* @relates msg_mclass_s
* @relatesalso msg_mclass_s
*
* The function msg_find_hclass() searches for a header class from a message
* class based on the contents of the header to be parsed. The buffer @a s
......
......@@ -114,7 +114,7 @@ union msg_mime_u
/* ====================================================================== */
/** Calculate length of line ending (0, 1 or 2) */
/** Calculate length of line ending (0, 1 or 2). @internal */
#define CRLF_TEST(b) ((b)[0] == '\r' ? ((b)[1] == '\n') + 1 : (b)[0] =='\n')
/**@ingroup msg_mime
......@@ -1211,7 +1211,7 @@ issize_t msg_accept_any_d(su_home_t *home,
msg_header_t *h,
char *s, isize_t slen)
{
/** @relates msg_accept_any_s */
/** @relatesalso msg_accept_any_s */
msg_header_t **hh = &h->sh_succ, *h0 = h;
msg_accept_any_t *aa = (msg_accept_any_t *)h;
......@@ -1254,7 +1254,7 @@ issize_t msg_accept_any_d(su_home_t *home,
/** Encode an Accept-* header. */
issize_t msg_accept_any_e(char b[], isize_t bsiz, msg_header_t const *h, int f)
{
/** @relates msg_accept_any_s */
/** @relatesalso msg_accept_any_s */
char *b0 = b, *end = b + bsiz;
msg_accept_any_t const *aa = (msg_accept_any_t *)h;
......@@ -1268,7 +1268,7 @@ issize_t msg_accept_any_e(char b[], isize_t bsiz, msg_header_t const *h, int f)
/** Calculate extra memory used by accept-* headers. */
isize_t msg_accept_any_dup_xtra(msg_header_t const *h, isize_t offset)
{
/** @relates msg_accept_any_s */
/** @relatesalso msg_accept_any_s */
msg_accept_any_t const *aa = (msg_accept_any_t *)h;
MSG_PARAMS_SIZE(offset, aa->aa_params);
......@@ -1281,7 +1281,7 @@ isize_t msg_accept_any_dup_xtra(msg_header_t const *h, isize_t offset)
char *msg_accept_any_dup_one(msg_header_t *dst, msg_header_t const *src,
char *b, isize_t xtra)
{
/** @relates msg_accept_any_s */
/** @relatesalso msg_accept_any_s */
msg_accept_any_t *aa = (msg_accept_any_t *)dst;
msg_accept_any_t const *o = (msg_accept_any_t *)src;
char *end = b + xtra;
......
......@@ -308,31 +308,33 @@ void *msg_buf_move(msg_t *dst, msg_t const *src)
return retval;
}
/** Obtain iovec for receiving the data.
/**Obtain I/O vector for receiving the data.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_recv_iovec() allocates buffers for receiving @a n bytes
* of data available from network. It returns the buffers in the I/O vector
* Allocate buffers for receiving @a n bytes
* of data available from network. Function returns the buffers in the I/O vector
* @a vec. The @a vec is allocated by the caller, the available length is
* given as @a veclen. If the protocol is message-oriented like UDP or SCTP
* and the available data ends at message boundary, the caller should set
* the @a exact as 1. Otherwise some extra buffer (known as @em slack) is
* allocated).
*
* Currently, the msg_recv_iovec() allocates buffers in at most two blocks,
* so the caller should allocate at least two elements for the I/O vector @a
* vec.
* 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 @a vec.
*
* @param[in] msg message object
* @param[out] vec I/O vector
* @param[in] veclen available length of @a vec
* @param[in] n number of available bytes
* @param[in] n number of possibly available bytes
* @param[in] exact true if data ends at message boundary
*
* @return
* The function msg_recv_iovec() returns the length of I/O vector to
* The length of I/O vector to
* receive data, 0 if there are not enough buffers, or -1 upon an error.
*
* @sa msg_iovec(), su_vrecv()
*/
issize_t msg_recv_iovec(msg_t *msg, msg_iovec_t vec[], isize_t veclen,
usize_t n, int exact)
......@@ -461,7 +463,10 @@ issize_t msg_recv_iovec(msg_t *msg, msg_iovec_t vec[], isize_t veclen,
}
/** Obtain a buffer for receiving data */
/** Obtain a buffer for receiving data.
*
* @relatesalso msg_s
*/
issize_t msg_recv_buffer(msg_t *msg, void **return_buffer)
{
void *buffer;
......@@ -502,7 +507,7 @@ issize_t msg_recv_buffer(msg_t *msg, void **return_buffer)
/**Commit @a n bytes of buffers.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_recv_commit() is called after @a n bytes of data has
* been received to the message buffers and the parser can extract the
......@@ -548,7 +553,7 @@ isize_t msg_recv_commit(msg_t *msg, usize_t n, int eos)
/**Get a next message of the stream.
*
* @relates msg_s
* @relatesalso msg_s
*
* 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
......@@ -579,7 +584,10 @@ msg_t *msg_next(msg_t *msg)
return NULL;
}
/** Set next message of the stream */
/** Set next message of the stream.
*
* @relatesalso msg_s
*/
int msg_set_next(msg_t *msg, msg_t *next)
{
if (!msg || (next && next->m_next))
......@@ -593,7 +601,10 @@ int msg_set_next(msg_t *msg, msg_t *next)
return 0;
}
/** Clear committed data */
/** Clear committed data.
*
* @relatesalso msg_s
*/
void msg_clear_committed(msg_t *msg)
{
if (msg) {
......@@ -633,7 +644,7 @@ struct sigcomp_udvm *msg_get_udvm(msg_t *msg)
/** Mark message as complete.
*
* @relates msg_s
* @relatesalso msg_s
*/
inline
unsigned msg_mark_as_complete(msg_t *msg, unsigned mask)
......@@ -649,7 +660,7 @@ unsigned msg_mark_as_complete(msg_t *msg, unsigned mask)
/** Return true if message is complete.
*
* @relates msg_s
* @relatesalso msg_s
*/
int msg_is_complete(msg_t const *msg)
{
......@@ -658,7 +669,7 @@ int msg_is_complete(msg_t const *msg)
/** Return true if message has parsing errors.
*
* @relates msg_s
* @relatesalso msg_s
*/
int msg_has_error(msg_t const *msg)
{
......@@ -667,7 +678,7 @@ int msg_has_error(msg_t const *msg)
/**Total size of message.
*
* @relates msg_s
* @relatesalso msg_s
*/
usize_t msg_size(msg_t const *msg)
{
......@@ -676,7 +687,7 @@ usize_t msg_size(msg_t const *msg)
/** Set the maximum size of a message.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_maxsize() sets the maximum buffer size of a message. It
* returns the previous maximum size. If the @a maxsize is 0, maximum size
......@@ -700,7 +711,7 @@ usize_t msg_maxsize(msg_t *msg, usize_t maxsize)
/**Set the size of next fragment.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_streaming_size() sets the size of the message body for
* streaming.
......@@ -717,7 +728,7 @@ int msg_streaming_size(msg_t *msg, usize_t ssize)
/**Allocate a list of external buffers.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_buf_external() allocates at most msg_n_fragments
* external buffers for the message body.
......@@ -815,7 +826,7 @@ static inline issize_t
extract_trailers(msg_t *msg, msg_pub_t *mo,
char *b, isize_t bsiz, int eos, int copy);
/** Calculate length of line ending (0, 1 or 2) */
/** Calculate length of line ending (0, 1 or 2). @internal */
#define CRLF_TEST(b) ((b)[0] == '\r' ? ((b)[1] == '\n') + 1 : (b)[0] =='\n')
static inline void
......@@ -824,7 +835,7 @@ append_parsed(msg_t *msg, msg_pub_t *mo, msg_header_t **hh, msg_header_t *h,
/**Extract and parse a message from internal buffer.
*
* @relates msg_s
* @relatesalso msg_s
*
* This function parses the internal buffer and adds the parsed fragments to
* the message object. It marks the successfully parsed data as extracted.
......@@ -1449,7 +1460,7 @@ static size_t msg_header_prepare(msg_mclass_t const *, int flags,
/**Encode all message fragments.
*
* @relates msg_s
* @relatesalso msg_s
*
* The function msg_prepare() prepares a message for sending. It encodes all
* serialized fragments in the message. You have to call msg_serialize()
......@@ -1727,7 +1738,7 @@ static inline msg_header_t **msg_chain_tail(msg_t const *msg)
* The msg_serialize() collects the headers and other message components in
* the fragment chain. It should be called before msg_prepare().
*
* @relates msg_s
* @relatesalso msg_s
*
* @param msg pointer to message object
* @param pub public message structure
......@@ -1879,21 +1890,25 @@ msg_header_t **serialize_one(msg_t *msg, msg_header_t *h, msg_header_t **prev)
/**Fill an I/O vector with message contents.
*
* The function msg_iovec() calculates number of entries in the I/O vector
* @relatesalso msg_s
*
* Calculate number of entries in the I/O vector
* required to send a message @a msg. It also fills in the I/O vector array,
* if it is provided by the caller and it is large enough.
*
* @param msg
* @param vec
* @param veclen
* @param msg pointer to message object
* @param vec I/O vector (may be NULL)
* @param veclen length of I/O vector in @a vec
*
* @return
* The function msg_iovec() returns the number of entries in I/O
* Number of entries of I/O
* vector required by @a msg, or 0 upon an error.
*
* @note The caller should check that the I/O vector @a vec has enough
* entries. If the @a vec is too short, it should allocate big enough
* vector and re-invoke msg_iovec().
*
* @sa msg_recv_iovec(), su_vsend()
*/
isize_t msg_iovec(msg_t *msg, msg_iovec_t vec[], isize_t veclen)
{
......
......@@ -66,6 +66,9 @@ enum {
msg_n_fragments = 8
};
/** I/O vector type.
* @sa msg_recv_iovec(), msg_iovec(), #su_iovec_s, su_vsend(), su_vrecv().
*/
typedef struct su_iovec_s msg_iovec_t;
#define mv_base siv_base
#define mv_len siv_len
......@@ -73,8 +76,8 @@ typedef struct su_iovec_s msg_iovec_t;
SOFIAPUBFUN isize_t msg_iovec(msg_t *msg, msg_iovec_t vec[], isize_t veclen);
SOFIAPUBFUN issize_t msg_recv_iovec(msg_t *msg,
msg_iovec_t vec[], isize_t veclen, usize_t n,
int exact);
msg_iovec_t vec[], isize_t veclen, usize_t n,
int exact);
SOFIAPUBFUN isize_t msg_recv_commit(msg_t *msg, usize_t n, int eos);
SOFIAPUBFUN issize_t msg_recv_buffer(msg_t *msg, void **return_buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment