Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 92 additions & 92 deletions wireshark/packet-nfapi.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


#include "config.h"
Expand All @@ -27,7 +27,7 @@
#include <epan/expert.h>
#include <epan/reassemble.h>

#define NFAPI_HEADER_LENGTH 8
#define NFAPI_HEADER_LENGTH 8
#define NFAPI_P7_HEADER_LENGTH 16

typedef int(*Decode_operation)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
Expand Down Expand Up @@ -234,7 +234,7 @@ static const true_false_string nfapi_multi_carrier_tx_strname = {
};

static const true_false_string nfapi_multi_carrier_freeze_strname = {
"Absence of other technology isnt guaranteed",
"Absence of other technology isnt guaranteed",
"Absence of other technology is guaranteed"
};

Expand Down Expand Up @@ -415,7 +415,7 @@ typedef enum {
NFAPI_ANTENNA_PORT1 = 0,
NFAPI_ANTENNA_PORT2,
NFAPI_ANTENNA_PORT4,
} nfapi_ack_nack_mode_e;
} nfapi_antenna_port_e;

static const value_string nfapi_antenna_port_vals[] = {
{ NFAPI_ANTENNA_PORT1, "1 " },
Expand Down Expand Up @@ -1416,7 +1416,7 @@ static const value_string message_id_vals[] = { { 0x80, "DL_CONFIG.request"},
{ 0x89, "SRS.indication" },
{ 0x8A, "RX_SR.indication" },
{ 0x8B, "RX_CQI.indication" },
{ 0x8C, "LBT_DL_CONFIG.request" } ,
{ 0x8C, "LBT_DL_CONFIG.request" } ,
{ 0x8D, "LBT_DL.indication" } ,

{ 0x0100, "PNF_PARAM.request" },
Expand All @@ -1435,31 +1435,31 @@ static const value_string message_id_vals[] = { { 0x80, "DL_CONFIG.request"},
{ 0x010D, "START.response" },
{ 0x010E, "STOP.request" },
{ 0x010F, "STOP.response" },
{ 0x0110, "MEASUREMENT.request" },
{ 0x0110, "MEASUREMENT.request" },
{ 0x0111, "MEASUREMENT.response" },

{ 0x0180, "UL_NODE_SYNC" },
{ 0x0181, "DL_NODE_SYNC" },
{ 0x0182, "TIMING_INFO" },

{ 0x0200, "RSSI.request" },
{ 0x0201, "RSSI.response" },
{ 0x0202, "RSSI.indication" },
{ 0x0203, "CELL_SEARCH.request" },
{ 0x0204, "CELL_SEARCH.response" },
{ 0x0205, "CELL_SEARCH.indication" },
{ 0x0206, "BROADCAST_DETECT.request" },
{ 0x0207, "BROADCAST_DETECT.response" },
{ 0x0208, "BROADCAST_DETECT.indication" },
{ 0x0209, "SYSTEM_INFORMATION_SCHEDULE.request" },
{ 0x020A, "SYSTEM_INFORMATION_SCHEDULE.response" },
{ 0x020B, "SYSTEM_INFORMATION_SCHEDULE.indication" },
{ 0x020C, "SYSTEM_INFORMATION.request" },
{ 0x020D, "SYSTEM_INFORMATION.response" },
{ 0x020E, "SYSTEM_INFORMATION.indication" },
{ 0x020F, "NMM_STOP.request" },
{ 0x0210, "NMM_STOP.response" },

{ 0x0200, "RSSI.request" },
{ 0x0201, "RSSI.response" },
{ 0x0202, "RSSI.indication" },
{ 0x0203, "CELL_SEARCH.request" },
{ 0x0204, "CELL_SEARCH.response" },
{ 0x0205, "CELL_SEARCH.indication" },
{ 0x0206, "BROADCAST_DETECT.request" },
{ 0x0207, "BROADCAST_DETECT.response" },
{ 0x0208, "BROADCAST_DETECT.indication" },
{ 0x0209, "SYSTEM_INFORMATION_SCHEDULE.request" },
{ 0x020A, "SYSTEM_INFORMATION_SCHEDULE.response" },
{ 0x020B, "SYSTEM_INFORMATION_SCHEDULE.indication" },
{ 0x020C, "SYSTEM_INFORMATION.request" },
{ 0x020D, "SYSTEM_INFORMATION.response" },
{ 0x020E, "SYSTEM_INFORMATION.indication" },
{ 0x020F, "NMM_STOP.request" },
{ 0x0210, "NMM_STOP.response" },
{ 0 , NULL },
};

Expand Down Expand Up @@ -4953,14 +4953,14 @@ static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
break;

// LBT_DL_CONFIG.request
case 0x8C:
case 0x8C:
{
dissect_p7_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint16_with_conversion(msg_tree, hf_nfapi_sfn_sf, tvb, &offset, sfn_sf_conversion);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
}
break;
// LBT_DL.indication
break;
// LBT_DL.indication
case 0x8D:
{
dissect_p7_header(tvb, pinfo, msg_tree, data, &offset);
Expand Down Expand Up @@ -5079,13 +5079,13 @@ static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
break;
}
// MEASUREMENT.request
case 0x110:
case 0x110:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// MEASUREMENT.response
}
// MEASUREMENT.response
case 0x111:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
Expand All @@ -5096,127 +5096,127 @@ static int dissect_nfapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo

// P4
// RSSI.request
case 0x200:
case 0x200:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint8(msg_tree, hf_nfapi_rat_type, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// RSSI.response
case 0x201:
}
// RSSI.response
case 0x201:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
break;
}
// RSSI.indication
case 0x202:
}
// RSSI.indication
case 0x202:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// CELL_SEARCH.request
case 0x203:
}
// CELL_SEARCH.request
case 0x203:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint8(msg_tree, hf_nfapi_rat_type, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// CELL_SEARCH.response
case 0x204:
}
// CELL_SEARCH.response
case 0x204:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
break;
}
// CELL_SEARCH.indication
case 0x205:
}
// CELL_SEARCH.indication
case 0x205:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// BROADCAST_DETECT.request
case 0x206:
}
// BROADCAST_DETECT.request
case 0x206:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint8(msg_tree, hf_nfapi_rat_type, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// BROADCAST_DETECT.response
case 0x207:
}
// BROADCAST_DETECT.response
case 0x207:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
break;
}
// BROADCAST_DETECT.indication
case 0x208:
}
// BROADCAST_DETECT.indication
case 0x208:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// SYSTEM_INFORMATION_SCHEDULE.request
case 0x209:
}
// SYSTEM_INFORMATION_SCHEDULE.request
case 0x209:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint8(msg_tree, hf_nfapi_rat_type, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// SYSTEM_INFORMATOIN_SCHEDULE.response
case 0x20A:
}
// SYSTEM_INFORMATOIN_SCHEDULE.response
case 0x20A:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
break;
}
// SYSTEM_INFORMATION_SCHEDULE.indication
case 0x20B:
}
// SYSTEM_INFORMATION_SCHEDULE.indication
case 0x20B:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// SYSTEM_INFORMATION.request
case 0x20C:
}
// SYSTEM_INFORMATION.request
case 0x20C:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint8(msg_tree, hf_nfapi_rat_type, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// SYSTEM_INFORMATION.response
case 0x20D:
}
// SYSTEM_INFORMATION.response
case 0x20D:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
break;
}
// SYSTEM_INFORMATION.indication
case 0x20E:
}
// SYSTEM_INFORMATION.indication
case 0x20E:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
proto_tree_add_uint32(msg_tree, hf_nfapi_p4_error_code, tvb, &offset, 0);
dissect_tlv_list(tvb, pinfo, msg_tree, data, &offset, tvb_reported_length(tvb));
break;
}
// NMM_STOP.request
case 0x20F:
}
// NMM_STOP.request
case 0x20F:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
break;
}
// NMM_STOP_response
}
// NMM_STOP_response
case 0x210:
{
dissect_p45_header(tvb, pinfo, msg_tree, data, &offset);
Expand Down