00001 /* 00002 * $Id$ 00003 * 00004 * 00005 * Copyright (C) 2001-2003 FhG Fokus 00006 * 00007 * This file is part of ser, a free SIP server. 00008 * 00009 * ser is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version 00013 * 00014 * ser is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 * 00023 * History: 00024 * 2002-02-14 : created by bogdan 00025 * 2003-09-11 : lump_rpl type added - LUMP_RPL_BODY & LUMP_RPL_HDR (bogdan) 00026 * 2003-11-11 : build_lump_rpl merged into add_lump_rpl; type removed; 00027 * flags LUMP_RPL_BODY, LUMP_RPL_NODUP and LUMP_RPL_NOFREE 00028 * added (bogdan) 00029 * 2006-10-16 add_lump_rpl2 added: same as the old add_lump_rpl, but 00030 * returns a lump_rpl**, making a specific lump removal much 00031 * more easy (andrei) 00032 */ 00033 00043 #ifndef data_lump_rpl_h 00044 #define data_lump_rpl_h 00045 00046 #include "parser/msg_parser.h" 00047 00048 00049 #define LUMP_RPL_HDR (1<<1) 00050 #define LUMP_RPL_BODY (1<<2) 00051 #define LUMP_RPL_NODUP (1<<3) 00052 #define LUMP_RPL_NOFREE (1<<4) 00053 #define LUMP_RPL_SHMEM (1<<5) 00054 00055 struct lump_rpl 00056 { 00057 str text; 00058 int flags; 00059 struct lump_rpl* next; 00060 }; 00061 00062 struct lump_rpl** add_lump_rpl2(struct sip_msg *, char *, int , int ); 00063 00064 00066 inline static struct lump_rpl* add_lump_rpl(struct sip_msg* msg, 00067 char* s, int len , int flags ) 00068 { 00069 struct lump_rpl** l; 00070 00071 l=add_lump_rpl2(msg, s, len, flags); 00072 return l?(*l):0; 00073 } 00074 00075 00076 void free_lump_rpl(struct lump_rpl* ); 00077 00078 void unlink_lump_rpl(struct sip_msg *, struct lump_rpl* ); 00079 00080 void del_nonshm_lump_rpl( struct lump_rpl ** ); 00081 00082 #endif
1.7.1