sofia-sip/msg_addr.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef MSG_ADDR_H
00026 
00027 #define MSG_ADDR_H 
00028 
00029 
00038 #ifndef MSG_H
00039 #include <sofia-sip/msg.h>
00040 #endif
00041 #ifndef SU_H
00042 #include <sofia-sip/su.h>
00043 #endif
00044 
00045 SOFIA_BEGIN_DECLS
00046 
00047 SOFIAPUBFUN void msg_addr_zero(msg_t *msg);
00048 SOFIAPUBFUN su_addrinfo_t *msg_addrinfo(msg_t *msg);
00049 
00050 SOFIAPUBFUN su_sockaddr_t *msg_addr(msg_t *msg);
00051 SOFIAPUBFUN socklen_t *msg_addrlen(msg_t *msg);
00052 
00053 SOFIAPUBFUN int msg_get_address(msg_t *msg, su_sockaddr_t *, socklen_t *);
00054 SOFIAPUBFUN int msg_set_address(msg_t *msg, su_sockaddr_t const *, socklen_t);
00055 
00056 SOFIAPUBFUN void msg_addr_copy(msg_t *dst, msg_t const *src);
00057 
00058 SOFIAPUBFUN int msg_errno(msg_t const *msg);
00059 SOFIAPUBFUN void msg_set_errno(msg_t *msg, int err);
00060 
00061 enum {
00063   msg_min_size = 512,
00065   msg_min_block = 8192,
00067   msg_n_fragments = 8
00068 };
00069 
00070 typedef struct su_iovec_s msg_iovec_t;
00071 #define mv_base siv_base
00072 #define mv_len  siv_len
00073 
00074 SOFIAPUBFUN int msg_iovec(msg_t *msg, msg_iovec_t vec[], int veclen);
00075 
00076 SOFIAPUBFUN int msg_recv_iovec(msg_t *msg,
00077                                msg_iovec_t vec[], int veclen, unsigned n,
00078                                int exact);
00079 SOFIAPUBFUN int msg_recv_commit(msg_t *msg, unsigned n, int eos);
00080 
00081 SOFIAPUBFUN int msg_recv_buffer(msg_t *msg, void **return_buffer);
00082 
00083 SOFIAPUBFUN msg_t *msg_next(msg_t *msg);
00084 
00085 SOFIAPUBFUN int msg_set_next(msg_t *msg, msg_t *next);
00086 
00087 SOFIAPUBFUN void msg_clear_committed(msg_t *msg);
00088 
00089 SOFIAPUBFUN int msg_buf_external(msg_t *msg, 
00090                                  unsigned N, 
00091                                  unsigned blocksize);
00092 
00093 SOFIA_END_DECLS
00094 
00095 #endif /* !defined(MSG_ADDR_H) */

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