case_call.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * $Id$
  3. *
  4. * Call-ID Header Name Parsing Macros
  5. *
  6. * Copyright (C) 2001-2003 FhG Fokus
  7. *
  8. * This file is part of SIP-router, a free SIP server.
  9. *
  10. * SIP-router is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version
  14. *
  15. * SIP-router is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. * History:
  25. * ----------
  26. * 2003-02-28 scratchpad compatibility abandoned (jiri)
  27. * 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri)
  28. */
  29. /*! \file
  30. * \brief Parser :: Call-ID Header Name Parsing Macros
  31. *
  32. * \ingroup parser
  33. *
  34. */
  35. #ifndef CASE_CALL_H
  36. #define CASE_CALL_H
  37. #include "../comp_defs.h"
  38. #define ID_CASE \
  39. switch(LOWER_DWORD(val)) { \
  40. case __id1_: \
  41. hdr->type = HDR_CALLID_T; \
  42. hdr->name.len = 7; \
  43. return (p + 4); \
  44. \
  45. case __id2_: \
  46. hdr->type = HDR_CALLID_T; \
  47. p += 4; \
  48. goto dc_end; \
  49. }
  50. #define call_CASE \
  51. p += 4; \
  52. val = READ(p); \
  53. ID_CASE; \
  54. goto other;
  55. #endif /* CASE_CALL_H */