Add address_to_bytes API.
authorMichael Mann <mmann78@netscape.net>
Wed, 22 Jun 2016 02:23:05 +0000 (22:23 -0400)
committerAnders Broman <a.broman58@gmail.com>
Wed, 22 Jun 2016 07:47:39 +0000 (07:47 +0000)
This will copy an address's "byte format" into a buffer.  The original
intended design is for export_pdu functionality, which tries to do
this "manually" for many address types (and creates undesired dependencies)

The default functionality if a "byte format function" isn't provided
(currently the case for all address types) is a memcpy of the address
data.  Providing "address to byte" functions to aid export PDU
functionality will be provided later.

Change-Id: I3703f9e617a8cef09165ad53a0f98c6372676b9b
Reviewed-on: https://code.wireshark.org/review/16070
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
20 files changed:
debian/libwireshark0.symbols
epan/address.h
epan/address_types.c
epan/address_types.h
epan/dissectors/packet-arcnet.c
epan/dissectors/packet-atalk.c
epan/dissectors/packet-devicenet.c
epan/dissectors/packet-ieee80211.c
epan/dissectors/packet-ieee802154.c
epan/dissectors/packet-j1939.c
epan/dissectors/packet-jxta.c
epan/dissectors/packet-mp2t.c
epan/dissectors/packet-mstp.c
epan/dissectors/packet-mtp3.c
epan/dissectors/packet-sna.c
epan/dissectors/packet-tipc.c
epan/dissectors/packet-usb.c
epan/dissectors/packet-vines.c
epan/osi-utils.c
plugins/irda/packet-irda.c

index 43a61384e243330d35315ff71cf0f5e79f1fd418..82ca0647b11b55aaac11d3609d7a550f0bfcf4f6 100644 (file)
@@ -43,6 +43,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
  add_itu_tcap_subdissector@Base 1.9.1
  add_new_data_source@Base 1.9.1
  add_srt_table_data@Base 1.99.8
+ address_to_bytes@Base 2.1.1
  address_to_display@Base 1.99.2
  address_to_name@Base 2.1.0
  address_to_str@Base 1.12.0~rc1
index f09988f8a7680a7eaa1e52116d50f920dec13578..b06c03815a29e6f8eb3d1dd2ab23abc6f9ba7d85 100644 (file)
@@ -352,6 +352,8 @@ add_address_to_hash64(guint64 hash_val, const address *addr) {
     return hash_val;
 }
 
