diff options
author | Guy Harris <gharris@sonic.net> | 2022-08-23 22:15:45 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-08-23 22:15:45 -0700 |
commit | 2aeaf71fa55f512aad801489437cd0e326d767dc (patch) | |
tree | 2767953e12c6fb160aaee3a9d18f9d8b6740acae /epan/dissectors | |
parent | 5399334ebc70e8e5aec2f36bdffc957cbe2625dd (diff) |
Change names to reflect that it's an endpoint table.
More {host, hostlist} -> endpoint.
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-bluetooth.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-dccp.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-eth.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-fc.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-fddi.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee802154.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-ip.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-ipv6.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-ipx.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-jxta.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-ncp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-opensafety.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-sctp.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-sll.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 28 | ||||
-rw-r--r-- | epan/dissectors/packet-tr.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-udp.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 14 |
21 files changed, 172 insertions, 172 deletions
diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c index 58e7c5cf32..d0ca4ca1a1 100644 --- a/epan/dissectors/packet-bluetooth.c +++ b/epan/dissectors/packet-bluetooth.c @@ -4412,19 +4412,19 @@ static const char* bluetooth_conv_get_filter_type(conv_item_t* conv, conv_filter static ct_dissector_info_t bluetooth_ct_dissector_info = {&bluetooth_conv_get_filter_type}; -static const char* bluetooth_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* bluetooth_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == AT_ETHER) + if (endpoint->myaddress.type == AT_ETHER) return "bluetooth.addr"; - else if (host->myaddress.type == AT_STRINGZ) + else if (endpoint->myaddress.type == AT_STRINGZ) return "bluetooth.addr_str"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t bluetooth_dissector_info = {&bluetooth_get_filter_type}; +static et_dissector_info_t bluetooth_et_dissector_info = {&bluetooth_endpoint_get_filter_type}; static tap_packet_status @@ -4442,14 +4442,14 @@ bluetooth_conversation_packet(void *pct, packet_info *pinfo, static tap_packet_status -bluetooth_hostlist_packet(void *pit, packet_info *pinfo, +bluetooth_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; - add_endpoint_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, pinfo->fd->pkt_len, &bluetooth_et_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &bluetooth_et_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -4901,7 +4901,7 @@ proto_register_bluetooth(void) bluetooth_uuid_table = register_dissector_table("bluetooth.uuid", "BT Service UUID", proto_bluetooth, FT_STRING, BASE_NONE); llc_add_oui(OUI_BLUETOOTH, "llc.bluetooth_pid", "LLC Bluetooth OUI PID", oui_hf, proto_bluetooth); - register_conversation_table(proto_bluetooth, TRUE, bluetooth_conversation_packet, bluetooth_hostlist_packet); + register_conversation_table(proto_bluetooth, TRUE, bluetooth_conversation_packet, bluetooth_endpoint_packet); register_decode_as(&bluetooth_uuid_da); } diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 0435f27530..07b35d8b8d 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -453,7 +453,7 @@ dccpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U return TAP_PACKET_REDRAW; } -static const char* dccp_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* dccp_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_SRC_PORT) @@ -465,39 +465,39 @@ static const char* dccp_host_get_filter_type(endpoint_item_t* host, conv_filter_ if (filter == CONV_FT_ANY_PORT) return "dccp.port"; - if(!host) { + if(!endpoint) { return CONV_FILTER_INVALID; } if (filter == CONV_FT_SRC_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.src"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.src"; } if (filter == CONV_FT_DST_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.dst"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.dst"; } if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.addr"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.addr"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t dccp_host_dissector_info = {&dccp_host_get_filter_type}; +static et_dissector_info_t dccp_endpoint_dissector_info = {&dccp_endpoint_get_filter_type}; static tap_packet_status -dccpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags ) +dccpip_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags ) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -506,8 +506,8 @@ dccpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, c /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &dccphdr->ip_src, dccphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &dccp_host_dissector_info, ENDPOINT_DCCP); - add_endpoint_table_data(hash, &dccphdr->ip_dst, dccphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &dccp_host_dissector_info, ENDPOINT_DCCP); + add_endpoint_table_data(hash, &dccphdr->ip_src, dccphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &dccp_endpoint_dissector_info, ENDPOINT_DCCP); + add_endpoint_table_data(hash, &dccphdr->ip_dst, dccphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &dccp_endpoint_dissector_info, ENDPOINT_DCCP); return TAP_PACKET_REDRAW; } @@ -1730,7 +1730,7 @@ proto_register_dccp(void) "Make the DCCP dissector use relative sequence numbers instead of absolute ones.", &dccp_relative_seq); - register_conversation_table(proto_dccp, FALSE, dccpip_conversation_packet, dccpip_hostlist_packet); + register_conversation_table(proto_dccp, FALSE, dccpip_conversation_packet, dccpip_endpoint_packet); register_conversation_filter("dccp", "DCCP", dccp_filter_valid, dccp_build_filter); register_follow_stream(proto_dccp, "dccp_follow", dccp_follow_conv_filter, dccp_follow_index_filter, dccp_follow_address_filter, dccp_port_to_display, follow_tvb_tap_listener); diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index ee9d2dff2f..3089fe3133 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -167,18 +167,18 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* eth_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* eth_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_ETHER)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_ETHER)) return "eth.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t eth_host_dissector_info = {ð_host_get_filter_type}; +static et_dissector_info_t eth_endpoint_dissector_info = {ð_endpoint_get_filter_type}; static tap_packet_status -eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +eth_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -187,8 +187,8 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, ð_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, ð_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -1154,7 +1154,7 @@ proto_register_eth(void) eth_maybefcs_handle = register_dissector("eth_maybefcs", dissect_eth_maybefcs, proto_eth); eth_tap = register_tap("eth"); - register_conversation_table(proto_eth, TRUE, eth_conversation_packet, eth_hostlist_packet); + register_conversation_table(proto_eth, TRUE, eth_conversation_packet, eth_endpoint_packet); register_conversation_filter("eth", "Ethernet", eth_filter_valid, eth_build_filter); register_capture_dissector("eth", capture_eth, proto_eth); diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index a5c55f0c68..c561f0ee0d 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -206,18 +206,18 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c return TAP_PACKET_REDRAW; } -static const char* fc_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* fc_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_FC)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_FC)) return "fc.id"; return CONV_FILTER_INVALID; } -static et_dissector_info_t fc_host_dissector_info = {&fc_host_get_filter_type}; +static et_dissector_info_t fc_endpoint_dissector_info = {&fc_endpoint_get_filter_type}; static tap_packet_status -fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +fc_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -226,8 +226,8 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &fchdr->s_id, 0, TRUE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &fchdr->d_id, 0, FALSE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &fchdr->s_id, 0, TRUE, 1, pinfo->fd->pkt_len, &fc_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &fchdr->d_id, 0, FALSE, 1, pinfo->fd->pkt_len, &fc_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -1562,7 +1562,7 @@ proto_register_fc(void) fcsof_handle = register_dissector("fcsof", dissect_fcsof, proto_fcsof); - register_conversation_table(proto_fc, TRUE, fc_conversation_packet, fc_hostlist_packet); + register_conversation_table(proto_fc, TRUE, fc_conversation_packet, fc_endpoint_packet); register_srt_table(proto_fc, NULL, 1, fcstat_packet, fcstat_init, NULL); } diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index 73a0420de4..7b34be0ed5 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -166,18 +166,18 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* fddi_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* fddi_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_ETHER)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_ETHER)) return "fddi.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t fddi_host_dissector_info = {&fddi_host_get_filter_type}; +static et_dissector_info_t fddi_endpoint_dissector_info = {&fddi_endpoint_get_filter_type}; static tap_packet_status -fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +fddi_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -186,8 +186,8 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &fddi_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &fddi_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -520,7 +520,7 @@ proto_register_fddi(void) &fddi_padding); fddi_tap = register_tap("fddi"); - register_conversation_table(proto_fddi, TRUE, fddi_conversation_packet, fddi_hostlist_packet); + register_conversation_table(proto_fddi, TRUE, fddi_conversation_packet, fddi_endpoint_packet); } void diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index a1838b685a..0920788955 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -8006,18 +8006,18 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static const char* -wlan_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +wlan_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == wlan_address_type)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == wlan_address_type)) return "wlan.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t wlan_host_dissector_info = {&wlan_host_get_filter_type}; +static et_dissector_info_t wlan_endpoint_dissector_info = {&wlan_endpoint_get_filter_type}; static tap_packet_status -wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +wlan_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -8026,8 +8026,8 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &whdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &whdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &whdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &wlan_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &whdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &wlan_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -52198,7 +52198,7 @@ proto_register_ieee80211(void) &addresses_reassembly_table_functions); wlan_tap = register_tap("wlan"); - register_conversation_table(proto_wlan, TRUE, wlan_conversation_packet, wlan_hostlist_packet); + register_conversation_table(proto_wlan, TRUE, wlan_conversation_packet, wlan_endpoint_packet); 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); diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index de87895f48..4cc70e2665 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -5603,21 +5603,21 @@ static tap_packet_status ieee802154_conversation_packet(void *pct, packet_info * return TAP_PACKET_REDRAW; } -static const char* ieee802154_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* ieee802154_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == ieee802_15_4_short_address_type) + if (endpoint->myaddress.type == ieee802_15_4_short_address_type) return "wpan.addr16"; - else if (host->myaddress.type == AT_EUI64) + else if (endpoint->myaddress.type == AT_EUI64) return "wpan.addr64"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t ieee802154_host_dissector_info = {&ieee802154_host_get_filter_type }; +static et_dissector_info_t ieee802154_endpoint_dissector_info = {&ieee802154_endpoint_get_filter_type }; -static tap_packet_status ieee802154_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) +static tap_packet_status ieee802154_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*)pit; hash->flags = flags; @@ -5626,9 +5626,9 @@ static tap_packet_status ieee802154_hostlist_packet(void *pit, packet_info *pinf packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ add_endpoint_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, - pinfo->fd->pkt_len, &ieee802154_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &ieee802154_endpoint_dissector_info, ENDPOINT_NONE); add_endpoint_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, - pinfo->fd->pkt_len, &ieee802154_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &ieee802154_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -7024,7 +7024,7 @@ void proto_register_ieee802154(void) ieee802154_tap = register_tap(IEEE802154_PROTOABBREV_WPAN); - register_conversation_table(proto_ieee802154, TRUE, ieee802154_conversation_packet, ieee802154_hostlist_packet); + register_conversation_table(proto_ieee802154, TRUE, ieee802154_conversation_packet, ieee802154_endpoint_packet); register_conversation_filter(IEEE802154_PROTOABBREV_WPAN, "IEEE 802.15.4", ieee802154_filter_valid, ieee802154_build_filter); } /* proto_register_ieee802154 */ diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 64c432e2ac..10cd228eb8 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -516,18 +516,18 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c return TAP_PACKET_REDRAW; } -static const char* ip_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* ip_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPv4)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_IPv4)) return "ip.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t ip_host_dissector_info = {&ip_host_get_filter_type}; +static et_dissector_info_t ip_endpoint_dissector_info = {&ip_endpoint_get_filter_type}; static tap_packet_status -ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +ip_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -536,8 +536,8 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &iph->ip_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &iph->ip_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &iph->ip_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ip_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &iph->ip_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ip_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -3013,7 +3013,7 @@ proto_register_ip(void) exported_pdu_tap = register_export_pdu_tap_with_encap("IP", WTAP_ENCAP_RAW_IP); register_decode_as(&ip_da); - register_conversation_table(proto_ip, TRUE, ip_conversation_packet, ip_hostlist_packet); + register_conversation_table(proto_ip, TRUE, ip_conversation_packet, ip_endpoint_packet); register_conversation_filter("ip", "IPv4", ip_filter_valid, ip_build_filter); ip_cap_handle = register_capture_dissector("ip", capture_ip, proto_ip); diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 815bcc7162..6aa8696863 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -541,18 +541,18 @@ ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* ipv6_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* ipv6_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPv6)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_IPv6)) return "ipv6.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t ipv6_host_dissector_info = {&ipv6_host_get_filter_type}; +static et_dissector_info_t ipv6_endpoint_dissector_info = {&ipv6_endpoint_get_filter_type}; static tap_packet_status -ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +ipv6_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -560,9 +560,9 @@ ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con const ipv6_tap_info_t *ip6 = (const ipv6_tap_info_t *)vip; add_endpoint_table_data(hash, &ip6->ip6_src, 0, TRUE, 1, - pinfo->fd->pkt_len, &ipv6_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &ipv6_endpoint_dissector_info, ENDPOINT_NONE); add_endpoint_table_data(hash, &ip6->ip6_dst, 0, FALSE, 1, - pinfo->fd->pkt_len, &ipv6_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &ipv6_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -4753,7 +4753,7 @@ proto_register_ipv6(void) register_decode_as(&ipv6_fraghdr_da); register_decode_as(&ipv6_dstopts_da); - register_conversation_table(proto_ipv6, TRUE, ipv6_conversation_packet, ipv6_hostlist_packet); + register_conversation_table(proto_ipv6, TRUE, ipv6_conversation_packet, ipv6_endpoint_packet); register_conversation_filter("ipv6", "IPv6", ipv6_filter_valid, ipv6_build_filter); register_capture_dissector("ipv6", capture_ipv6, proto_ipv6); diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 22d107775c..9d10f35b2c 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -161,18 +161,18 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* ipx_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* ipx_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPX)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_IPX)) return "ipx.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t ipx_host_dissector_info = {&ipx_host_get_filter_type}; +static et_dissector_info_t ipx_endpoint_dissector_info = {&ipx_endpoint_get_filter_type}; static tap_packet_status -ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +ipx_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -182,8 +182,8 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &ipxh->ipx_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &ipxh->ipx_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ipxh->ipx_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ipx_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &ipxh->ipx_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ipx_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -1584,7 +1584,7 @@ proto_register_ipx(void) spx_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), spx_hash_func, spx_equal); ipx_tap=register_tap("ipx"); - register_conversation_table(proto_ipx, TRUE, ipx_conversation_packet, ipx_hostlist_packet); + register_conversation_table(proto_ipx, TRUE, ipx_conversation_packet, ipx_endpoint_packet); register_capture_dissector("ipx", capture_ipx, proto_ipx); } diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 112af80f54..6ca37c203e 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -197,18 +197,18 @@ jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt return TAP_PACKET_REDRAW; } -static const char* jxta_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* jxta_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == uri_address_type)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == uri_address_type)) return "jxta.message.address"; return CONV_FILTER_INVALID; } -static et_dissector_info_t jxta_host_dissector_info = {&jxta_host_get_filter_type}; +static et_dissector_info_t jxta_endpoint_dissector_info = {&jxta_endpoint_get_filter_type}; static tap_packet_status -jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +jxta_endpoint_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -218,8 +218,8 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &jxtahdr->src_address, 0, TRUE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &jxtahdr->dest_address, 0, FALSE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &jxtahdr->src_address, 0, TRUE, 1, jxtahdr->size, &jxta_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &jxtahdr->dest_address, 0, FALSE, 1, jxtahdr->size, &jxta_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -2369,7 +2369,7 @@ void proto_register_jxta(void) prefs_register_obsolete_preference(jxta_module, "tcp.heuristic"); prefs_register_obsolete_preference(jxta_module, "sctp.heuristic"); - register_conversation_table(proto_jxta, TRUE, jxta_conversation_packet, jxta_hostlist_packet); + register_conversation_table(proto_jxta, TRUE, jxta_conversation_packet, jxta_endpoint_packet); } diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index 4cb1c6fefb..2fc6f29e1c 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -772,15 +772,15 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* ncp_host_get_filter_type(endpoint_item_t* host _U_, conv_filter_type_e filter) +static const char* ncp_endpoint_get_filter_type(endpoint_item_t* endpoint _U_, conv_filter_type_e filter) { return ncp_conv_get_filter_type(NULL, filter); } -static et_dissector_info_t ncp_host_dissector_info = {&ncp_host_get_filter_type}; +static et_dissector_info_t ncp_endpoint_dissector_info = {&ncp_endpoint_get_filter_type}; static tap_packet_status -ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) +ncp_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -790,8 +790,8 @@ ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP); - add_endpoint_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP); + add_endpoint_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &ncp_endpoint_dissector_info, ENDPOINT_NCP); + add_endpoint_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ncp_endpoint_dissector_info, ENDPOINT_NCP); return TAP_PACKET_REDRAW; } @@ -1611,7 +1611,7 @@ proto_register_ncp(void) ncp_tap.stat=register_tap("ncp_srt"); ncp_tap.hdr=register_tap("ncp"); - register_conversation_table(proto_ncp, FALSE, ncp_conversation_packet, ncp_hostlist_packet); + register_conversation_table(proto_ncp, FALSE, ncp_conversation_packet, ncp_endpoint_packet); register_srt_table(proto_ncp, "ncp_srt", 24, ncpstat_packet, ncpstat_init, NULL); } diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index 9fef548d3f..e269e7e2ae 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -1970,9 +1970,9 @@ static const char* opensafety_conv_get_filter_type(conv_item_t* conv, conv_filte static ct_dissector_info_t opensafety_ct_dissector_info = {&opensafety_conv_get_filter_type}; -static const char* opensafety_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* opensafety_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if (host->myaddress.type == AT_NUMERIC) { + if (endpoint->myaddress.type == AT_NUMERIC) { if (filter == CONV_FT_ANY_ADDRESS) return "opensafety.msg.node"; else if (filter == CONV_FT_SRC_ADDRESS) @@ -2011,7 +2011,7 @@ opensafety_conversation_packet(void *pct, packet_info *pinfo, } static tap_packet_status -opensafety_hostlist_packet(void *pit, packet_info *pinfo, +opensafety_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { address *src = (address *)wmem_alloc0(pinfo->pool, sizeof(address)); @@ -3086,7 +3086,7 @@ proto_register_opensafety(void) opensafety_mbtcp_handle = register_dissector("opensafety_mbtcp", dissect_opensafety_mbtcp, proto_opensafety ); opensafety_pnio_handle = register_dissector("opensafety_pnio", dissect_opensafety_pn_io, proto_opensafety); - register_conversation_table(proto_opensafety, TRUE, opensafety_conversation_packet, opensafety_hostlist_packet); + register_conversation_table(proto_opensafety, TRUE, opensafety_conversation_packet, opensafety_endpoint_packet); } void diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 608b78b4fa..f537c09733 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -2125,18 +2125,18 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* rsvp_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* rsvp_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPv4)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_IPv4)) return "ip.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t rsvp_host_dissector_info = {&rsvp_host_get_filter_type}; +static et_dissector_info_t rsvp_endpoint_dissector_info = {&rsvp_endpoint_get_filter_type}; static tap_packet_status -rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +rsvp_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -2148,8 +2148,8 @@ rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con * itself). XXX - this could probably be done more efficiently inside * endpoint_table */ - add_endpoint_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -10208,7 +10208,7 @@ proto_register_rsvp(void) rsvp_request_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), rsvp_hash, rsvp_equal); - register_conversation_table(proto_rsvp, TRUE, rsvp_conversation_packet, rsvp_hostlist_packet); + register_conversation_table(proto_rsvp, TRUE, rsvp_conversation_packet, rsvp_endpoint_packet); } void diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 2ec87bb7da..080523af7c 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -794,7 +794,7 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* sctp_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* sctp_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_SRC_PORT) return "sctp.srcport"; @@ -805,38 +805,38 @@ static const char* sctp_host_get_filter_type(endpoint_item_t* host, conv_filter_ if (filter == CONV_FT_ANY_PORT) return "sctp.port"; - if(!host) { + if(!endpoint) { return CONV_FILTER_INVALID; } if (filter == CONV_FT_SRC_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.src"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.src"; } if (filter == CONV_FT_DST_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.dst"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.dst"; } if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.addr"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.addr"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t sctp_host_dissector_info = {&sctp_host_get_filter_type}; +static et_dissector_info_t sctp_endpoint_dissector_info = {&sctp_endpoint_get_filter_type}; static tap_packet_status -sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +sctp_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -846,8 +846,8 @@ sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &sctphdr->ip_src, sctphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP); - add_endpoint_table_data(hash, &sctphdr->ip_dst, sctphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP); + add_endpoint_table_data(hash, &sctphdr->ip_src, sctphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &sctp_endpoint_dissector_info, ENDPOINT_SCTP); + add_endpoint_table_data(hash, &sctphdr->ip_dst, sctphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &sctp_endpoint_dissector_info, ENDPOINT_SCTP); return TAP_PACKET_REDRAW; } @@ -5191,7 +5191,7 @@ proto_register_sctp(void) register_decode_as(&sctp_da_port); register_decode_as(&sctp_da_ppi); - register_conversation_table(proto_sctp, FALSE, sctp_conversation_packet, sctp_hostlist_packet); + register_conversation_table(proto_sctp, FALSE, sctp_conversation_packet, sctp_endpoint_packet); } void diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c index 61e799f3ee..0de8bb31ec 100644 --- a/epan/dissectors/packet-sll.c +++ b/epan/dissectors/packet-sll.c @@ -149,34 +149,34 @@ sll_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* sll_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* sll_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_SRC_ADDRESS) && (host->myaddress.type == AT_ETHER)) + if ((filter == CONV_FT_SRC_ADDRESS) && (endpoint->myaddress.type == AT_ETHER)) return "sll.src.eth"; - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_ETHER)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_ETHER)) return "sll.src.eth"; - if ((filter == CONV_FT_SRC_ADDRESS) && (host->myaddress.type == AT_IPv4)) + if ((filter == CONV_FT_SRC_ADDRESS) && (endpoint->myaddress.type == AT_IPv4)) return "sll.src.ipv4"; - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPv4)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_IPv4)) return "sll.src.ipv4"; return CONV_FILTER_INVALID; } -static et_dissector_info_t sll_host_dissector_info = {&sll_host_get_filter_type}; +static et_dissector_info_t sll_endpoint_dissector_info = {&sll_endpoint_get_filter_type}; static tap_packet_status -sll_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +sll_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; const sll_tap_data *tap_data = (const sll_tap_data*)vip; - add_endpoint_table_data(hash, &tap_data->src_address, 0, TRUE, 1, pinfo->fd->pkt_len, &sll_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &tap_data->src_address, 0, TRUE, 1, pinfo->fd->pkt_len, &sll_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -617,7 +617,7 @@ proto_register_sll(void) ); register_capture_dissector_table("sll.ltype", "Linux SLL protocol"); - register_conversation_table(proto_sll, TRUE, sll_conversation_packet, sll_hostlist_packet); + register_conversation_table(proto_sll, TRUE, sll_conversation_packet, sll_endpoint_packet); register_decode_as(&sll_da); } diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 66c0014461..03f9111922 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -956,7 +956,7 @@ mptcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _ return TAP_PACKET_REDRAW; } -static const char* tcp_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* tcp_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_SRC_PORT) return "tcp.srcport"; @@ -967,38 +967,38 @@ static const char* tcp_host_get_filter_type(endpoint_item_t* host, conv_filter_t if (filter == CONV_FT_ANY_PORT) return "tcp.port"; - if(!host) { + if(!endpoint) { return CONV_FILTER_INVALID; } if (filter == CONV_FT_SRC_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.src"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.src"; } if (filter == CONV_FT_DST_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.dst"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.dst"; } if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.addr"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.addr"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t tcp_host_dissector_info = {&tcp_host_get_filter_type}; +static et_dissector_info_t tcp_endpoint_dissector_info = {&tcp_endpoint_get_filter_type}; static tap_packet_status -tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +tcpip_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -1008,8 +1008,8 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &tcphdr->ip_src, tcphdr->th_sport, TRUE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP); - add_endpoint_table_data(hash, &tcphdr->ip_dst, tcphdr->th_dport, FALSE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP); + add_endpoint_table_data(hash, &tcphdr->ip_src, tcphdr->th_sport, TRUE, 1, pinfo->fd->pkt_len, &tcp_endpoint_dissector_info, ENDPOINT_TCP); + add_endpoint_table_data(hash, &tcphdr->ip_dst, tcphdr->th_dport, FALSE, 1, pinfo->fd->pkt_len, &tcp_endpoint_dissector_info, ENDPOINT_TCP); return TAP_PACKET_REDRAW; } @@ -9448,7 +9448,7 @@ proto_register_tcp(void) register_decode_as(&tcp_da); - register_conversation_table(proto_tcp, FALSE, tcpip_conversation_packet, tcpip_hostlist_packet); + register_conversation_table(proto_tcp, FALSE, tcpip_conversation_packet, tcpip_endpoint_packet); register_conversation_filter("tcp", "TCP", tcp_filter_valid, tcp_build_filter); register_seq_analysis("tcp", "TCP Flows", proto_tcp, NULL, 0, tcp_seq_analysis_packet); @@ -9488,7 +9488,7 @@ proto_register_tcp(void) "You need to enable DSS mapping analysis for this option to work", &mptcp_intersubflows_retransmission); - register_conversation_table(proto_mptcp, FALSE, mptcpip_conversation_packet, tcpip_hostlist_packet); + register_conversation_table(proto_mptcp, FALSE, mptcpip_conversation_packet, tcpip_endpoint_packet); register_follow_stream(proto_tcp, "tcp_follow", tcp_follow_conv_filter, tcp_follow_index_filter, tcp_follow_address_filter, tcp_port_to_display, follow_tcp_tap_listener); } diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index 77246279f8..7a75ec0232 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -149,18 +149,18 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c return TAP_PACKET_REDRAW; } -static const char* tr_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* tr_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_ETHER)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == AT_ETHER)) return "tr.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t tr_host_dissector_info = {&tr_host_get_filter_type}; +static et_dissector_info_t tr_endpoint_dissector_info = {&tr_endpoint_get_filter_type}; static tap_packet_status -tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +tr_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -170,8 +170,8 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &trhdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &trhdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &trhdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &tr_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &trhdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &tr_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -788,7 +788,7 @@ proto_register_tr(void) tr_handle = register_dissector("tr", dissect_tr, proto_tr); tr_tap=register_tap("tr"); - register_conversation_table(proto_tr, TRUE, tr_conversation_packet, tr_hostlist_packet); + register_conversation_table(proto_tr, TRUE, tr_conversation_packet, tr_endpoint_packet); register_capture_dissector("tr", capture_tr, proto_tr); } diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index e4b8abf3e3..33b0a2d848 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -286,7 +286,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ return TAP_PACKET_REDRAW; } -static const char* udp_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* udp_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { if (filter == CONV_FT_SRC_PORT) @@ -298,39 +298,39 @@ static const char* udp_host_get_filter_type(endpoint_item_t* host, conv_filter_t if (filter == CONV_FT_ANY_PORT) return "udp.port"; - if(!host) { + if(!endpoint) { return CONV_FILTER_INVALID; } if (filter == CONV_FT_SRC_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.src"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.src"; } if (filter == CONV_FT_DST_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.dst"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.dst"; } if (filter == CONV_FT_ANY_ADDRESS) { - if (host->myaddress.type == AT_IPv4) + if (endpoint->myaddress.type == AT_IPv4) return "ip.addr"; - if (host->myaddress.type == AT_IPv6) + if (endpoint->myaddress.type == AT_IPv6) return "ipv6.addr"; } return CONV_FILTER_INVALID; } -static et_dissector_info_t udp_host_dissector_info = {&udp_host_get_filter_type}; +static et_dissector_info_t udp_endpoint_dissector_info = {&udp_endpoint_get_filter_type}; static tap_packet_status -udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) +udpip_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -340,8 +340,8 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &udphdr->ip_src, udphdr->uh_sport, TRUE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP); - add_endpoint_table_data(hash, &udphdr->ip_dst, udphdr->uh_dport, FALSE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP); + add_endpoint_table_data(hash, &udphdr->ip_src, udphdr->uh_sport, TRUE, 1, pinfo->fd->pkt_len, &udp_endpoint_dissector_info, ENDPOINT_UDP); + add_endpoint_table_data(hash, &udphdr->ip_dst, udphdr->uh_dport, FALSE, 1, pinfo->fd->pkt_len, &udp_endpoint_dissector_info, ENDPOINT_UDP); return TAP_PACKET_REDRAW; } @@ -1473,7 +1473,7 @@ proto_register_udp(void) &udplite_calculate_ts); register_decode_as(&udp_da); - register_conversation_table(proto_udp, FALSE, udpip_conversation_packet, udpip_hostlist_packet); + register_conversation_table(proto_udp, FALSE, udpip_conversation_packet, udpip_endpoint_packet); register_conversation_filter("udp", "UDP", udp_filter_valid, udp_build_filter); register_follow_stream(proto_udp, "udp_follow", udp_follow_conv_filter, udp_follow_index_filter, udp_follow_address_filter, udp_port_to_display, follow_tvb_tap_listener); diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 6d68ed400d..bb73e2532a 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1885,9 +1885,9 @@ usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, return TAP_PACKET_REDRAW; } -static const char* usb_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* usb_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == usb_address_type)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == usb_address_type)) return "usb.addr"; return CONV_FILTER_INVALID; @@ -1899,10 +1899,10 @@ usb_col_filter_str(const address* addr _U_, gboolean is_src) return is_src ? "usb.src" : "usb.dst"; } -static et_dissector_info_t usb_host_dissector_info = {&usb_host_get_filter_type}; +static et_dissector_info_t usb_endpoint_dissector_info = {&usb_endpoint_get_filter_type}; static tap_packet_status -usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) +usb_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*) pit; hash->flags = flags; @@ -1910,8 +1910,8 @@ usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ - add_endpoint_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE); - add_endpoint_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &usb_endpoint_dissector_info, ENDPOINT_NONE); + add_endpoint_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &usb_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -6979,7 +6979,7 @@ proto_register_usb(void) usb_address_type = address_type_dissector_register("AT_USB", "USB Address", usb_addr_to_str, usb_addr_str_len, NULL, usb_col_filter_str, NULL, NULL, NULL); - register_conversation_table(proto_usb, TRUE, usb_conversation_packet, usb_hostlist_packet); + register_conversation_table(proto_usb, TRUE, usb_conversation_packet, usb_endpoint_packet); } void diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index af692c5d3f..48928b9c02 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -1825,17 +1825,17 @@ static tap_packet_status zbee_nwk_conversation_packet(void *pct, packet_info *pi return TAP_PACKET_REDRAW; } -static const char* zbee_nwk_host_get_filter_type(endpoint_item_t* host, conv_filter_type_e filter) +static const char* zbee_nwk_endpoint_get_filter_type(endpoint_item_t* endpoint, conv_filter_type_e filter) { - if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == zbee_nwk_address_type)) + if ((filter == CONV_FT_ANY_ADDRESS) && (endpoint->myaddress.type == zbee_nwk_address_type)) return "zbee_nwk.addr"; return CONV_FILTER_INVALID; } -static et_dissector_info_t zbee_nwk_host_dissector_info = {&zbee_nwk_host_get_filter_type }; +static et_dissector_info_t zbee_nwk_endpoint_dissector_info = {&zbee_nwk_endpoint_get_filter_type }; -static tap_packet_status zbee_nwk_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) +static tap_packet_status zbee_nwk_endpoint_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags) { conv_hash_t *hash = (conv_hash_t*)pit; hash->flags = flags; @@ -1844,9 +1844,9 @@ static tap_packet_status zbee_nwk_hostlist_packet(void *pit, packet_info *pinfo, packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside endpoint_table */ add_endpoint_table_data(hash, &pinfo->net_src, 0, TRUE, 1, - pinfo->fd->pkt_len, &zbee_nwk_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &zbee_nwk_endpoint_dissector_info, ENDPOINT_NONE); add_endpoint_table_data(hash, &pinfo->net_dst, 0, FALSE, 1, - pinfo->fd->pkt_len, &zbee_nwk_host_dissector_info, ENDPOINT_NONE); + pinfo->fd->pkt_len, &zbee_nwk_endpoint_dissector_info, ENDPOINT_NONE); return TAP_PACKET_REDRAW; } @@ -2358,7 +2358,7 @@ void proto_register_zbee_nwk(void) zbee_nwk_tap = register_tap(ZBEE_PROTOABBREV_NWK); - register_conversation_table(proto_zbee_nwk, TRUE, zbee_nwk_conversation_packet, zbee_nwk_hostlist_packet); + register_conversation_table(proto_zbee_nwk, TRUE, zbee_nwk_conversation_packet, zbee_nwk_endpoint_packet); register_conversation_filter(ZBEE_PROTOABBREV_NWK, "ZigBee Network Layer", zbee_nwk_filter_valid, zbee_nwk_build_filter); } /* proto_register_zbee_nwk */ |