atmuni31.h 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (c) 1997 Yen Yen Lim and North Dakota State University
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. All advertising materials mentioning features or use of this software
  14. * must display the following acknowledgement:
  15. * This product includes software developed by Yen Yen Lim and
  16. North Dakota State University
  17. * 4. The name of the author may not be used to endorse or promote products
  18. * derived from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  21. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  22. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  23. * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  24. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  25. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  26. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  28. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  29. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  30. * POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. /* Based on UNI3.1 standard by ATM Forum */
  33. /* ATM traffic types based on VPI=0 and (the following VCI */
  34. #define VCI_PPC 0x05 /* Point-to-point signal msg */
  35. #define VCI_BCC 0x02 /* Broadcast signal msg */
  36. #define VCI_OAMF4SC 0x03 /* Segment OAM F4 flow cell */
  37. #define VCI_OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */
  38. #define VCI_METAC 0x01 /* Meta signal msg */
  39. #define VCI_ILMIC 0x10 /* ILMI msg */
  40. /* Q.2931 signalling messages */
  41. #define CALL_PROCEED 0x02 /* call proceeding */
  42. #define CONNECT 0x07 /* connect */
  43. #define CONNECT_ACK 0x0f /* connect_ack */
  44. #define SETUP 0x05 /* setup */
  45. #define RELEASE 0x4d /* release */
  46. #define RELEASE_DONE 0x5a /* release_done */
  47. #define RESTART 0x46 /* restart */
  48. #define RESTART_ACK 0x4e /* restart ack */
  49. #define STATUS 0x7d /* status */
  50. #define STATUS_ENQ 0x75 /* status ack */
  51. #define ADD_PARTY 0x80 /* add party */
  52. #define ADD_PARTY_ACK 0x81 /* add party ack */
  53. #define ADD_PARTY_REJ 0x82 /* add party rej */
  54. #define DROP_PARTY 0x83 /* drop party */
  55. #define DROP_PARTY_ACK 0x84 /* drop party ack */
  56. /* Information Element Parameters in the signalling messages */
  57. #define CAUSE 0x08 /* cause */
  58. #define ENDPT_REF 0x54 /* endpoint reference */
  59. #define AAL_PARA 0x58 /* ATM adaptation layer parameters */
  60. #define TRAFF_DESCRIP 0x59 /* atm traffic descriptors */
  61. #define CONNECT_ID 0x5a /* connection identifier */
  62. #define QOS_PARA 0x5c /* quality of service parameters */
  63. #define B_HIGHER 0x5d /* broadband higher layer information */
  64. #define B_BEARER 0x5e /* broadband bearer capability */
  65. #define B_LOWER 0x5f /* broadband lower information */
  66. #define CALLING_PARTY 0x6c /* calling party number */
  67. #define CALLED_PARTY 0x70 /* called party nmber */
  68. #define Q2931 0x09
  69. /* Q.2931 signalling general messages format */
  70. #define PROTO_POS 0 /* offset of protocol discriminator */
  71. #define CALL_REF_POS 2 /* offset of call reference value */
  72. #define MSG_TYPE_POS 5 /* offset of message type */
  73. #define MSG_LEN_POS 7 /* offset of mesage length */
  74. #define IE_BEGIN_POS 9 /* offset of first information element */
  75. /* format of signalling messages */
  76. #define TYPE_POS 0
  77. #define LEN_POS 2
  78. #define FIELD_BEGIN_POS 4