PageRenderTime 48ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/wireshark-1.8.0/epan/dissectors/packet-rlc-lte.h

#
C Header | 151 lines | 54 code | 29 blank | 68 comment | 0 complexity | 16e640f453266c06d21b1b48a330ee2b MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. /* packet-rlc-lte.h
  2. *
  3. * Martin Mathieson
  4. * $Id: packet-rlc-lte.h 40656 2012-01-23 02:36:46Z martinm $
  5. *
  6. * Wireshark - Network traffic analyzer
  7. * By Gerald Combs <gerald@wireshark.org>
  8. * Copyright 1998 Gerald Combs
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version 2
  13. * of the License, or (at your option) any later version.
  14. *
  15. * This program 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. /* rlcMode */
  25. #define RLC_TM_MODE 1
  26. #define RLC_UM_MODE 2
  27. #define RLC_AM_MODE 4
  28. #define RLC_PREDEF 8
  29. /* direction */
  30. #define DIRECTION_UPLINK 0
  31. #define DIRECTION_DOWNLINK 1
  32. /* priority ? */
  33. /* channelType */
  34. #define CHANNEL_TYPE_CCCH 1
  35. #define CHANNEL_TYPE_BCCH_BCH 2
  36. #define CHANNEL_TYPE_PCCH 3
  37. #define CHANNEL_TYPE_SRB 4
  38. #define CHANNEL_TYPE_DRB 5
  39. #define CHANNEL_TYPE_BCCH_DL_SCH 6
  40. /* UMSequenceNumberLength */
  41. #define UM_SN_LENGTH_5_BITS 5
  42. #define UM_SN_LENGTH_10_BITS 10
  43. /* Info attached to each LTE RLC frame */
  44. typedef struct rlc_lte_info
  45. {
  46. guint8 rlcMode;
  47. guint8 direction;
  48. guint8 priority;
  49. guint16 ueid;
  50. guint16 channelType;
  51. guint16 channelId;
  52. guint16 pduLength;
  53. guint8 UMSequenceNumberLength;
  54. } rlc_lte_info;
  55. typedef struct rlc_lte_tap_info {
  56. /* Info from context */
  57. guint8 rlcMode;
  58. guint8 direction;
  59. guint8 priority;
  60. guint16 ueid;
  61. guint16 channelType;
  62. guint16 channelId;
  63. guint16 pduLength;
  64. guint8 UMSequenceNumberLength;
  65. nstime_t time;
  66. guint8 loggedInMACFrame;
  67. guint16 sequenceNumber;
  68. guint8 isResegmented;
  69. guint8 isControlPDU;
  70. guint16 ACKNo;
  71. #define MAX_NACKs 128
  72. guint16 noOfNACKs;
  73. guint16 NACKs[MAX_NACKs];
  74. guint16 missingSNs;
  75. } rlc_lte_tap_info;
  76. /* Configure number of PDCP SN bits to use for DRB channels. */
  77. void set_rlc_lte_drb_pdcp_seqnum_length(guint16 ueid, guint8 drbid, guint8 userplane_seqnum_length);
  78. /*****************************************************************/
  79. /* UDP framing format */
  80. /* ----------------------- */
  81. /* Several people have asked about dissecting RLC by framing */
  82. /* PDUs over IP. A suggested format over UDP has been defined */
  83. /* and implemented by this dissector, using the definitions */
  84. /* below. A link to an example program showing you how to encode */
  85. /* these headers and send LTE RLC PDUs on a UDP socket is */
  86. /* provided at http://wiki.wireshark.org/RLC-LTE */
  87. /* */
  88. /* A heuristic dissecter (enabled by a preference) will */
  89. /* recognise a signature at the beginning of these frames. */
  90. /* Until someone is using this format, suggestions for changes */
  91. /* are welcome. */
  92. /*****************************************************************/
  93. /* Signature. Rather than try to define a port for this, or make the
  94. port number a preference, frames will start with this string (with no
  95. terminating NULL */
  96. #define RLC_LTE_START_STRING "rlc-lte"
  97. /* Fixed field. This is followed by the following 1 mandatory field:
  98. - rlcMode (1 byte)
  99. (where the allowed values are defined above */
  100. /* Conditional field. This field is mandatory in case of RLC Unacknowledged mode.
  101. The format is to have the tag, followed by the value (there is no length field,
  102. its implicit from the tag). The allowed values are defined above. */
  103. #define RLC_LTE_UM_SN_LENGTH_TAG 0x02
  104. /* 1 byte */
  105. /* Optional fields. Attaching this info to frames will allow you
  106. to show you display/filter/plot/add-custom-columns on these fields, so should
  107. be added if available.
  108. The format is to have the tag, followed by the value (there is no length field,
  109. its implicit from the tag) */
  110. #define RLC_LTE_DIRECTION_TAG 0x03
  111. /* 1 byte */
  112. #define RLC_LTE_PRIORITY_TAG 0x04
  113. /* 1 byte */
  114. #define RLC_LTE_UEID_TAG 0x05
  115. /* 2 bytes, network order */
  116. #define RLC_LTE_CHANNEL_TYPE_TAG 0x06
  117. /* 2 bytes, network order */
  118. #define RLC_LTE_CHANNEL_ID_TAG 0x07
  119. /* 2 bytes, network order */
  120. /* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU
  121. continues until the end of the frame) */
  122. #define RLC_LTE_PAYLOAD_TAG 0x01