aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-10-21 12:04:16 -0700
committerMichael Mann <mmann78@netscape.net>2015-10-22 11:45:56 +0000
commit86fe2be4dc2f5f5ff09e0d6c00277d7a9bf09ffd (patch)
tree4aca52419f6ee7dc9a58ca8e4cd79fbeaa8d3387 /asn1
parent9eda98dec91931588a003a6f707c4e2097369ba1 (diff)
Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h225/h225.cnf4
-rw-r--r--asn1/h245/h245.cnf4
-rw-r--r--asn1/h245/packet-h245-template.c2
-rw-r--r--asn1/mpeg-audio/packet-mpeg-audio-template.c4
-rw-r--r--asn1/nbap/nbap.cnf56
-rw-r--r--asn1/nbap/packet-nbap-template.c2
-rw-r--r--asn1/pcap/pcap.cnf2
-rw-r--r--asn1/sbc-ap/sbc-ap.cnf2
-rw-r--r--asn1/t38/packet-t38-template.c4
9 files changed, 40 insertions, 40 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 9315e047a2..9a15e11c9e 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -457,9 +457,9 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
conversation_t *conv=NULL;
if (ipv4_address!=0) {
- SET_ADDRESS(&src_addr, AT_IPv4, 4, &ipv4_address);
+ set_address(&src_addr, AT_IPv4, 4, &ipv4_address);
} else if (memcmp(ipv6_address.bytes, ipv6_address_zeros.bytes, sizeof(ipv6_address.bytes))!=0) {
- SET_ADDRESS(&src_addr, AT_IPv6, 16, ipv6_address.bytes);
+ set_address(&src_addr, AT_IPv6, 16, ipv6_address.bytes);
} else {
return offset;
}
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 3d817e51c7..e2a3ceb62f 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -848,7 +848,7 @@ if (h245_pi != NULL)
if (upcoming_channel && upcoming_channel->upcoming_addr) {
tvb_memcpy(value_tvb, upcoming_channel->upcoming_addr->addr_buf, 0, 4);
- SET_ADDRESS(&upcoming_channel->upcoming_addr->addr, AT_IPv4, 4, upcoming_channel->upcoming_addr->addr_buf);
+ set_address(&upcoming_channel->upcoming_addr->addr, AT_IPv4, 4, upcoming_channel->upcoming_addr->addr_buf);
}
#.END
#----------------------------------------------------------------------------------------
@@ -869,7 +869,7 @@ if (h245_pi != NULL)
if (upcoming_channel && upcoming_channel->upcoming_addr) {
tvb_memcpy(value_tvb, upcoming_channel->upcoming_addr->addr_buf, 0, 16);
- SET_ADDRESS(&upcoming_channel->upcoming_addr->addr, AT_IPv6, 16, upcoming_channel->upcoming_addr->addr_buf);
+ set_address(&upcoming_channel->upcoming_addr->addr, AT_IPv6, 16, upcoming_channel->upcoming_addr->addr_buf);
}
#.END
#----------------------------------------------------------------------------------------
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index d4d9ef2dc4..3407a52714 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -335,7 +335,7 @@ static void update_unicast_addr(unicast_addr_t *req_addr, unicast_addr_t *ack_ad
{
if (ack_addr->addr.type!=AT_NONE && ack_addr->port!=0) {
memcpy(req_addr->addr_buf, ack_addr->addr_buf, sizeof(req_addr->addr_buf));
- SET_ADDRESS(&req_addr->addr, ack_addr->addr.type, ack_addr->addr.len, req_addr->addr_buf);
+ set_address(&req_addr->addr, ack_addr->addr.type, ack_addr->addr.len, req_addr->addr_buf);
req_addr->port = ack_addr->port;
}
}
diff --git a/asn1/mpeg-audio/packet-mpeg-audio-template.c b/asn1/mpeg-audio/packet-mpeg-audio-template.c
index 8ae19bd9e4..4f8e20bffd 100644
--- a/asn1/mpeg-audio/packet-mpeg-audio-template.c
+++ b/asn1/mpeg-audio/packet-mpeg-audio-template.c
@@ -71,10 +71,10 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Audio Layer %d", mpa_layer(&mpa) + 1);
if (MPA_BITRATE_VALID(&mpa) && MPA_FREQUENCY_VALID(&mpa)) {
data_size = (int)(MPA_DATA_BYTES(&mpa) - sizeof mpa);
- SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
+ set_address(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
"%d kb/s", mpa_bitrate(&mpa) / 1000);
- SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
+ set_address(&pinfo->dst, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_DST,
"%g kHz", mpa_frequency(&mpa) / (float)1000);
}
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf
index 96c29dd2b8..f912b250d8 100644
--- a/asn1/nbap/nbap.cnf
+++ b/asn1/nbap/nbap.cnf
@@ -740,9 +740,9 @@ transportFormatSet_type = NBAP_CPCH;
{
return offset;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -833,9 +833,9 @@ num_items = 1;
{
return offset;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -942,9 +942,9 @@ transportFormatSet_type = NBAP_CPCH;
{
return offset;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -1148,9 +1148,9 @@ dch_id = 0xFFFFFFFF;
return offset;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -1256,9 +1256,9 @@ BindingID_port = 0;
{
return offset;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -1342,7 +1342,7 @@ BindingID_port = 0;
}
/* Set address for collection of DDI entries */
- COPY_ADDRESS(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr);
+ copy_address(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr);
nbap_edch_channel_info[e_dch_macdflow_id].crnc_port = BindingID_port;
set_umts_fp_conv_data(conversation, umts_fp_conversation_info);
@@ -1365,7 +1365,7 @@ guint32 no_ddi_entries, i;
}
/* Check if we have conversation info */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
p_conv = find_conversation(actx->pinfo->fd->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr,
PT_UDP,
nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B);
@@ -1390,7 +1390,7 @@ guint32 no_ddi_entries, i;
);*/
}
-/* COPY_ADDRESS(&(nbap_edch_port_info->crnc_address[e_dch_macdflow_id]),&dst_addr);*/
+/* copy_address(&(nbap_edch_port_info->crnc_address[e_dch_macdflow_id]),&dst_addr);*/
p_conv_data->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present;
/* Figure out which type of E-DCH frame, based on DDI value (DDI = 0 => type 2)*/
@@ -1424,9 +1424,9 @@ BindingID_port = 0;
* Basically the idea here is that we create a new converation (Which is ok? maybe?)
* And then hijack the old conversation and let lower tree items configure that hijacked data.
* */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
old_conversation = find_conversation(actx->pinfo->fd->num,&dst_addr,
&null_addr, PT_UDP, BindingID_port,
@@ -1481,7 +1481,7 @@ BindingID_port = 0;
}
/* Set address for collection of DDI entries */
- COPY_ADDRESS(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr);
+ copy_address(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr);
nbap_edch_channel_info[e_dch_macdflow_id].crnc_port = BindingID_port;
@@ -1543,7 +1543,7 @@ num_items = 1;
/*Do the configurations*/
/* Check if we have conversation info */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
p_conv = find_conversation(actx->pinfo->fd->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr,
PT_UDP,
nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B);
@@ -1568,7 +1568,7 @@ num_items = 1;
);*/
}
-/* COPY_ADDRESS(&(nbap_edch_port_info->crnc_address[e_dch_macdflow_id]),&dst_addr);*/
+/* copy_address(&(nbap_edch_port_info->crnc_address[e_dch_macdflow_id]),&dst_addr);*/
p_conv_data->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present;
/* Figure out which type of E-DCH frame, based on DDI value (DDI = 0 => type 2)*/
@@ -1715,10 +1715,10 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
return offset;
}
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
/* Set address for collection of HSDSCH entries */
- COPY_ADDRESS(&(nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_address),&dst_addr);
+ copy_address(&(nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_address),&dst_addr);
nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_port = BindingID_port;
@@ -1778,7 +1778,7 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
}
/* Set port to zero use that as an indication of whether we have data or not */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
for (i = 0; i < maxNrOfMACdFlows; i++) {
if (nbap_hsdsch_channel_info[i].crnc_port != 0){
nbap_debug("Frame %%u HSDSCH-MACdFlows-Information:hsdsch_macdflow_id %%u Look for conv on IP %%s Port %%u",
@@ -1854,10 +1854,10 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
return offset;
}
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
/* Set address for collection of HSDSCH entries */
- COPY_ADDRESS(&(nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_address),&dst_addr);
+ copy_address(&(nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_address),&dst_addr);
nbap_hsdsch_channel_info[hsdsch_macdflow_id].crnc_port = BindingID_port;
@@ -1891,7 +1891,7 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
}
/* Set port to zero use that as an indication of whether we have data or not */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
nbap_debug("Frame %%u HSDSCH-MACdFlows-Information Start",
actx->pinfo->fd->num);
@@ -1986,10 +1986,10 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
return offset;
}
- SET_ADDRESS(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
+ set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4);
/* Set address for collection of common entries */
- COPY_ADDRESS(&(nbap_common_channel_info[common_macdflow_id].crnc_address),&dst_addr);
+ copy_address(&(nbap_common_channel_info[common_macdflow_id].crnc_address),&dst_addr);
nbap_common_channel_info[common_macdflow_id].crnc_port = BindingID_port;
@@ -2025,7 +2025,7 @@ int i;
return offset;
}
/* Set port to zero use that as an indication of whether we have data or not */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
for (i = 0; i < maxNrOfCommonMACFlows; i++) {
if (nbap_common_channel_info[i].crnc_port != 0){
@@ -2120,7 +2120,7 @@ int i;
}
/*Find the conversations assoicated with the HS-DSCH flows in this packet and set proper H-RNTI*/
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
for (i = 0; i < maxNrOfMACdFlows; i++) {
if (nbap_hsdsch_channel_info[i].crnc_port != 0){
conversation = find_conversation(actx->pinfo->fd->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr,
diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c
index 29ae5e718c..6b024a4641 100644
--- a/asn1/nbap/packet-nbap-template.c
+++ b/asn1/nbap/packet-nbap-template.c
@@ -348,7 +348,7 @@ static void add_hsdsch_bind(packet_info *pinfo){
}
/* Set port to zero use that as an indication of whether we have data or not */
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
for (i = 0; i < maxNrOfMACdFlows; i++) {
if (nbap_hsdsch_channel_info[i].crnc_port != 0){
conversation = find_conversation(pinfo->fd->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr,
diff --git a/asn1/pcap/pcap.cnf b/asn1/pcap/pcap.cnf
index 78bc3ee70c..1bdb0b8097 100644
--- a/asn1/pcap/pcap.cnf
+++ b/asn1/pcap/pcap.cnf
@@ -427,4 +427,4 @@ PositionPeriodicResult N pcap.proc.imsg id-PositionPeriodicResult
PositionPeriodicTermination N pcap.proc.imsg id-PositionPeriodicTermination
-#.END \ No newline at end of file
+#.END
diff --git a/asn1/sbc-ap/sbc-ap.cnf b/asn1/sbc-ap/sbc-ap.cnf
index cbeeec8a7f..a9b73a450f 100644
--- a/asn1/sbc-ap/sbc-ap.cnf
+++ b/asn1/sbc-ap/sbc-ap.cnf
@@ -175,4 +175,4 @@ Write-Replace-Warning-Response N sbc_ap.proc.sout id-Write-Replace-Warning
Stop-Warning-Request N sbc_ap.proc.imsg id-Stop-Warning
Stop-Warning-Response N sbc_ap.proc.sout id-Stop-Warning
-#.END \ No newline at end of file
+#.END
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c
index 88cc0992d4..58f943211e 100644
--- a/asn1/t38/packet-t38-template.c
+++ b/asn1/t38/packet-t38-template.c
@@ -232,7 +232,7 @@ void t38_add_address(packet_info *pinfo,
return;
}
- SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
+ set_address(&null_addr, AT_NONE, 0, NULL);
/*
* Check if the ip address and port combination is not
@@ -488,7 +488,7 @@ init_t38_info_conv(packet_info *pinfo)
p_add_proto_data(wmem_file_scope(), pinfo, proto_t38, 0, p_t38_packet_conv);
}
- if (ADDRESSES_EQUAL(&p_conv->key_ptr->addr1, &pinfo->net_src)) {
+ if (addresses_equal(&p_conv->key_ptr->addr1, &pinfo->net_src)) {
p_t38_conv_info = &(p_t38_conv->src_t38_info);
p_t38_packet_conv_info = &(p_t38_packet_conv->src_t38_info);
} else {