+WS_DLL_PUBLIC guint address_to_bytes(const address *addr, guint8 *buf, guint buf_len);
+
 /* Types of port numbers Wireshark knows about. */
 typedef enum {
     PT_NONE,            /* no port number */
index ac23059a834118b1a153a590aa8360ca7ccb0b24..604752c7c7051b88a286e20c94fb87e48b871d00 100644 (file)
@@ -37,6 +37,7 @@ struct _address_type_t {
     const char             *pretty_name;
     AddrValueToString       addr_to_str;
     AddrValueToStringLen    addr_str_len;
+    AddrValueToByte         addr_to_byte;
     AddrColFilterString     addr_col_filter;
     AddrFixedLen            addr_fixed_len;
     AddrNameResolutionToString addr_name_res_str;
@@ -84,7 +85,7 @@ static void address_type_register(int addr_type, address_type_t *at)
 
 int address_type_dissector_register(const char* name, const char* pretty_name,
                                     AddrValueToString to_str_func, AddrValueToStringLen str_len_func,
-                                    AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
+                                    AddrValueToByte to_bytes_func, AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
                                     AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func)
 {
     int addr_type;
@@ -107,6 +108,7 @@ int address_type_dissector_register(const char* name, const char* pretty_name,
     dissector_type_addresses[num_dissector_addr_type].pretty_name = pretty_name;
     dissector_type_addresses[num_dissector_addr_type].addr_to_str = to_str_func;
     dissector_type_addresses[num_dissector_addr_type].addr_str_len = str_len_func;
+    dissector_type_addresses[num_dissector_addr_type].addr_to_byte = to_bytes_func;
     dissector_type_addresses[num_dissector_addr_type].addr_col_filter = col_filter_str_func;
     dissector_type_addresses[num_dissector_addr_type].addr_fixed_len = fixed_len_func;
     dissector_type_addresses[num_dissector_addr_type].addr_name_res_str = name_res_str_func;
@@ -134,7 +136,6 @@ int address_type_get_by_name(const char* name)
     return -1;
 }
 
-
 /******************************************************************************
  * AT_NONE
  ******************************************************************************/
@@ -512,6 +513,7 @@ void address_types_initialize(void)
         "No address",       /* pretty_name */
         none_addr_to_str,   /* addr_to_str */
         none_addr_str_len,  /* addr_str_len */
+        NULL,               /* addr_to_byte */
         NULL,               /* addr_col_filter */
         none_addr_len,      /* addr_fixed_len */
         none_name_res_str, /* addr_name_res_str */
@@ -524,6 +526,7 @@ void address_types_initialize(void)
         "Ethernet address", /* pretty_name */
         ether_to_str,       /* addr_to_str */
         ether_str_len,      /* addr_str_len */
+        NULL,               /* addr_to_byte */
         ether_col_filter_str, /* addr_col_filter */
         ether_len,          /* addr_fixed_len */
         ether_name_resolution_str, /* addr_name_res_str */
@@ -536,6 +539,7 @@ void address_types_initialize(void)
         "IPv4 address",     /* pretty_name */
         ipv4_to_str,        /* addr_to_str */
         ipv4_str_len,       /* addr_str_len */
+        NULL,               /* addr_to_byte */
         ipv4_col_filter_str, /* addr_col_filter */
         ipv4_len,           /* addr_fixed_len */
         ipv4_name_res_str, /* addr_name_res_str */
@@ -548,6 +552,7 @@ void address_types_initialize(void)
         "IPv6 address",     /* pretty_name */
         ipv6_to_str,        /* addr_to_str */
         ipv6_str_len,       /* addr_str_len */
+        NULL,               /* addr_to_byte */
         ipv6_col_filter_str, /* addr_col_filter */
         ipv6_len,            /* addr_fixed_len */
         ipv6_name_res_str, /* addr_name_res_str */
@@ -560,6 +565,7 @@ void address_types_initialize(void)
         "IPX address",      /* pretty_name */
         ipx_to_str,         /* addr_to_str */
         ipx_str_len,        /* addr_str_len */
+        NULL,               /* addr_to_byte */
         NULL,               /* addr_col_filter */
         ipx_len,            /* addr_fixed_len */
         NULL,               /* addr_name_res_str */
@@ -572,6 +578,7 @@ void address_types_initialize(void)
         "FC address",   /* pretty_name */
         fc_to_str,      /* addr_to_str */
         fc_str_len,     /* addr_str_len */
+        NULL,           /* addr_to_byte */
         NULL,           /* addr_col_filter */
         fc_len,         /* addr_fixed_len */
         NULL,           /* addr_name_res_str */
@@ -584,6 +591,7 @@ void address_types_initialize(void)
         "Fibre Channel WWN",    /* pretty_name */
         fcwwn_to_str,   /* addr_to_str */
         fcwwn_str_len,  /* addr_str_len */
+        NULL,           /* addr_to_byte */
         NULL,           /* addr_col_filter */
         fcwwn_len,         /* addr_fixed_len */
         fcwwn_name_res_str, /* addr_name_res_str */
@@ -596,6 +604,7 @@ void address_types_initialize(void)
         "String address",   /* pretty_name */
         stringz_addr_to_str, /* addr_to_str */
         stringz_addr_str_len, /* addr_str_len */
+        NULL,              /* addr_to_byte */
         NULL,              /* addr_col_filter */
         NULL,              /* addr_fixed_len */
         NULL,              /* addr_name_res_str */
@@ -608,6 +617,7 @@ void address_types_initialize(void)
         "IEEE EUI-64",     /* pretty_name */
         eui64_addr_to_str, /* addr_to_str */
         eui64_str_len,     /* addr_str_len */
+        NULL,              /* addr_to_byte */
         NULL,              /* addr_col_filter */
         eui64_len,         /* addr_fixed_len */
         NULL,              /* addr_name_res_str */
@@ -620,6 +630,7 @@ void address_types_initialize(void)
         "Infiniband GID/LID",   /* pretty_name */
         ib_addr_to_str,  /* addr_to_str */
         ib_str_len,      /* addr_str_len */
+        NULL,              /* addr_to_byte */
         NULL,              /* addr_col_filter */
         NULL,              /* addr_fixed_len */
         NULL,              /* addr_name_res_str */
@@ -632,6 +643,7 @@ void address_types_initialize(void)
         "AX.25 Address",  /* pretty_name */
         ax25_addr_to_str, /* addr_to_str */
         ax25_addr_str_len,/* addr_str_len */
+        NULL,             /* addr_to_byte */
         ax25_col_filter_str, /* addr_col_filter */
         ax25_len,          /* addr_fixed_len */
         NULL,              /* addr_name_res_str */
@@ -707,6 +719,34 @@ void address_to_str_buf(const address* addr, gchar *buf, int buf_len)
     at->addr_to_str(addr, buf, buf_len);
 }
 
+
+guint address_to_bytes(const address *addr, guint8 *buf, guint buf_len)
+{
+    address_type_t *at;
+    guint copy_len = 0;
+
+    if (!buf || !buf_len)
+        return 0;
+
+    ADDR_TYPE_LOOKUP(addr->type, at);
+
+    if (at == NULL)
+        return 0;
+
+    if (at->addr_to_byte == NULL)
+    {
+        /* If a specific function isn't provided, just do a memcpy */
+        copy_len = MIN(((guint)addr->len), buf_len);
+        memcpy(buf, addr->data, copy_len);
+    }
+    else
+    {
+        copy_len = at->addr_to_byte(addr, buf, buf_len);
+    }
+
+    return copy_len;
+}
+
 const gchar *
 address_to_name(const address *addr)
 {
index 2fdb7f8f536d30ccc9818523deddf574426dd45e..c9a00ea2d68673e5ce88e1150e8cac9724f0526c 100644 (file)
@@ -31,6 +31,7 @@ extern "C" {
 
 typedef int (*AddrValueToString)(const address* addr, gchar *buf, int buf_len);
 typedef int (*AddrValueToStringLen)(const address* addr);
+typedef guint (*AddrValueToByte)(const address* addr, guint8 *buf, guint buf_len);
 typedef int (*AddrFixedLen)(void);
 typedef const char* (*AddrColFilterString)(const address* addr, gboolean src);
 typedef int (*AddrNameResolutionLen)(void);
@@ -41,7 +42,7 @@ typedef struct _address_type_t address_type_t;
 
 WS_DLL_PUBLIC int address_type_dissector_register(const char* name, const char* pretty_name,
                                     AddrValueToString to_str_func, AddrValueToStringLen str_len_func,
-                                    AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
+                                    AddrValueToByte to_bytes_func, AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
                                     AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func);
 
 WS_DLL_PUBLIC int address_type_get_by_name(const char* name);
index 37f57de5acd9415214cfde67972054bdfd812b73..3ade0285f000cd62e17b09799d2f61fa3f2c35e8 100644 (file)
@@ -394,7 +394,7 @@ proto_register_arcnet (void)
   arcnet_dissector_table = register_dissector_table ("arcnet.protocol_id", "ARCNET Protocol ID",
                                                      proto_arcnet, FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
 
-  arcnet_address_type = address_type_dissector_register("AT_ARCNET", "ARCNET Address", arcnet_to_str, arcnet_str_len, arcnet_col_filter_str, arcnet_len, NULL, NULL);
+  arcnet_address_type = address_type_dissector_register("AT_ARCNET", "ARCNET Address", arcnet_to_str, arcnet_str_len, NULL, arcnet_col_filter_str, arcnet_len, NULL, NULL);
 }
 
 
index e6db3c2ad3fab57ed574f26f1897b8eaa1432ae1..3a5ca57dfb356d20a9478cd6c7b3101c25bf7827 100644 (file)
@@ -2075,7 +2075,7 @@ proto_register_atalk(void)
   ddp_dissector_table = register_dissector_table("ddp.type", "DDP packet type", proto_ddp,
                                                  FT_UINT8, BASE_HEX, DISSECTOR_TABLE_ALLOW_DUPLICATE);
 
-  atalk_address_type = address_type_dissector_register("AT_ATALK", "Appletalk DDP", atalk_to_str, atalk_str_len, atalk_col_filter_str, atalk_len, NULL, NULL);
+  atalk_address_type = address_type_dissector_register("AT_ATALK", "Appletalk DDP", atalk_to_str, atalk_str_len, NULL, atalk_col_filter_str, atalk_len, NULL, NULL);
 }
 
 void
index 8e6dd66b410ad17fa05851e4efb9311cdc2f8837..fac1b3fcf80969a175e5e9852543cd962796ee38 100644 (file)
@@ -1034,7 +1034,7 @@ void proto_register_devicenet(void)
     expert_devicenet = expert_register_protocol(proto_devicenet);
     expert_register_field_array(expert_devicenet, ei, array_length(ei));
 
-    devicenet_address_type = address_type_dissector_register("AT_DEVICENET", "DeviceNet Address", devicenet_addr_to_str, devicenet_addr_str_len, NULL, devicenet_addr_len, NULL, NULL);
+    devicenet_address_type = address_type_dissector_register("AT_DEVICENET", "DeviceNet Address", devicenet_addr_to_str, devicenet_addr_str_len, NULL, NULL, devicenet_addr_len, NULL, NULL);
 
     devicenet_module = prefs_register_protocol(proto_devicenet, NULL);
 
index c0b1f5d6d3446e92431375aa533b77d694302c8b..a654149d448c746d86288192ec5d9d4795da3650 100644 (file)
@@ -27407,9 +27407,9 @@ proto_register_ieee80211 (void)
   wlan_tap = register_tap("wlan");
   register_conversation_table(proto_wlan, TRUE, wlan_conversation_packet, wlan_hostlist_packet);
 
-  wlan_address_type = address_type_dissector_register("AT_ETHER_WLAN", "WLAN Address", ether_to_str, ether_str_len, wlan_col_filter_str,
+  wlan_address_type = address_type_dissector_register("AT_ETHER_WLAN", "WLAN Address", ether_to_str, ether_str_len, NULL, wlan_col_filter_str,
                                                             ether_len, ether_name_resolution_str, ether_name_resolution_len);
-  wlan_bssid_address_type = address_type_dissector_register("AT_ETHER_BSSID", "WLAN BSSID Address", ether_to_str, ether_str_len, wlan_bssid_col_filter_str,
+  wlan_bssid_address_type = address_type_dissector_register("AT_ETHER_BSSID", "WLAN BSSID Address", ether_to_str, ether_str_len, NULL, wlan_bssid_col_filter_str,
                                                             ether_len, ether_name_resolution_str, ether_name_resolution_len);
   set_address(&bssid_broadcast, wlan_bssid_address_type, 6, bssid_broadcast_data);
 
index cfe8b5be195084afb1437d3c6b7803e09a8d9aee..b7606a0a98da91dc134d2cff4e14f425aca24e98 100644 (file)
@@ -3551,7 +3551,7 @@ void proto_register_ieee802154(void)
     expert_register_field_array(expert_ieee802154, ei, array_length(ei));
 
     ieee802_15_4_short_address_type = address_type_dissector_register("AT_IEEE_802_15_4_SHORT", "IEEE 802.15.4 16-bit short address",
-                                        ieee802_15_4_short_address_to_str, ieee802_15_4_short_address_str_len, NULL, ieee802_15_4_short_address_len, NULL, NULL);
+                                        ieee802_15_4_short_address_to_str, ieee802_15_4_short_address_str_len, NULL, NULL, ieee802_15_4_short_address_len, NULL, NULL);
 
     /* add a user preference to set the 802.15.4 ethertype */
     ieee802154_module = prefs_register_protocol(proto_ieee802154,
index 4cbf5a7a1325db2c7b066226a8b995dc971cb02b..87dde191c6505d0f568cc00c56a37319db66ac7c 100644 (file)
@@ -350,7 +350,7 @@ void proto_register_j1939(void)
 
     subdissector_pgn_table = register_dissector_table("j1939.pgn", "PGN Handle", proto_j1939, FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
 
-    j1939_address_type = address_type_dissector_register("AT_J1939", "J1939 Address", J1939_addr_to_str, J1939_addr_str_len, J1939_col_filter_str, J1939_addr_len, NULL, NULL);
+    j1939_address_type = address_type_dissector_register("AT_J1939", "J1939 Address", J1939_addr_to_str, J1939_addr_str_len, NULL, J1939_col_filter_str, J1939_addr_len, NULL, NULL);
 }
 
 void
index 65379a447ac697d2b6eb8e6c2d31c41ddabc5789..3201774d75e28c126946b36cfc578b9810a3ce4c 100644 (file)
@@ -2355,7 +2355,7 @@ void proto_register_jxta(void)
     /* Register JXTA Sub-tree */
     proto_register_subtree_array(ett, array_length(ett));
 
-    uri_address_type = address_type_dissector_register("AT_URI", "URI/URL/URN", uri_to_str, uri_str_len, uri_col_filter_str, NULL, NULL, NULL);
+    uri_address_type = address_type_dissector_register("AT_URI", "URI/URL/URN", uri_to_str, uri_str_len, NULL, uri_col_filter_str, NULL, NULL, NULL);
 
     /* Register preferences */
     /* register re-init routine */
index b4e0ff79b7a44cf8a7a082e90ba4e7a1c945669c..268ac1ef501b521b327b7dbcd7416d7973311c11 100644 (file)
@@ -1538,7 +1538,7 @@ proto_register_mp2t(void)
     expert_mp2t = expert_register_protocol(proto_mp2t);
     expert_register_field_array(expert_mp2t, ei, array_length(ei));
 
-    mp2t_no_address_type = address_type_dissector_register("AT_MP2T_NONE", "No MP2T Address", none_addr_to_str, none_addr_str_len, NULL, none_addr_len, NULL, NULL);
+    mp2t_no_address_type = address_type_dissector_register("AT_MP2T_NONE", "No MP2T Address", none_addr_to_str, none_addr_str_len, NULL, NULL, none_addr_len, NULL, NULL);
 
     heur_subdissector_list = register_heur_dissector_list("mp2t.pid", proto_mp2t);
     /* Register init of processing of fragmented DEPI packets */
index 2deefc6819ccf763ce2db233a7b9e26b5e6ccbc5..a97365f655550a9cdde8b77ff6d1b138f0d4d505 100644 (file)
@@ -465,7 +465,7 @@ proto_register_mstp(void)
            "MSTP Vendor specific Frametypes", proto_mstp, FT_UINT24, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
        /* Table_type: (Vendor ID << 16) + Frametype */
 
-       mstp_address_type = address_type_dissector_register("AT_MSTP", "BACnet MS/TP Address", mstp_to_str, mstp_str_len, mstp_col_filter_str, mstp_len, NULL, NULL);
+       mstp_address_type = address_type_dissector_register("AT_MSTP", "BACnet MS/TP Address", mstp_to_str, mstp_str_len, NULL, mstp_col_filter_str, mstp_len, NULL, NULL);
 }
 
 void
index 078f764fe7dab91dbe58481447df340d7be95de7..5897edd01d0855655ce8ed2927bc31cce50058b3 100644 (file)
@@ -1077,7 +1077,7 @@ proto_register_mtp3(void)
                   "MTP3 Service indicator",
                   proto_mtp3, FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
 
-  mtp3_address_type = address_type_dissector_register("AT_SS7PC", "SS7 Point Code", mtp3_addr_to_str, mtp3_str_addr_len, NULL,
+  mtp3_address_type = address_type_dissector_register("AT_SS7PC", "SS7 Point Code", mtp3_addr_to_str, mtp3_str_addr_len, NULL, NULL,
                                                             mtp3_addr_len, NULL, NULL);
 
 
index 8369b5d9fb6d1b685a8949f143cb1a5d1c2d7e68..395677fbf4da2b9a20d56f1b88e92749cf00012d 100644 (file)
@@ -3468,7 +3468,7 @@ proto_register_sna(void)
            "Systems Network Architecture XID", "SNA XID", "sna_xid");
        register_dissector("sna_xid", dissect_sna_xid, proto_sna_xid);
 
-       sna_address_type = address_type_dissector_register("AT_SNA", "SNA Address", sna_fid_to_str_buf, sna_address_str_len, NULL, NULL, NULL, NULL);
+       sna_address_type = address_type_dissector_register("AT_SNA", "SNA Address", sna_fid_to_str_buf, sna_address_str_len, NULL, NULL, NULL, NULL, NULL);
 
        /* Register configuration options */
        sna_module = prefs_register_protocol(proto_sna, NULL);
index 915d2f958c257a7a7edd2f262e774252cc8073f6..a627f3b70824e13ba691bf1ef3587fd4f9877194 100644 (file)
@@ -3046,7 +3046,7 @@ proto_register_tipc(void)
        tipc_module = prefs_register_protocol(proto_tipc, proto_reg_handoff_tipc);
 
        tipc_address_type = address_type_dissector_register("AT_TIPC", "TIPC Address Zone,Subnetwork,Processor",
-                                                                                                               tipc_addr_to_str_buf, tipc_addr_str_len, NULL, NULL, NULL, NULL);
+                                                                                                               tipc_addr_to_str_buf, tipc_addr_str_len, NULL, NULL, NULL, NULL, NULL);
 
        /* Set default ports */
        range_convert_str(&global_tipc_udp_port_range, DEFAULT_TIPC_PORT_RANGE, MAX_TCP_PORT);
index 9c1cc164705c87726eec8dc77d5e4151f620abed..9cac525630fb83342b169a440f29fc5a10794891 100644 (file)
@@ -5315,7 +5315,7 @@ proto_register_usb(void)
     register_decode_as(&usb_product_da);
     register_decode_as(&usb_device_da);
 
-    usb_address_type = address_type_dissector_register("AT_USB", "USB Address", usb_addr_to_str, usb_addr_str_len, NULL, NULL, NULL, NULL);
+    usb_address_type = address_type_dissector_register("AT_USB", "USB Address", usb_addr_to_str, usb_addr_str_len, NULL, NULL, NULL, NULL, NULL);
 
     register_conversation_table(proto_usb, TRUE, usb_conversation_packet, usb_hostlist_packet);
 }
index 35fbe6fb752356213ad30d06fa90552589e6f88c..814708f9f7e074e9400ff3dd70c9a022f0e760b2 100644 (file)
@@ -726,7 +726,7 @@ proto_register_vines_ip(void)
        vines_ip_handle = create_dissector_handle(dissect_vines_ip,
            proto_vines_ip);
 
-       vines_address_type = address_type_dissector_register("AT_VINES", "Banyan Vines address", vines_to_str, vines_str_len, NULL, vines_len, NULL, NULL);
+       vines_address_type = address_type_dissector_register("AT_VINES", "Banyan Vines address", vines_to_str, vines_str_len, NULL, NULL, vines_len, NULL, NULL);
 }
 
 void
index 22be209b66ae0a838998defaae938b782dfc3efc..58c86ba5cf1d7c6f6eb5c9afd2a07e2ac2cc85e7 100644 (file)
@@ -241,7 +241,7 @@ void register_osi_address_type(void)
     if (osi_address_type != -1)
         return;
 
-    osi_address_type = address_type_dissector_register("AT_OSI", "OSI Address", osi_address_to_str, osi_address_str_len, NULL, NULL, NULL, NULL);
+    osi_address_type = address_type_dissector_register("AT_OSI", "OSI Address", osi_address_to_str, osi_address_str_len, NULL, NULL, NULL, NULL, NULL);
 }
 
 
index f9c46d33da3eb195982f06930a7d4d00a2d2a013..3bba928d9fec86195030d1485d34ed4d1df8d660 100644 (file)
@@ -2230,7 +2230,7 @@ void proto_register_irda(void)
     }
     proto_register_subtree_array(ett_iap_e, MAX_IAP_ENTRIES);
 
-    irda_address_type = address_type_dissector_register("AT_IRDA", "IRDA Address", irda_addr_to_str, irda_addr_str_len, irda_col_filter_str, irda_addr_len, NULL, NULL);
+    irda_address_type = address_type_dissector_register("AT_IRDA", "IRDA Address", irda_addr_to_str, irda_addr_str_len, NULL, irda_col_filter_str, irda_addr_len, NULL, NULL);
 }