case_allo.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Allow, Allow-Events Header Field Name Parsing Macros
00005  *
00006  * Copyright (C) 2001-2003 FhG Fokus
00007  *
00008  * This file is part of SIP-router, a free SIP server.
00009  *
00010  * SIP-router is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * SIP-router is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  */
00024 
00031 #ifndef CASE_ALLO_H
00032 #define CASE_ALLO_H
00033 
00034 #define allow_ev_ents_CASE         \
00035         switch(LOWER_DWORD(val)) { \
00036         case _ents_:               \
00037                 p += 4;            \
00038                 hdr->type = HDR_ALLOWEVENTS_T; \
00039                 goto dc_end;       \
00040         }
00041 
00042 
00043 
00044 #define allo_w_ev_CASE             \
00045         switch(LOWER_DWORD(val)) { \
00046         case _w_ev_:               \
00047                 p += 4;            \
00048                 val = READ(p);     \
00049                 allow_ev_ents_CASE;\
00050                 goto other;        \
00051         }
00052 
00053 
00054 #define allo_CASE                  \
00055     p += 4;                        \
00056     val = READ(p);                 \
00057     allo_w_ev_CASE;                \
00058     if (LOWER_BYTE(*p) == 'w') {   \
00059             hdr->type = HDR_ALLOW_T; \
00060             p++;                   \
00061             goto dc_end;           \
00062     }                              \
00063     goto other;
00064 
00065 
00066 #endif /* CASE_ALLO_H */