244340ea499b6ea068a015d0cd4fa248e3a28b08
[sip-router] / parser / case_max.h
1 /*
2  * $Id$
3  *
4  * Max-Forwards header field parser macros
5  */
6
7 #ifndef CASE_MAX_H
8 #define CASE_MAX_H
9
10
11 #define ARDS_CASE                            \
12         if (val == _ards_) {                 \
13                 hdr->type = HDR_MAXFORWARDS; \
14                 p += 4;                      \
15                 goto dc_end;                 \
16         }
17
18
19 #define FORW_CASE                 \
20         switch(val) {             \
21         case _Forw_:              \
22                 p += 4;           \
23                 val = READ(p);    \
24                 ARDS_CASE;        \
25                                   \
26                 val = unify(val); \
27                 ARDS_CASE;        \
28                 goto other;       \
29         }                                             
30
31
32 #define Max_CASE       \
33      p += 4;           \
34      val = READ(p);    \
35      FORW_CASE;        \
36                        \
37      val = unify(val); \
38      FORW_CASE;        \
39      goto other;       \
40
41
42 #endif /* CASE_MAX_H */