aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-21 22:23:05 -0400
committerAnders Broman <a.broman58@gmail.com>2016-06-22 07:47:39 +0000
commit0bf1cb2342e5becdda56be41f0347068549a77fe (patch)
tree80a39ed33612f3907a6813f683d83204d1d3bf49 /epan/dissectors
parentc664f72f36ed1ac4e50c020cd3afb1ccf55094c8 (diff)
Add address_to_bytes API.
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>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-arcnet.c2
-rw-r--r--epan/dissectors/packet-atalk.c2
-rw-r--r--epan/dissectors/packet-devicenet.c2
-rw-r--r--epan/dissectors/packet-ieee80211.c4
-rw-r--r--epan/dissectors/packet-ieee802154.c2
-rw-r--r--epan/dissectors/packet-j1939.c2
-rw-r--r--epan/dissectors/packet-jxta.c2
-rw-r--r--epan/dissectors/packet-mp2t.c2
-rw-r--r--epan/dissectors/packet-mstp.c2
-rw-r--r--epan/dissectors/packet-mtp3.c2
-rw-r--r--epan/dissectors/packet-sna.c2
-rw-r--r--epan/dissectors/packet-tipc.c2
-rw-r--r--epan/dissectors/packet-usb.c2
-rw-r--r--epan/dissectors/packet-vines.c2
14 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-arcnet.c b/epan/dissectors/packet-arcnet.c
index 37f57de5ac..3ade0285f0 100644
--- a/epan/dissectors/packet-arcnet.c
+++ b/epan/dissectors/packet-arcnet.c
@@ -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);
}
diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c
index e6db3c2ad3..3a5ca57dfb 100644
--- a/epan/dissectors/packet-atalk.c
+++ b/epan/dissectors/packet-atalk.c
@@ -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
diff --git a/epan/dissectors/packet-devicenet.c b/epan/dissectors/packet-devicenet.c
index 8e6dd66b41..fac1b3fcf8 100644
--- a/epan/dissectors/packet-devicenet.c
+++ b/epan/dissectors/packet-devicenet.c
@@ -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);
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index c0b1f5d6d3..a654149d44 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -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);
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index cfe8b5be19..b7606a0a98 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -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,
diff --git a/epan/dissectors/packet-j1939.c b/epan/dissectors/packet-j1939.c
index 4cbf5a7a13..87dde191c6 100644
--- a/epan/dissectors/packet-j1939.c
+++ b/epan/dissectors/packet-j1939.c
@@ -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
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index 65379a447a..3201774d75 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -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 */
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c
index b4e0ff79b7..268ac1ef50 100644
--- a/epan/dissectors/packet-mp2t.c
+++ b/epan/dissectors/packet-mp2t.c
@@ -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 */
diff --git a/epan/dissectors/packet-mstp.c b/epan/dissectors/packet-mstp.c
index 2deefc6819..a97365f655 100644
--- a/epan/dissectors/packet-mstp.c
+++ b/epan/dissectors/packet-mstp.c
@@ -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
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c
index 078f764fe7..5897edd01d 100644
--- a/epan/dissectors/packet-mtp3.c
+++ b/epan/dissectors/packet-mtp3.c
@@ -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);
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c
index 8369b5d9fb..395677fbf4 100644
--- a/epan/dissectors/packet-sna.c
+++ b/epan/dissectors/packet-sna.c
@@ -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);
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c
index 915d2f958c..a627f3b708 100644
--- a/epan/dissectors/packet-tipc.c
+++ b/epan/dissectors/packet-tipc.c
@@ -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);
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index 9c1cc16470..9cac525630 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -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);
}
diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c
index 35fbe6fb75..814708f9f7 100644
--- a/epan/dissectors/packet-vines.c
+++ b/epan/dissectors/packet-vines.c
@@ -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