1 /*
2  * Copyright (C) 2004 Jamey Hicks, jamey dot hicks at hp dot com
3  *
4  * This file is part of Kamailio, a free SIP server.
5  *
6  * Kamailio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version
10  *
11  * Kamailio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 /*! \file
22  * \brief Parser :: Handle case for headers
23  *
24  * \ingroup parser
25  */
26 
27 
28 #ifndef CASE_SIP_H
29 #define CASE_SIP_H
30 
31 #define atch_CASE                            \
32         switch(LOWER_DWORD(val)) {          \
33         case _atch_:                        \
34 		DBG("end of SIP-If-Match\n"); \
35                 hdr->type = HDR_SIPIFMATCH_T; \
36                 p += 4;                     \
37                 goto dc_end;                \
38         }
39 
40 
41 #define ifm_CASE				\
42 	switch(LOWER_DWORD(val)) {		\
43 	case _ifm_:				\
44 		DBG("middle of SIP-If-Match: yet=0x%04x\n",LOWER_DWORD(val)); \
45 		p += 4;				\
46 		val = READ(p);			\
47 		atch_CASE;			\
48 		goto other;			\
49 	}
50 
51 #define sip_CASE          \
52 	DBG("beginning of SIP-If-Match: yet=0x%04x\n",LOWER_DWORD(val)); \
53         p += 4;           \
54         val = READ(p);    \
55         ifm_CASE;         \
56         goto other;
57 
58 #endif /* CASE_SIP_H */
59