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