2ebbad33861b5346d3922948a2600ffe781bf971
[sip-router] / parser / case_www.h
1 /*
2  * $Id$
3  *
4  * WWW-Authenticate header field parser macros
5  */
6
7 #ifndef CASE_WWW_H
8 #define CASE_WWW_H
9
10
11 #define CATE_CASE                        \
12         switch(val) {                    \
13         case _cate_:                     \
14                 hdr->type = HDR_WWWAUTH; \
15                 p += 4;                  \
16                 goto dc_end;             \
17         }
18
19
20 #define ENTI_CASE                 \
21         switch(val) {             \
22         case _enti_:              \
23                 p += 4;           \
24                 val = READ(p);    \
25                 CATE_CASE;        \
26                                   \
27                 val = unify(val); \
28                 CATE_CASE;        \
29                 goto other;       \
30
31
32
33 #define WWW_AUTH_CASE             \
34         switch(val) {             \
35         case _Auth_:              \
36                 p += 4;           \
37                 val = READ(p);    \
38                 ENTI_CASE;        \
39                                   \
40                 val = unify(val); \
41                 ENTI_CASE;        \
42                 goto other;       \
43         }
44
45
46 #define WWW_CASE          \
47         p += 4;           \
48         val = READ(p);    \
49         WWW_AUTH_CASE;    \
50                           \
51         val = unify(val); \
52                           \
53         WWW_AUTH_CASE;    \
54         goto other;
55
56
57 #endif /* CASE_WWW_H */