case_sip.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2004 Jamey Hicks, jamey dot hicks at hp dot com
  3. *
  4. * This file is part of SIP-router, a free SIP server.
  5. *
  6. * SIP-router is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version
  10. *
  11. * SIP-router is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /*! \file
  21. * \brief Parser :: Handle case for headers
  22. *
  23. * \ingroup parser
  24. */
  25. #ifndef CASE_SIP_H
  26. #define CASE_SIP_H
  27. #define atch_CASE \
  28. switch(LOWER_DWORD(val)) { \
  29. case _atch_: \
  30. DBG("end of SIP-If-Match\n"); \
  31. hdr->type = HDR_SIPIFMATCH_T; \
  32. p += 4; \
  33. goto dc_end; \
  34. }
  35. #define ifm_CASE \
  36. switch(LOWER_DWORD(val)) { \
  37. case _ifm_: \
  38. DBG("middle of SIP-If-Match: yet=0x%04x\n",LOWER_DWORD(val)); \
  39. p += 4; \
  40. val = READ(p); \
  41. atch_CASE; \
  42. goto other; \
  43. }
  44. #define sip_CASE \
  45. DBG("beginning of SIP-If-Match: yet=0x%04x\n",LOWER_DWORD(val)); \
  46. p += 4; \
  47. val = READ(p); \
  48. ifm_CASE; \
  49. goto other;
  50. #endif /* CASE_SIP_H */