*
* Copyright 2008 - 2010, Anders Broman <anders.broman@ericsson.com>
*
- * $Id$
- *
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
#include <epan/packet.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
+#include <epan/wmem/wmem.h>
#include "packet-gsm_map.h"
#include "packet-gsm_a_common.h"
#include "packet-e212.h"
#include "packet-lcsap.h"
+void proto_register_nas_eps(void);
+void proto_reg_handoff_nas_eps(void);
+
#define PNAME "Non-Access-Stratum (NAS)PDU"
#define PSNAME "NAS-EPS"
#define PFNAME "nas-eps"
{ 0x61, "EMM information"},
{ 0x62, "Downlink NAS transport"},
{ 0x63, "Uplink NAS transport"},
- { 0x64, "CS Service notification"},
+ { 0x64, "CS service notification"},
{ 0x68, "Downlink generic NAS transport"},
{ 0x69, "Uplink generic NAS transport"},
{ 0, NULL }
* Dissected in packet-gsm_a_dtap.c
*/
-guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
+guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string, int string_len) = {
/* 9.9.2 Common information elements */
/* Type of detach (octet 1)
* In the UE to network direction:
*/
-static const value_string nas_eps_emm_type_of_dtatch_UL_vals[] = {
+static const value_string nas_eps_emm_type_of_detach_UL_vals[] = {
{ 0x1, "EPS detach"},
{ 0x2, "IMSI detach"},
{ 0x3, "Combined EPS/IMSI detach"},
* In the network to UE direction:
*/
-static const value_string nas_eps_emm_type_of_dtatch_DL_vals[] = {
+static const value_string nas_eps_emm_type_of_detach_DL_vals[] = {
{ 0x1, "Re-attach required"},
{ 0x2, "Re-attach not required"},
{ 0x3, "IMSI detach"},
/*
* 9.9.3.9 EMM cause
*/
-static const value_string nas_eps_emm_cause_values[] = {
+const value_string nas_eps_emm_cause_values[] = {
{ 0x2, "IMSI unknown in HSS"},
{ 0x3, "Illegal UE"},
{ 0x5, "IMEI not accepted"},
{ 0x6f, "Protocol error, unspecified"},
{ 0, NULL }
};
-static value_string_ext nas_eps_emm_cause_values_ext = VALUE_STRING_EXT_INIT(nas_eps_emm_cause_values);
+value_string_ext nas_eps_emm_cause_values_ext = VALUE_STRING_EXT_INIT(nas_eps_emm_cause_values);
static guint16
de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
proto_tree_add_item(tree, hf_nas_eps_emm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
- return curr_offset-offset;}
+ return curr_offset-offset;
+}
+
/*
* 9.9.3.10 EPS attach result
*/
length = tvb_length(tvb);
- digit_str = (char *)ep_alloc(length*2);
+ digit_str = (char *)wmem_alloc(wmem_packet_scope(), length*2);
/* Get identity digit 1 */
octet = tvb_get_guint8(tvb,offset);
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_id, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
- /*curr_offset+=len;*/
+ /*curr_offset+=1;*/
- return(len);
+ return(1);
}
/*
* 9.9.3.26 P-TMSI signature
/* NF capability (octet 7, bit 1) */
proto_tree_add_item(tree, hf_nas_eps_emm_nf_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
-
+
while ((curr_offset - offset) < len) {
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
curr_offset++;
} else {
bitrate = calc_bitrate(octet);
dl_total += bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink : %u kbps", bitrate);
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", bitrate);
}
curr_offset++;
} else {
bitrate = calc_bitrate(octet);
ul_total += bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink : %u kbps", bitrate);
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", bitrate);
}
curr_offset++;
if ((curr_offset - offset) >= len)
} else {
bitrate = calc_bitrate_ext(octet);
dl_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink (extended) : %u %s",
- bitrate,
- (octet > 0x4a) ? "Mbps" : "kbps");
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
+ "%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 5) {
/* APN-AMBR for downlink (extended-2) is not present; display total now */
} else {
bitrate = calc_bitrate_ext(octet);
ul_total += (octet > 0x4a) ? bitrate*1000 : bitrate;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink (extended) : %u %s",
- bitrate,
- (octet > 0x4a) ? "Mbps" : "kbps");
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
+ "%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 6) {
/* APN-AMBR for uplink (extended-2) is not present; display total now */
"Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended)");
} else {
dl_total += octet*256*1000;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
- "APN-AMBR for downlink (extended-2) : %u Mbps",
- (octet* 256));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
+ "%u Mbps", (octet* 256));
}
proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for downlink : %.3f Mbps", (gfloat)dl_total / 1000);
curr_offset++;
"Use the value indicated by the APN-AMBR for uplink and APN-AMBR for uplink (extended)");
} else {
ul_total += octet*256*1000;
- proto_tree_add_uint_format(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
- "APN-AMBR for uplink (extended-2) : %u Mbps",
- (octet* 256));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_emm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
+ "%u Mbps", (octet* 256));
}
proto_tree_add_text(tree, tvb, curr_offset, 1,"Total APN-AMBR for uplink : %.3f Mbps", (gfloat)ul_total / 1000);
curr_offset++;
proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for uplink/ NW->UE Reserved");
} else {
- proto_tree_add_uint_format(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
- "Maximum bit rate for uplink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_mbr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for downlink/ NW->UE Reserved");
} else {
- proto_tree_add_uint_format(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
- "Maximum bit rate for downlink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_mbr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for uplink octet 6 */
octet = tvb_get_guint8(tvb,curr_offset);
- proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for uplink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for downlink octet 7 */
octet = tvb_get_guint8(tvb,curr_offset);
- proto_tree_add_uint_format(tree, hf_nas_eps_gbr_dl, tvb, curr_offset, 1, octet,
- "Guaranteed bit rate for downlink : %u kbps", calc_bitrate(octet));
+ proto_tree_add_uint_format_value(tree, hf_nas_eps_gbr_dl, tvb, curr_offset, 1, octet,
+ "%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
* The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20].
*/
-guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
/* 9.9.3 EPS Mobility Management (EMM) information elements */
de_emm_add_upd_res, /* 9.9.3.0A Additional update result */
de_emm_add_upd_type, /* 9.9.3.0B Additional update type */
#define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
-guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
NULL, /* 9.9.4.1 Access point name */
de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */
NULL, /* 9.9.4.2A Connectivity type */
*/
static void
-nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
* 8.2.2 Attach complete
*/
static void
-nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.3 Attach reject
*/
static void
-nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.4 Attach request
*/
static void
-nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
* 8.2.5 Authentication failure
*/
static void
-nas_emm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
*/
static void
-nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
* 8.2.8 Authentication response
*/
static void
-nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
*/
static void
-nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
/* Paging identity Paging identity 9.9.3.25A M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_PAGING_ID, NULL);
/* 60 CLI CLI 9.9.3.38 O TLV 3-12 */
- ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLD_PARTY_BCD_NUM, " - CLI");
+ ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, " - CLI");
/* 61 SS Code SS Code 9.9.3.39 O TV 2 */
ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, NULL);
/* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */
*/
static void
-nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
guint curr_len;
+ guint64 switch_off;
+ guint64 detach_type;
curr_offset = offset;
curr_len = len;
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* Detach type Detach type 9.9.3.6 M V 1/2 */
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, &switch_off, ENC_BIG_ENDIAN);
bit_offset++;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
/* bit_offset+=3;*/
+ /* Show detach reason in Info column. TODO: expert info ? */
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s%s)",
+ val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_UL_vals, "Unknown"),
+ (switch_off==0) ? "" : " / switch-off");
/* Fix the lengths */
curr_len--;
/* GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL);
-
- return;
}
/*
* 8.2.11.2 Detach request (UE terminated detach)
*/
static void
-nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
+ guint64 detach_type;
curr_offset = offset;
curr_len = len;
/* In the network to UE direction bit 4 is spare. The network shall set this bit to zero. */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
- proto_tree_add_bits_item(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
+ /* Show detach reason in Info column. TODO: expert info ? */
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
+ val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_DL_vals, "Unknown"));
/* Fix the lengths */
curr_len--;
ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0);
-
- return;
}
static void
nas_emm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
-#if 0
- guint32 curr_offset;
-#endif
- /*guint curr_len;*/
-
-#if 0
- curr_offset = offset;
-#endif
- /*curr_len = len;*/
-
- if (pinfo) {
- if (pinfo->link_dir == P2P_DIR_UL) {
- nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
- return;
- }else if (pinfo->link_dir == P2P_DIR_DL) {
- nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
- return;
- }
+ if (pinfo->link_dir == P2P_DIR_UL) {
+ nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
+ return;
+ }else if (pinfo->link_dir == P2P_DIR_DL) {
+ nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
+ return;
}
-#if 0
- proto_tree_add_text(tree, tvb, curr_offset, len,"UL/DL not known, can't properly dissect");
- proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE terminated detach");
- nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
- proto_tree_add_text(tree, tvb, curr_offset, len,"Trying to dissect as UE originating detach");
- nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
-#else
+
if (len >= 8) {
nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
} else {
nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
}
-#endif
-
- return;
}
/*
* 8.2.12 Downlink NAS Transport
*/
static void
-nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.13 EMM information
*/
static void
-nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.14 EMM status
*/
static void
-nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.15 Extended service request
*/
static void
-nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
* 8.2.16 GUTI reallocation command
*/
static void
-nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.19 Identity response
*/
static void
-nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.20 Security mode command
*/
static void
-nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
* 8.2.21 Security mode complete
*/
static void
-nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.22 Security mode reject
*/
static void
-nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
*/
#if 0
static int
-nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_sec_prot_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint curr_len;
* 8.2.24 Service reject
*/
static void
-nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* Message authentication code (short) Short MAC 9.9.3.28 M V 2
*/
static void
-nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.26 Tracking area update accept
*/
static void
-nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
* 8.2.28 Tracking area update reject
*/
static void
-nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.29 Tracking area update request
*/
static void
-nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
* 8.2.30 Uplink NAS Transport
*/
static void
-nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.31 Downlink generic NAS transport
*/
static void
-nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.2.32 Uplink generic NAS transport
*/
static void
-nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.3.15 ESM status
*/
static void
-nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
* 8.3.18A Notification
*/
static void
-nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
+nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
#define NUM_NAS_MSG_ESM (sizeof(nas_msg_esm_strings)/sizeof(value_string))
static gint ett_nas_msg_esm[NUM_NAS_MSG_ESM];
-static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
+static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_esm_act_def_eps_bearer_ctx_req, /* Activate default EPS bearer context request*/
nas_esm_act_def_eps_bearer_ctx_acc, /* Activate default EPS bearer context accept*/
nas_esm_act_def_eps_bearer_ctx_rej, /* Activate default EPS bearer context reject*/
#define NUM_NAS_MSG_EMM (sizeof(nas_msg_emm_strings)/sizeof(value_string))
static gint ett_nas_msg_emm[NUM_NAS_MSG_EMM];
-static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len) = {
+static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_emm_attach_req, /* Attach request */
nas_emm_attach_acc, /* Attach accept */
nas_emm_attach_comp, /* Attach complete */
}
void
-proto_register_nas_eps(void) {
+proto_register_nas_eps(void)
+{
guint i;
guint last_offset;
module_t *nas_eps_module;
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_ul_ext,
- { "APN-AMBR for uplink(Extended)","nas_eps.emm.apn_ambr_ul_ext",
+ { "APN-AMBR for uplink (extended)","nas_eps.emm.apn_ambr_ul_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_dl_ext,
- { "APN-AMBR for downlink(Extended)","nas_eps.emm.apn_ambr_dl_ext",
+ { "APN-AMBR for downlink (extended)","nas_eps.emm.apn_ambr_dl_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_ul_ext2,
- { "APN-AMBR for uplink(Extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
+ { "APN-AMBR for uplink (extended-2)","nas_eps.emm.apn_ambr_ul_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_apn_ambr_dl_ext2,
- { "APN-AMBR for downlink(Extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
+ { "APN-AMBR for downlink (extended-2)","nas_eps.emm.apn_ambr_dl_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
},
{ &hf_nas_eps_emm_detach_type_UL,
{ "Detach Type","nas_eps.emm.detach_type_ul",
- FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_UL_vals), 0x0,
+ FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_UL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_type_DL,
{ "Detach Type","nas_eps.emm.detach_type_dl",
- FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_dtatch_DL_vals), 0x0,
+ FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_DL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_qci,
lpp_handle = find_dissector("lpp");
}
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */