From 04b82a7dc971597be958ba902bcf51dc32189305 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 12 Jun 2016 12:28:02 -0400 Subject: Convert AT_SS7PC to a "dissector address type" The formatting of the address type is determined by a preference in packet-mtp3.c, so just make MTP3 register the address type. Use address_type_get_by_name in other dissectors (and export_pdu) to use the address type. Change-Id: Ifb32d7de27aeaa23cee8e803e25ffb3c905547b5 Reviewed-on: https://code.wireshark.org/review/15856 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/address_types.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'epan/address_types.c') diff --git a/epan/address_types.c b/epan/address_types.c index 445083ec47..b1f94d8c47 100644 --- a/epan/address_types.c +++ b/epan/address_types.c @@ -427,22 +427,6 @@ static int fcwwn_name_res_len(void) return MAX_ADDR_STR_LEN; /* XXX - This can be lower */ } -/****************************************************************************** - * AT_SS7PC - * XXX - This should really be a dissector address type as its address string - * is partially determined by a dissector preference. - ******************************************************************************/ -static int ss7pc_to_str(const address* addr, gchar *buf, int buf_len) -{ - mtp3_addr_to_str_buf((const mtp3_addr_pc_t *)addr->data, buf, buf_len); - return (int)(strlen(buf)+1); -} - -static int ss7pc_str_len(const address* addr _U_) -{ - return 50; -} - /****************************************************************************** * AT_STRINGZ ******************************************************************************/ @@ -672,18 +656,6 @@ void address_types_initialize(void) fcwwn_name_res_len, /* addr_name_res_len */ }; - static address_type_t ss7pc_address = { - AT_SS7PC, /* addr_type */ - "AT_SS7PC", /* name */ - "SS7 Point Code", /* pretty_name */ - ss7pc_to_str, /* addr_to_str */ - ss7pc_str_len, /* addr_str_len */ - NULL, /* addr_col_filter */ - NULL, /* addr_fixed_len */ - NULL, /* addr_name_res_str */ - NULL, /* addr_name_res_len */ - }; - static address_type_t stringz_address = { AT_STRINGZ, /* addr_type */ "AT_STRINGZ", /* name */ @@ -758,7 +730,6 @@ void address_types_initialize(void) address_type_register(AT_VINES, &vines_address ); address_type_register(AT_FC, &fc_address ); address_type_register(AT_FCWWN, &fcwwn_address ); - address_type_register(AT_SS7PC, &ss7pc_address ); address_type_register(AT_STRINGZ, &stringz_address ); address_type_register(AT_EUI64, &eui64_address ); address_type_register(AT_IB, &ib_address ); -- cgit v1.2.1