1 /* $Id: nathelper.c 1808 2007-03-10 17:36:19Z bogdan_iancu $
3 * Copyright (C) 2003 Porta Software Ltd
5 * This file is part of Kamailio, a free SIP server.
7 * Kamailio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version
12 * Kamailio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * 2007-04-13 splitted from nathelper.c (ancuta)
27 #ifndef _NATHELPER_NATHELPER_H
28 #define _NATHELPER_NATHELPER_H
30 #include "../../str.h"
33 #define STR2IOVEC(sx, ix) do {(ix).iov_base = (sx).s; (ix).iov_len = (sx).len;} while(0)
34 #define SZ2IOVEC(sx, ix) do {(ix).iov_base = (sx); (ix).iov_len = strlen(sx);} while(0)