PFCP: add dissector for Broadband Forum TR-459

This commit is contained in:
Andreas Schultz 2021-05-06 18:41:13 +02:00 committed by Wireshark GitLab Utility
parent 9e8e4f3ed3
commit a6dfdef9b5
1 changed files with 637 additions and 4 deletions

View File

@ -30,6 +30,7 @@ void proto_reg_handoff_pfcp(void);
static dissector_handle_t pfcp_handle;
static dissector_handle_t pfcp_3gpp_ies_handle;
static dissector_handle_t pfcp_travelping_ies_handle;
static dissector_handle_t pfcp_bbf_ies_handle;
#define UDP_PORT_PFCP 8805
static guint g_pfcp_port = UDP_PORT_PFCP;
@ -822,6 +823,50 @@ static int hf_pfcp_number_of_ue_ip_addresses_ipv4 = -1;
static int hf_pfcp_validity_timer = -1;
static int hf_pfcp_bbf_up_function_features_o7_b4_lcp_keepalive_offload = -1;
static int hf_pfcp_bbf_up_function_features_o7_b3_lns = -1;
static int hf_pfcp_bbf_up_function_features_o7_b2_lac = -1;
static int hf_pfcp_bbf_up_function_features_o7_b1_ipoe = -1;
static int hf_pfcp_bbf_up_function_features_o7_b0_pppoe = -1;
static int hf_pfcp_bbf_logical_port_id = -1;
static int hf_pfcp_bbf_logical_port_id_str = -1;
static int hf_pfcp_bbf_outer_hdr_desc = -1;
static int hf_pfcp_bbf_outer_hdr_creation_tunnel_id = -1;
static int hf_pfcp_bbf_outer_hdr_creation_session_id = -1;
static int hf_pfcp_bbf_out_hdr_desc = -1;
static int hf_pfcp_bbf_pppoe_session_id = -1;
static int hf_pfcp_bbf_ppp_protocol_flags = -1;
static int hf_pfcp_bbf_ppp_protocol_b2_control = -1;
static int hf_pfcp_bbf_ppp_protocol_b1_data = -1;
static int hf_pfcp_bbf_ppp_protocol_b0_specific = -1;
static int hf_pfcp_bbf_ppp_protocol = -1;
static int hf_pfcp_bbf_verification_timer_interval = -1;
static int hf_pfcp_bbf_verification_timer_count = -1;
static int hf_pfcp_bbf_ppp_lcp_magic_number_tx = -1;
static int hf_pfcp_bbf_ppp_lcp_magic_number_rx = -1;
static int hf_pfcp_bbf_mtu = -1;
static int hf_pfcp_bbf_l2tp_endp_flags = -1;
static int hf_pfcp_bbf_l2tp_endp_flags_b2_ch = -1;
static int hf_pfcp_bbf_l2tp_endp_flags_b1_v6 = -1;
static int hf_pfcp_bbf_l2tp_endp_flags_b0_v4 = -1;
static int hf_pfcp_bbf_l2tp_endp_id_tunnel_id = -1;
static int hf_pfcp_bbf_l2tp_endp_id_ipv4 = -1;
static int hf_pfcp_bbf_l2tp_endp_id_ipv6 = -1;
static int hf_pfcp_bbf_l2tp_session_id = -1;
static int hf_pfcp_bbf_l2tp_type_flags = -1;
static int hf_pfcp_bbf_l2tp_type_flags_b0_t = -1;
static int hf_pfcp_travelping_build_id = -1;
static int hf_pfcp_travelping_build_id_str = -1;
static int hf_pfcp_travelping_now = -1;
@ -916,6 +961,12 @@ static int ett_pfcp_number_of_ue_ip_addresses_flags = -1;
static int ett_pfcp_enterprise_travelping_error_report = -1;
static int ett_pfcp_bbf_ppp_protocol_flags = -1;
static int ett_pfcp_bbf_l2tp_endp_flags = -1;
static int ett_pfcp_bbf_l2tp_type_flags = -1;
static int ett_pfcp_bbf_ppp_lcp_connectivity = -1;
static int ett_pfcp_bbf_l2tp_tunnel = -1;
static expert_field ei_pfcp_ie_reserved = EI_INIT;
static expert_field ei_pfcp_ie_data_not_decoded = EI_INIT;
static expert_field ei_pfcp_ie_not_decoded_null = EI_INIT;
@ -9131,6 +9182,405 @@ dissect_pfcp_3gpp_enterprise_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
return tvb_reported_length(tvb);
}
/* Enterprise IE decoding Broadband Forum
*
* TR-459: Control and User Plane Separation for a disaggregated BNG
*/
static void dissect_pfcp_enterprise_bbf_ppp_lcp_connectivity(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type, pfcp_session_args_t *args);
static void dissect_pfcp_enterprise_bbf_l2tp_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type, pfcp_session_args_t *args);
#define PFCP_IE_ENTERPRISE_BBF_UP_FUNCTION_FEATURES 0 /* 32768 */
#define PFCP_IE_ENTERPRISE_BBF_LOGICAL_PORT 1 /* 32769 */
#define PFCP_IE_ENTERPRISE_BBF_OUTER_HEADER_CREATION 2 /* 32770 */
#define PFCP_IE_ENTERPRISE_BBF_OUTER_HEADER_REMOVAL 3 /* 32771 */
#define PFCP_IE_ENTERPRISE_BBF_PPPOE_SESSION_ID 4 /* 32772 */
#define PFCP_IE_ENTERPRISE_BBF_PPP_PROTOCOL 5 /* 32773 */
#define PFCP_IE_ENTERPRISE_BBF_VERIFICATION_TIMERS 6 /* 32774 */
#define PFCP_IE_ENTERPRISE_BBF_PPP_LCP_MAGIC_NUMBER 7 /* 32775 */
#define PFCP_IE_ENTERPRISE_BBF_MTU 8 /* 32776 */
#define PFCP_IE_ENTERPRISE_BBF_L2TP_TUNNEL_ENDPOINT 9 /* 32777 */
#define PFCP_IE_ENTERPRISE_BBF_L2TP_SESSION_ID 10 /* 32778 */
#define PFCP_IE_ENTERPRISE_BBF_L2TP_TYPE 11 /* 32779 */
#define PFCP_IE_ENTERPRISE_BBF_PPP_LCP_CONNECTIVITY 12 /* 32780 */
#define PFCP_IE_ENTERPRISE_BBF_L2TP_TUNNEL 13 /* 32781 */
static const value_string pfcp_ie_enterpise_bbf_type[] = {
{ PFCP_IE_ENTERPRISE_BBF_UP_FUNCTION_FEATURES, "BBF UP Function Features"},
{ PFCP_IE_ENTERPRISE_BBF_LOGICAL_PORT, "Logical Port"},
{ PFCP_IE_ENTERPRISE_BBF_OUTER_HEADER_CREATION, "BBF Outer Header Creation"},
{ PFCP_IE_ENTERPRISE_BBF_OUTER_HEADER_REMOVAL, "BBF Outer Header Removal"},
{ PFCP_IE_ENTERPRISE_BBF_PPPOE_SESSION_ID, "PPPoE Session ID"},
{ PFCP_IE_ENTERPRISE_BBF_PPP_PROTOCOL, "PPP protocol"},
{ PFCP_IE_ENTERPRISE_BBF_VERIFICATION_TIMERS, "Verification Timers"},
{ PFCP_IE_ENTERPRISE_BBF_PPP_LCP_MAGIC_NUMBER, "PPP LCP Magic Number"},
{ PFCP_IE_ENTERPRISE_BBF_MTU, "MTU"},
{ PFCP_IE_ENTERPRISE_BBF_L2TP_TUNNEL_ENDPOINT, "L2TP Tunnel Endpoint"},
{ PFCP_IE_ENTERPRISE_BBF_L2TP_SESSION_ID, "L2TP Session ID"},
{ PFCP_IE_ENTERPRISE_BBF_L2TP_TYPE, "L2TP Type"},
{ PFCP_IE_ENTERPRISE_BBF_PPP_LCP_CONNECTIVITY, "PPP LCP Connectivity"},
{ PFCP_IE_ENTERPRISE_BBF_L2TP_TUNNEL, "L2TP Tunnel"},
{ 0, NULL }
};
static value_string_ext pfcp_ie_enterpise_bbf_type_ext = VALUE_STRING_EXT_INIT(pfcp_ie_enterpise_bbf_type);
/*
* TR-459: 6.6.1 BBF UP Function Features
*/
static void
dissect_pfcp_enterprise_bbf_up_function_features(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
static int * const pfcp_bbf_up_function_features_o7_flags[] = {
&hf_pfcp_spare_b7_b5,
&hf_pfcp_bbf_up_function_features_o7_b4_lcp_keepalive_offload,
&hf_pfcp_bbf_up_function_features_o7_b3_lns,
&hf_pfcp_bbf_up_function_features_o7_b2_lac,
&hf_pfcp_bbf_up_function_features_o7_b1_ipoe,
&hf_pfcp_bbf_up_function_features_o7_b0_pppoe,
NULL
};
proto_tree_add_bitmask_list(tree, tvb, offset, 1, pfcp_bbf_up_function_features_o7_flags, ENC_BIG_ENDIAN);
offset += 1;
// Octet 8 Spare Octet
proto_tree_add_item(tree, hf_pfcp_spare_oct, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
// Octet 9 Spare Octet
proto_tree_add_item(tree, hf_pfcp_spare_oct, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
// Octet 10 Spare Octet
proto_tree_add_item(tree, hf_pfcp_spare_oct, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.2 Logical Port
*/
static void
dissect_pfcp_enterprise_bbf_logical_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
/* Octet 7 to (n+4) logical-port-id */
if (tvb_ascii_isprint(tvb, 0, length))
{
const guint8* string_value;
proto_tree_add_item_ret_string(tree, hf_pfcp_bbf_logical_port_id_str, tvb, 0, length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &string_value);
proto_item_append_text(item, "%s", string_value);
}
else
{
proto_tree_add_item(tree, hf_pfcp_bbf_logical_port_id, tvb, 0, length, ENC_NA);
}
}
/*
* TR-459: 6.6.3 BBF Outer Header Creation
*/
static const value_string pfcp_bbf_outer_hdr_desc_vals[] = {
{ 0x000100, "CPR-NSH " },
{ 0x000200, "Traffic-Endpoint " },
{ 0x000300, "L2TP " },
{ 0x000400, "PPP " },
{ 0, NULL }
};
static void
dissect_pfcp_enterprise_bbf_outer_header_creation(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint32 value;
/* Octet 7 Outer Header Creation Description */
proto_tree_add_item_ret_uint(tree, hf_pfcp_bbf_outer_hdr_desc, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
offset += 2;
/* Octet 9 to 10 Tunnel ID */
proto_tree_add_item(tree, hf_pfcp_bbf_outer_hdr_creation_tunnel_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
/* Octet 10 to 11 Session ID */
proto_tree_add_item(tree, hf_pfcp_bbf_outer_hdr_creation_session_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.4 BBF Outer Header Removal
*/
static const value_string pfcp_bbf_out_hdr_desc_vals[] = {
{ 1, "Ethernet " },
{ 2, "PPPoE/Ethernet " },
{ 3, "PPP/PPPoE/Ethernet " },
{ 4, "L2TP " },
{ 5, "PPP/L2TP " },
{ 0, NULL }
};
static void
dissect_pfcp_enterprise_bbf_outer_header_removal(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint32 value;
proto_tree_add_item_ret_uint(tree, hf_pfcp_bbf_out_hdr_desc, tvb, offset, 1, ENC_BIG_ENDIAN, &value);
offset++;
proto_item_append_text(item, "%s", val_to_str_const(value, pfcp_bbf_out_hdr_desc_vals, "Unknown"));
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.5 PPPoE Session ID
*/
static void
dissect_pfcp_enterprise_bbf_pppoe_session_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint32 value;
proto_tree_add_item_ret_uint(tree, hf_pfcp_bbf_pppoe_session_id, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
offset += 2;
proto_item_append_text(item, "%u", value);
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.6 PPP Protocol
*/
static void
dissect_pfcp_enterprise_bbf_ppp_protocol(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint64 bbf_ppp_flags_val;
static int * const pfcp_bbf_ppp_protocol_flags[] = {
&hf_pfcp_spare_b7_b3,
&hf_pfcp_bbf_ppp_protocol_b2_control,
&hf_pfcp_bbf_ppp_protocol_b1_data,
&hf_pfcp_bbf_ppp_protocol_b0_specific,
NULL
};
/* Octet 5 control data specific D */
proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_bbf_ppp_protocol_flags,
ett_pfcp_bbf_ppp_protocol_flags, pfcp_bbf_ppp_protocol_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &bbf_ppp_flags_val);
offset += 1;
if ((bbf_ppp_flags_val & 0x01) == 1)
{
/* Octet 8 and 9 protocol */
proto_tree_add_item(tree, hf_pfcp_bbf_ppp_protocol, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
}
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.7 Verification Timers
*/
static void
dissect_pfcp_enterprise_bbf_verification_timers(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
proto_tree_add_item(tree, hf_pfcp_bbf_verification_timer_interval, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(tree, hf_pfcp_bbf_verification_timer_count, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.8 LCP Magic Number
*/
static void
dissect_pfcp_enterprise_bbf_ppp_lcp_magic_number(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
proto_tree_add_item(tree, hf_pfcp_bbf_ppp_lcp_magic_number_tx, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(tree, hf_pfcp_bbf_ppp_lcp_magic_number_rx, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.9 MTU
*/
static void
dissect_pfcp_enterprise_bbf_mtu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint32 value;
proto_tree_add_item_ret_uint(tree, hf_pfcp_bbf_mtu, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
offset += 2;
proto_item_append_text(item, "%u", value);
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.10 L2TP Tunnel Endpoint
*/
static void
dissect_pfcp_enterprise_bbf_l2tp_tunnel_endpoint(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint64 bbf_l2tp_endp_flags_val;
static int * const pfcp_bbf_l2tp_endp_flags[] = {
&hf_pfcp_spare_b7_b3,
&hf_pfcp_bbf_l2tp_endp_flags_b2_ch,
&hf_pfcp_bbf_l2tp_endp_flags_b1_v6,
&hf_pfcp_bbf_l2tp_endp_flags_b0_v4,
NULL
};
/* Octet 5 CH v4 v6 */
proto_tree_add_bitmask_with_flags_ret_uint64(tree, tvb, offset, hf_pfcp_bbf_l2tp_endp_flags,
ett_pfcp_bbf_l2tp_endp_flags, pfcp_bbf_l2tp_endp_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS, &bbf_l2tp_endp_flags_val);
offset += 1;
proto_tree_add_item(tree, hf_pfcp_bbf_l2tp_endp_id_tunnel_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(tree, hf_pfcp_bbf_l2tp_endp_id_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(tree, hf_pfcp_bbf_l2tp_endp_id_ipv6, tvb, offset, 16, ENC_NA);
offset += 16;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.11 L2TP Session ID
*/
static void
dissect_pfcp_enterprise_bbf_l2tp_session_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
guint32 value;
proto_tree_add_item_ret_uint(tree, hf_pfcp_bbf_l2tp_session_id, tvb, offset, 2, ENC_BIG_ENDIAN, &value);
offset += 2;
proto_item_append_text(item, "%u", value);
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
/*
* TR-459: 6.6.12 L2TP Type
*/
static const true_false_string pfcp_bbf_l2tp_type_b0_t_tfs = {
"control",
"data"
};
static void
dissect_pfcp_enterprise_bbf_l2tp_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, pfcp_session_args_t *args _U_)
{
int offset = 0;
static int * const pfcp_bbf_l2tp_type_flags[] = {
&hf_pfcp_spare_b7_b1,
&hf_pfcp_bbf_l2tp_type_flags_b0_t,
NULL
};
/* Octet 7 T */
proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_pfcp_bbf_l2tp_type_flags,
ett_pfcp_bbf_l2tp_type_flags, pfcp_bbf_l2tp_type_flags, ENC_BIG_ENDIAN, BMT_NO_FALSE | BMT_NO_INT | BMT_NO_TFS);
offset += 1;
if (offset < length) {
proto_tree_add_expert(tree, pinfo, &ei_pfcp_ie_data_not_decoded, tvb, offset, -1);
}
}
static const pfcp_ie_t pfcp_enterprise_bbf_ies[] = {
/* 32768 */ { dissect_pfcp_enterprise_bbf_up_function_features },
/* 32769 */ { dissect_pfcp_enterprise_bbf_logical_port },
/* 32770 */ { dissect_pfcp_enterprise_bbf_outer_header_creation },
/* 32771 */ { dissect_pfcp_enterprise_bbf_outer_header_removal },
/* 32772 */ { dissect_pfcp_enterprise_bbf_pppoe_session_id },
/* 32773 */ { dissect_pfcp_enterprise_bbf_ppp_protocol },
/* 32774 */ { dissect_pfcp_enterprise_bbf_verification_timers },
/* 32775 */ { dissect_pfcp_enterprise_bbf_ppp_lcp_magic_number },
/* 32776 */ { dissect_pfcp_enterprise_bbf_mtu },
/* 32777 */ { dissect_pfcp_enterprise_bbf_l2tp_tunnel_endpoint },
/* 32778 */ { dissect_pfcp_enterprise_bbf_l2tp_session_id },
/* 32779 */ { dissect_pfcp_enterprise_bbf_l2tp_type },
/* 32780 */ { dissect_pfcp_enterprise_bbf_ppp_lcp_connectivity },
/* 32781 */ { dissect_pfcp_enterprise_bbf_l2tp_tunnel },
{ NULL }, /* End of List */
};
#define NUM_PFCP_ENTERPRISE_BBF_IES (sizeof(pfcp_enterprise_bbf_ies)/sizeof(pfcp_ie_t))
/* Set up the array to hold "etts" for each IE*/
gint ett_pfcp_enterprise_bbf_elem[NUM_PFCP_ENTERPRISE_BBF_IES-1];
static void
dissect_pfcp_enterprise_bbf_ppp_lcp_connectivity(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type, pfcp_session_args_t *args)
{
dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_enterprise_bbf_elem[PFCP_IE_ENTERPRISE_BBF_PPP_LCP_CONNECTIVITY], args);
}
static void
dissect_pfcp_enterprise_bbf_l2tp_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type, pfcp_session_args_t *args)
{
dissect_pfcp_grouped_ie(tvb, pinfo, tree, item, length, message_type, ett_pfcp_enterprise_bbf_elem[PFCP_IE_ENTERPRISE_BBF_L2TP_TUNNEL], args);
}
static int
dissect_pfcp_enterprise_bbf_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
pfcp_sub_dis_t *pfcp_sub_dis_info = (pfcp_sub_dis_t *)data;
dissect_pfcp_enterprise_ies_common(tvb, pinfo, tree, pfcp_sub_dis_info->item, pfcp_sub_dis_info->message_type, pfcp_sub_dis_info->args,
NUM_PFCP_ENTERPRISE_BBF_IES, ett_pfcp_enterprise_bbf_elem,
pfcp_enterprise_bbf_ies, &pfcp_ie_enterpise_bbf_type_ext);
return tvb_reported_length(tvb);
}
/* Enterprise IE decoding Travelping */
static void dissect_pfcp_enterprise_travelping_error_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length, guint8 message_type, pfcp_session_args_t *args);
@ -12723,6 +13173,178 @@ proto_register_pfcp(void)
NULL, HFILL }
},
{ &hf_pfcp_bbf_up_function_features_o7_b0_pppoe,
{ "PPPoE", "pfcp.bbf.up_function_features.pppoe",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
"PPPoE supported in DBNG-UP function", HFILL }
},
{ &hf_pfcp_bbf_up_function_features_o7_b1_ipoe,
{ "IPoE", "pfcp.bbf.up_function_features.ipoe",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
"IPoE supported in DBNG-UP function", HFILL }
},
{ &hf_pfcp_bbf_up_function_features_o7_b2_lac,
{ "LAC", "pfcp.bbf.up_function_features.lac",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
"LAC function supported in DBNG-UP function", HFILL }
},
{ &hf_pfcp_bbf_up_function_features_o7_b3_lns,
{ "LNS", "pfcp.bbf.up_function_features.lns",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
"LNS function supported in DBNG-UP function", HFILL }
},
{ &hf_pfcp_bbf_up_function_features_o7_b4_lcp_keepalive_offload,
{ "LCP keepalive offload", "pfcp.bbf.up_function_features.lcp_keepalive_offload",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
"PPP LCP echo supported in DBNG-UP function", HFILL }
},
{ &hf_pfcp_bbf_logical_port_id,
{ "Logical Port", "pfcp.bbf.logical_port_id",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_logical_port_id_str,
{ "Logical Port", "pfcp.bbf.logical_port_id_str",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_outer_hdr_desc,
{ "BBF Outer Header Creation Description", "pfcp.bbf.outer_hdr_desc",
FT_UINT16, BASE_DEC, VALS(pfcp_bbf_outer_hdr_desc_vals), 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_outer_hdr_creation_tunnel_id,
{ "L2TP Tunnel ID", "pfcp.bbf.outer_hdr_creation.tunnel_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_outer_hdr_creation_session_id,
{ "L2TP Session ID", "pfcp.bbf.outer_hdr_creation.session_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_out_hdr_desc,
{ "BBF Outer Header Removal Description", "pfcp.bbf.out_hdr_desc",
FT_UINT8, BASE_DEC, VALS(pfcp_bbf_out_hdr_desc_vals), 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_pppoe_session_id,
{ "PPPoE Session ID", "pfcp.bbf.pppoe_session_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_protocol_flags,
{ "Flags", "pfcp.bbf.protocol_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_protocol_b2_control,
{ "control", "pfcp.bbf.protocol_flags.control",
FT_BOOLEAN, 8, NULL, 0x04,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_protocol_b1_data,
{ "data", "pfcp.bbf.protocol_flags.data",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_protocol_b0_specific,
{ "specific", "pfcp.bbf.protocol_flags.specific",
FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x01,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_protocol,
{ "protocol", "pfcp.bbf.protocol_flags.protocol",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_verification_timer_interval,
{ "Interval", "pfcp.bbf.verification_timer.interval",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_verification_timer_count,
{ "Count", "pfcp.bbf.verification_timer.count",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_lcp_magic_number_tx,
{ "PPP LCP Magic Number Tx", "pfcp.bbf.lcp_magic_number.tx",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_ppp_lcp_magic_number_rx,
{ "PPP LCP Magic Number Rx", "pfcp.bbf.lcp_magic_number.rx",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_mtu,
{ "MTU", "pfcp.bbf.mtu",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_flags,
{ "Flags", "pfcp.bbf.l2tp_endp_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_flags_b2_ch,
{ "CH (CHOOSE)", "pfcp.bbf.l2tp_endp_flags.ch",
FT_BOOLEAN, 8, NULL, 0x04,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_flags_b1_v6,
{ "V6 (IPv6)", "pfcp.bbf.l2tp_endp_flags.v6",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_flags_b0_v4,
{ "V4 (IPv4)", "pfcp.bbf.l2tp_endp_flags.v4",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_id_tunnel_id,
{ "Tunnel ID", "pfcp.bbf.l2tp_endp.tunnel_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_id_ipv4,
{ "IPv4 address", "pfcp.bbf.l2tp_endp.ipv4_addr",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_endp_id_ipv6,
{ "IPv6 address", "pfcp.bbf.l2tp_endp.ipv6_addr",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_session_id,
{ "L2TP Session ID", "pfcp.bbf.bbf_l2tp_session_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_type_flags,
{ "Flags", "pfcp.bbf.l2tp_type_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pfcp_bbf_l2tp_type_flags_b0_t,
{ "T (TYPE)", "pfcp.bbf.l2tp_type_flags.t",
FT_BOOLEAN, 8, TFS(&pfcp_bbf_l2tp_type_b0_t_tfs), 0x01,
NULL, HFILL }
},
{ &hf_pfcp_travelping_build_id,
{ "Build Identifier", "pfcp.travelping.build_id",
FT_BYTES, BASE_NONE, NULL, 0x0,
@ -12766,9 +13388,10 @@ proto_register_pfcp(void)
};
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS_PFCP 83
#define NUM_INDIVIDUAL_ELEMS_PFCP 88
gint *ett[NUM_INDIVIDUAL_ELEMS_PFCP +
(NUM_PFCP_IES - 1) +
(NUM_PFCP_ENTERPRISE_BBF_IES - 1) +
(NUM_PFCP_ENTERPRISE_TRAVELPING_IES - 1)];
ett[0] = &ett_pfcp;
@ -12854,7 +13477,11 @@ proto_register_pfcp(void)
ett[80] = &ett_pfcp_rds_configuration_information_flags;
ett[81] = &ett_pfcp_number_of_ue_ip_addresses_flags;
ett[82] = &ett_pfcp_enterprise_travelping_error_report;
ett[83] = &ett_pfcp_bbf_ppp_protocol_flags;
ett[84] = &ett_pfcp_bbf_l2tp_endp_flags;
ett[85] = &ett_pfcp_bbf_l2tp_type_flags;
ett[86] = &ett_pfcp_bbf_ppp_lcp_connectivity;
ett[87] = &ett_pfcp_bbf_l2tp_tunnel;
static ei_register_info ei[] = {
{ &ei_pfcp_ie_reserved,{ "pfcp.ie_id_reserved", PI_PROTOCOL, PI_ERROR, "Reserved IE value used", EXPFILL } },
@ -12880,6 +13507,11 @@ proto_register_pfcp(void)
ett_pfcp_enterprise_travelping_elem[i] = -1;
ett[last_index] = &ett_pfcp_enterprise_travelping_elem[i];
}
for (i = 0; i < (NUM_PFCP_ENTERPRISE_BBF_IES-1); i++, last_index++)
{
ett_pfcp_enterprise_bbf_elem[i] = -1;
ett[last_index] = &ett_pfcp_enterprise_bbf_elem[i];
}
proto_pfcp = proto_register_protocol("Packet Forwarding Control Protocol", "PFCP", "pfcp");
pfcp_handle = register_dissector("pfcp", dissect_pfcp, proto_pfcp);
@ -12896,6 +13528,7 @@ proto_register_pfcp(void)
pfcp_3gpp_ies_handle = register_dissector("pfcp_3gpp_ies", dissect_pfcp_3gpp_enterprise_ies, proto_pfcp);
pfcp_travelping_ies_handle = register_dissector("pfcp_travelping_ies", dissect_pfcp_enterprise_travelping_ies, proto_pfcp);
pfcp_bbf_ies_handle = register_dissector("pfcp_bbf_ies", dissect_pfcp_enterprise_bbf_ies, proto_pfcp);
prefs_register_uint_preference(module_pfcp, "port_pfcp", "PFCP port", "PFCP port (default 8805)", 10, &g_pfcp_port);
prefs_register_bool_preference(module_pfcp, "track_pfcp_session", "Track PFCP session", "Track PFCP session", &g_pfcp_session);
@ -12910,10 +13543,10 @@ proto_reg_handoff_pfcp(void)
dissector_add_uint("udp.port", g_pfcp_port, pfcp_handle);
/* Register 3GPP in the table to give expert info and serve as an example how to add decoding of enterprise IEs*/
dissector_add_uint("pfcp.enterprise_ies", VENDOR_THE3GPP, pfcp_3gpp_ies_handle);
/* Register Broadband Forum IEs */
dissector_add_uint("pfcp.enterprise_ies", VENDOR_BROADBAND_FORUM, pfcp_bbf_ies_handle);
/* Register Travelping IEs */
dissector_add_uint("pfcp.enterprise_ies", VENDOR_TRAVELPING, pfcp_travelping_ies_handle);
}
/*