aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2018-01-09 17:43:36 -0600
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-01-14 17:58:12 +0300
commit88fd84e7e613ce93fc078320b312d2aa8c388a8c (patch)
tree1bc2ffc50afc2ba453330952a45a4ca0513e5427 /example
parent2503425036ca2ee48003ef20fcb87003e5d1e956 (diff)
helper: remove camelcase from icmp protocol
Change ODPH_IPPROTO_ICMPv4 and ODPH_IPPROTO_ICMPv6 to ODPH_IPPROTO_ICMPV4 and ODPH_PROTO_ICMPV6 to eliminate camelcase issues in ODP examples. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bogdan Pricope <bogdan.pricope@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/generator/odp_generator.c4
-rw-r--r--example/ipsec/odp_ipsec_stream.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index b1827e9c9..0fc4c9ccd 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -426,7 +426,7 @@ static odp_packet_t setup_icmp_pkt_ref(odp_pool_t pool,
ip->ttl = 64;
ip->tot_len = odp_cpu_to_be_16(args->appl.payload + ODPH_ICMPHDR_LEN +
ODPH_IPV4HDR_LEN);
- ip->proto = ODPH_IPPROTO_ICMPv4;
+ ip->proto = ODPH_IPPROTO_ICMPV4;
ip->id = 0;
ip->chksum = 0;
@@ -806,7 +806,7 @@ static void print_pkts(int thr, thread_args_t *thr_args,
thr_args->counters.ctr_udp_rcv++;
/* icmp */
- if (ip->proto == ODPH_IPPROTO_ICMPv4) {
+ if (ip->proto == ODPH_IPPROTO_ICMPV4) {
icmp = (odph_icmphdr_t *)(buf + offset);
process_icmp_pkt(thr_args, icmp, msg);
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index c287282e8..3773ce525 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -217,7 +217,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
ip->src_addr = odp_cpu_to_be_32(entry->tun_src_ip);
ip->dst_addr = odp_cpu_to_be_32(entry->tun_dst_ip);
} else {
- ip->proto = ODPH_IPPROTO_ICMPv4;
+ ip->proto = ODPH_IPPROTO_ICMPV4;
ip->src_addr = odp_cpu_to_be_32(stream->src_ip);
ip->dst_addr = odp_cpu_to_be_32(stream->dst_ip);
}
@@ -260,7 +260,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
inner_ip = (odph_ipv4hdr_t *)data;
memset((char *)inner_ip, 0, sizeof(*inner_ip));
inner_ip->ver_ihl = 0x45;
- inner_ip->proto = ODPH_IPPROTO_ICMPv4;
+ inner_ip->proto = ODPH_IPPROTO_ICMPV4;
inner_ip->id = odp_cpu_to_be_16(stream->id);
inner_ip->ttl = 64;
inner_ip->tos = 0;
@@ -518,7 +518,7 @@ clear_packet:
icmp = (odph_icmphdr_t *)(inner_ip + 1);
data = (uint8_t *)icmp;
} else {
- if (ODPH_IPPROTO_ICMPv4 != ip->proto)
+ if (ODPH_IPPROTO_ICMPV4 != ip->proto)
return FALSE;
icmp = (odph_icmphdr_t *)data;
}