d534f1c6c0551a1a9bc69dc55f761f850e6f836b
[sip-router] / parser / case_requ.h
1 /*
2  * $Id$
3  *
4  * Require header field parser macros
5  */
6
7 #ifndef CASE_REQU_H
8 #define CASE_REQU_H
9
10
11 #define IRE_CASE                         \
12         switch(val) {                    \
13         case _ire1_:                     \
14                 hdr->type = HDR_REQUIRE; \
15                 hdr->name.len = 7;       \
16                 *(p + 3) = '\0';         \
17                 return (p + 4);          \
18                                          \
19         case _ire2_:                     \
20                 hdr->type = HDR_REQUIRE; \
21                 p += 4;                  \
22                 goto dc_end;             \
23         }
24
25
26 #define Requ_CASE         \
27         p += 4;           \
28         val = READ(p);    \
29         IRE_CASE;         \
30                           \
31         val = unify(val); \
32         IRE_CASE;         \
33         goto other;
34
35
36 #endif /* CASE_REQU_H */