sofia-sip/msg_addr.h File Reference


Detailed Description

Addressing and I/O interface for messages.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Thu Jun 8 19:28:55 2000 ppessi

#include <sofia-sip/su.h>
#include <sofia-sip/msg.h>

Include dependency graph for msg_addr.h:

Go to the source code of this file.

Enumerations

enum  {
  msg_min_size,
  msg_min_block,
  msg_n_fragments
}

Functions

SOFIA_BEGIN_DECLS SOFIAPUBFUN
void 
msg_addr_zero (msg_t *msg)
 Zero the message address.
SOFIAPUBFUN su_addrinfo_t * msg_addrinfo (msg_t *msg)
 Get addrinfo structure.
SOFIAPUBFUN su_sockaddr_t * msg_addr (msg_t *msg)
 Get pointer to socket address structure.
SOFIAPUBFUN socklen_t * msg_addrlen (msg_t *msg)
 Get pointer to address length.
SOFIAPUBFUN int msg_get_address (msg_t *msg, su_sockaddr_t *, socklen_t *)
 Get message address.
SOFIAPUBFUN int msg_set_address (msg_t *msg, su_sockaddr_t const *, socklen_t)
 Set message address.
SOFIAPUBFUN void msg_addr_copy (msg_t *dst, msg_t const *src)
 Copy message address.
SOFIAPUBFUN int msg_errno (msg_t const *msg)
 Get error number associated with message.
SOFIAPUBFUN void msg_set_errno (msg_t *msg, int err)
 Set error number associated with message.
SOFIAPUBFUN int msg_iovec (msg_t *msg, msg_iovec_t vec[], int veclen)
 Fill an I/O vector with message contents.
SOFIAPUBFUN int msg_recv_buffer (msg_t *msg, void **return_buffer)
 Obtain a buffer for receiving data.
SOFIAPUBFUN int msg_set_next (msg_t *msg, msg_t *next)
 Set next message of the stream.
SOFIAPUBFUN void msg_clear_committed (msg_t *msg)
 Clear committed data.


Enumeration Type Documentation

anonymous enum

Enumerator:
msg_min_size  Minimum size of a message buffer.
msg_min_block  Minimum size of external buffer.
msg_n_fragments  Number of external buffers.


Function Documentation

SOFIAPUBFUN su_sockaddr_t* msg_addr ( msg_t msg  ) 

Get pointer to socket address structure.

Deprecated:
Use msg_get_address() or msg_set_address() instead.

SOFIAPUBFUN socklen_t* msg_addrlen ( msg_t msg  ) 

Get pointer to address length.

Deprecated:
Use msg_get_address() or msg_set_address() instead.

SOFIAPUBFUN int msg_iovec ( msg_t msg,
msg_iovec_t  vec[],
int  veclen 
)

Fill an I/O vector with message contents.

The function msg_iovec() calculates 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.

Parameters:
msg 
vec 
veclen 
Returns:
The function msg_iovec() returns the number of entries in I/O vector required by msg, or 0 upon an error.
Note:
The caller should check that the I/O vector vec has enough entries. If the vec is too short, it should allocate big enough vector and re-invoke msg_iovec().


Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.