case_call.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Call-ID Header 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. * History:
  23. * ----------
  24. * 2003-02-28 scratchpad compatibility abandoned (jiri)
  25. * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
  26. */
  27. /*! \file
  28. * \brief Parser :: Call-ID Header Name Parsing Macros
  29. *
  30. * \ingroup parser
  31. *
  32. */
  33. #ifndef CASE_CALL_H
  34. #define CASE_CALL_H
  35. #include "../comp_defs.h"
  36. #define ID_CASE \
  37. switch(LOWER_DWORD(val)) { \
  38. case __id1_: \
  39. hdr->type = HDR_CALLID_T; \
  40. hdr->name.len = 7; \
  41. return (p + 4); \
  42. \
  43. case __id2_: \
  44. hdr->type = HDR_CALLID_T; \
  45. p += 4; \
  46. goto dc_end; \
  47. }
  48. #define call_CASE \
  49. p += 4; \
  50. val = READ(p); \
  51. ID_CASE; \
  52. goto other;
  53. #endif /* CASE_CALL_H */