From 3123ecf3e448bcd6b6d68f012872f5601e6ab911 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Tue, 29 Jun 2010 08:06:13 +0000 Subject: Add "End Marker" get rid of the .h file as no one imports anything. (Leave the .h file for a while). svn path=/trunk/; revision=33367 --- epan/dissectors/Makefile.common | 1 - epan/dissectors/packet-gtp.c | 95 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 94 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common index 7510108f4d..580ae10e8a 100644 --- a/epan/dissectors/Makefile.common +++ b/epan/dissectors/Makefile.common @@ -1095,7 +1095,6 @@ DISSECTOR_INCLUDES = \ packet-gsm_map.h \ packet-gsm_sms.h \ packet-gssapi.h \ - packet-gtp.h \ packet-h223.h \ packet-h225.h \ packet-h235.h \ diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 2e85f4e64b..d1ba59829a 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -58,7 +58,6 @@ #include "packet-per.h" #include "packet-ranap.h" #include "packet-bssgp.h" -#include "packet-gtp.h" static dissector_table_t ppp_subdissector_table; @@ -308,6 +307,99 @@ static gboolean g_gtp_etsi_order = FALSE; static int gtp_tap = -1; +/*structure used to track responses to requests using sequence number*/ +typedef struct gtp_msg_hash_entry { + gboolean is_request; /*TRUE/FALSE*/ + guint32 req_frame; /*frame with request */ + nstime_t req_time; /*req time */ + guint32 rep_frame; /*frame with reply */ + gint seq_nr; /*sequence number*/ + guint msgtype; /*messagetype*/ +} gtp_msg_hash_t; + +/* definitions of GTP messages */ +#define GTP_MSG_UNKNOWN 0x00 +#define GTP_MSG_ECHO_REQ 0x01 +#define GTP_MSG_ECHO_RESP 0x02 +#define GTP_MSG_VER_NOT_SUPP 0x03 +#define GTP_MSG_NODE_ALIVE_REQ 0x04 +#define GTP_MSG_NODE_ALIVE_RESP 0x05 +#define GTP_MSG_REDIR_REQ 0x06 +#define GTP_MSG_REDIR_RESP 0x07 +#define GTP_MSG_CREATE_PDP_REQ 0x10 +#define GTP_MSG_CREATE_PDP_RESP 0x11 +#define GTP_MSG_UPDATE_PDP_REQ 0x12 +#define GTP_MSG_UPDATE_PDP_RESP 0x13 +#define GTP_MSG_DELETE_PDP_REQ 0x14 +#define GTP_MSG_DELETE_PDP_RESP 0x15 +#define GTP_MSG_CREATE_AA_PDP_REQ 0x16 /* 2G */ +#define GTP_MSG_CREATE_AA_PDP_RESP 0x17 /* 2G */ +#define GTP_MSG_DELETE_AA_PDP_REQ 0x18 /* 2G */ +#define GTP_MSG_DELETE_AA_PDP_RESP 0x19 /* 2G */ +#define GTP_MSG_ERR_IND 0x1A +#define GTP_MSG_PDU_NOTIFY_REQ 0x1B +#define GTP_MSG_PDU_NOTIFY_RESP 0x1C +#define GTP_MSG_PDU_NOTIFY_REJ_REQ 0x1D +#define GTP_MSG_PDU_NOTIFY_REJ_RESP 0x1E +#define GTP_MSG_SUPP_EXT_HDR 0x1F +#define GTP_MSG_SEND_ROUT_INFO_REQ 0x20 +#define GTP_MSG_SEND_ROUT_INFO_RESP 0x21 +#define GTP_MSG_FAIL_REP_REQ 0x22 +#define GTP_MSG_FAIL_REP_RESP 0x23 +#define GTP_MSG_MS_PRESENT_REQ 0x24 +#define GTP_MSG_MS_PRESENT_RESP 0x25 +#define GTP_MSG_IDENT_REQ 0x30 +#define GTP_MSG_IDENT_RESP 0x31 +#define GTP_MSG_SGSN_CNTXT_REQ 0x32 +#define GTP_MSG_SGSN_CNTXT_RESP 0x33 +#define GTP_MSG_SGSN_CNTXT_ACK 0x34 +#define GTP_MSG_FORW_RELOC_REQ 0x35 +#define GTP_MSG_FORW_RELOC_RESP 0x36 +#define GTP_MSG_FORW_RELOC_COMP 0x37 +#define GTP_MSG_RELOC_CANCEL_REQ 0x38 +#define GTP_MSG_RELOC_CANCEL_RESP 0x39 +#define GTP_MSG_FORW_SRNS_CNTXT 0x3A +#define GTP_MSG_FORW_RELOC_ACK 0x3B +#define GTP_MSG_FORW_SRNS_CNTXT_ACK 0x3C + + +#define GTP_MSG_RAN_INFO_RELAY 70 +#define GTP_MBMS_NOTIFY_REQ 96 +#define GTP_MBMS_NOTIFY_RES 97 +#define GTP_MBMS_NOTIFY_REJ_REQ 98 +#define GTP_MBMS_NOTIFY_REJ_RES 99 +#define GTP_CREATE_MBMS_CNTXT_REQ 100 +#define GTP_CREATE_MBMS_CNTXT_RES 101 +#define GTP_UPD_MBMS_CNTXT_REQ 102 +#define GTP_UPD_MBMS_CNTXT_RES 103 +#define GTP_DEL_MBMS_CNTXT_REQ 104 +#define GTP_DEL_MBMS_CNTXT_RES 105 +#define GTP_MBMS_REG_REQ 112 +#define GTP_MBMS_REG_RES 113 +#define GTP_MBMS_DE_REG_REQ 114 +#define GTP_MBMS_DE_REG_RES 115 +#define GTP_MBMS_SES_START_REQ 116 +#define GTP_MBMS_SES_START_RES 117 +#define GTP_MBMS_SES_STOP_REQ 118 +#define GTP_MBMS_SES_STOP_RES 119 +#define GTP_MBMS_SES_UPD_REQ 120 +#define GTP_MBMS_SES_UPD_RES 121 +/* 122-127 For future use. Shall not be sent. + * If received, shall be treated as an Unknown message. + */ +#define GTP_MS_INFO_CNG_NOT_REQ 121 +#define GTP_MS_INFO_CNG_NOT_RES 122 +/* 130-239 For future use. Shall not be sent. + * If received, shall be treated as an Unknown message. + */ +#define GTP_MSG_DATA_TRANSF_REQ 0xF0 +#define GTP_MSG_DATA_TRANSF_RESP 0xF1 +/* 242-253 For future use. Shall not be sent. + * If received, shall be treated as an Unknown message. + */ +#define GTP_MSG_END_MARKER 0xFE /* 254 */ +#define GTP_MSG_TPDU 0xFF + /* Definition of flags masks */ #define GTP_VER_MASK 0xE0 @@ -460,6 +552,7 @@ static const value_string message_type[] = { {GTP_MS_INFO_CNG_NOT_RES, "MS Info Change Notification Response"}, {GTP_MSG_DATA_TRANSF_REQ, "Data record transfer request"}, {GTP_MSG_DATA_TRANSF_RESP, "Data record transfer response"}, + {GTP_MSG_END_MARKER, "End Marker"}, {GTP_MSG_TPDU, "T-PDU"}, {0, NULL} }; -- cgit v1.2.3