case_auth.h

Go to the documentation of this file.
00001 /* 
00002  * $Id$ 
00003  *
00004  * Authorization 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  */
00030 #ifndef CASE_AUTH_H
00031 #define CASE_AUTH_H
00032 
00033 
00034 #define AUTH_ATIO_CASE                                 \
00035         if (LOWER_DWORD(val) == _atio_) {              \
00036                 p += 4;                                \
00037                 switch(LOWER_BYTE(*p)) {               \
00038                 case 'n':                              \
00039                         hdr->type = HDR_AUTHORIZATION_T; \
00040                         p++;                           \
00041                         goto dc_end;                   \
00042                                                        \
00043                 default: goto other;                   \
00044                 }                                      \
00045         }
00046                      
00047 
00048 #define AUTH_ORIZ_CASE                     \
00049         if (LOWER_DWORD(val) == _oriz_) {  \
00050                 p += 4;                    \
00051                 val = READ(p);             \
00052                 AUTH_ATIO_CASE;            \
00053                 goto other;                \
00054         }
00055 
00056 
00057 #define auth_CASE      \
00058      p += 4;           \
00059      val = READ(p);    \
00060      AUTH_ORIZ_CASE;   \
00061      goto other;
00062 
00063 
00064 #endif /* CASE_AUTH_H */