diff mbox series

[API-NEXT,v2,2/2] helper: remove camelcase from icmp protocol

Message ID 1515610808-27519-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v2,1/2] linux-generic: remove camelcase from icmp protocol | expand

Commit Message

Github ODP bot Jan. 10, 2018, 7 p.m. UTC
From: Bill Fischofer <bill.fischofer@linaro.org>


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>

---
/** Email created from pull request 386 (Bill-Fischofer-Linaro:icmp-camelcase)
 ** https://github.com/Linaro/odp/pull/386
 ** Patch: https://github.com/Linaro/odp/pull/386.patch
 ** Base sha: 6303c7d0e98fafe0f14c8c4dd9989b3b7633ebf4
 ** Merge commit sha: ae40d82e299c9127862e2432fde9301f44537377
 **/
 example/generator/odp_generator.c | 4 ++--
 example/ipsec/odp_ipsec_stream.c  | 6 +++---
 helper/include/odp/helper/ip.h    | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

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 @@  odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream,
 		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;
 	}
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h
index b96aab280..7ef8dbc3d 100644
--- a/helper/include/odp/helper/ip.h
+++ b/helper/include/odp/helper/ip.h
@@ -251,14 +251,14 @@  typedef struct ODP_PACKED {
  * IP protocol values (IPv4:'proto' or IPv6:'next_hdr')
  * @{*/
 #define ODPH_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */
-#define ODPH_IPPROTO_ICMPv4  0x01 /**< Internet Control Message Protocol (1) */
+#define ODPH_IPPROTO_ICMPV4  0x01 /**< Internet Control Message Protocol (1) */
 #define ODPH_IPPROTO_TCP     0x06 /**< Transmission Control Protocol (6) */
 #define ODPH_IPPROTO_UDP     0x11 /**< User Datagram Protocol (17) */
 #define ODPH_IPPROTO_ROUTE   0x2B /**< IPv6 Routing header (43) */
 #define ODPH_IPPROTO_FRAG    0x2C /**< IPv6 Fragment (44) */
 #define ODPH_IPPROTO_AH      0x33 /**< Authentication Header (51) */
 #define ODPH_IPPROTO_ESP     0x32 /**< Encapsulating Security Payload (50) */
-#define ODPH_IPPROTO_ICMPv6  0x3A /**< Internet Control Message Protocol (58) */
+#define ODPH_IPPROTO_ICMPV6  0x3A /**< Internet Control Message Protocol (58) */
 #define ODPH_IPPROTO_INVALID 0xFF /**< Reserved invalid by IANA */
 
 /**@}*/