case_allo.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Allow, Allow-Events Header Field Name Parsing Macros
  3. *
  4. * Copyright (C) 2001-2003 FhG Fokus
  5. *
  6. * This file is part of SIP-router, a free SIP server.
  7. *
  8. * SIP-router is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * SIP-router is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. /*! \file
  23. * \brief Parser :: Allow, Allow-Events Header Field Name Parsing Macros
  24. *
  25. * \ingroup parser
  26. */
  27. #ifndef CASE_ALLO_H
  28. #define CASE_ALLO_H
  29. #define allow_ev_ents_CASE \
  30. switch(LOWER_DWORD(val)) { \
  31. case _ents_: \
  32. p += 4; \
  33. hdr->type = HDR_ALLOWEVENTS_T; \
  34. goto dc_end; \
  35. }
  36. #define allo_w_ev_CASE \
  37. switch(LOWER_DWORD(val)) { \
  38. case _w_ev_: \
  39. p += 4; \
  40. val = READ(p); \
  41. allow_ev_ents_CASE;\
  42. goto other; \
  43. }
  44. #define allo_CASE \
  45. p += 4; \
  46. val = READ(p); \
  47. allo_w_ev_CASE; \
  48. if (LOWER_BYTE(*p) == 'w') { \
  49. hdr->type = HDR_ALLOW_T; \
  50. p++; \
  51. goto dc_end; \
  52. } \
  53. goto other;
  54. #endif /* CASE_ALLO_H */