From patchwork Tue May 17 00:56:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Di Proietto X-Patchwork-Id: 622802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3r7zSd4W8zz9sDC for ; Tue, 17 May 2016 10:57:21 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 6634710559; Mon, 16 May 2016 17:57:17 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 996C910554 for ; Mon, 16 May 2016 17:57:15 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 252B84200FD for ; Mon, 16 May 2016 18:57:15 -0600 (MDT) X-ASG-Debug-ID: 1463446634-09eadd7e5175a90001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id VG3DJvbxCqfSu4Wz (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 16 May 2016 18:57:14 -0600 (MDT) X-Barracuda-Envelope-From: diproiettod@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO smtp-outbound-2.vmware.com) (208.91.2.13) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 17 May 2016 00:57:14 -0000 Received-SPF: error (mx1-pf1.cudamail.com: error in processing during lookup of vmware.com: DNS problem) X-Barracuda-Apparent-Source-IP: 208.91.2.13 X-Barracuda-RBL-IP: 208.91.2.13 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 983D5981CE for ; Mon, 16 May 2016 17:57:12 -0700 (PDT) Received: from sc9-mailhost2.vmware.com (htb-1n-eng-dhcp491.eng.vmware.com [10.33.75.235]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id A74CA1854A; Mon, 16 May 2016 17:57:13 -0700 (PDT) X-CudaMail-Envelope-Sender: diproiettod@vmware.com From: Daniele Di Proietto To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-515089890 X-CudaMail-DTE: 051616 X-CudaMail-Originating-IP: 208.91.2.13 Date: Mon, 16 May 2016 17:56:26 -0700 X-ASG-Orig-Subj: [##CM-E1-515089890##][PATCH v3 01/16] packets: Define ICMP types. Message-Id: <1463446601-12916-2-git-send-email-diproiettod@vmware.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1463446601-12916-1-git-send-email-diproiettod@vmware.com> References: <1463446601-12916-1-git-send-email-diproiettod@vmware.com> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1463446634 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-ASG-Whitelist: EmailCat (corporate) Subject: [ovs-dev] [PATCH v3 01/16] packets: Define ICMP types. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Linux and FreeBSD have slightly different names for these constants. Windows doesn't define them. It is simpler to redefine them from scratch for OVS. The new names are different than those used in Linux and FreeBSD. These definitions will be used by a future commit. Signed-off-by: Daniele Di Proietto Acked-by: Joe Stringer Acked-by: Flavio Leitner --- lib/packets.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/packets.h b/lib/packets.h index 2896b78..bf7a809 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -596,9 +596,21 @@ struct ip_header { ovs_16aligned_be32 ip_src; ovs_16aligned_be32 ip_dst; }; - BUILD_ASSERT_DECL(IP_HEADER_LEN == sizeof(struct ip_header)); +/* ICMPv4 types. */ +#define ICMP4_ECHO_REPLY 0 +#define ICMP4_DST_UNREACH 3 +#define ICMP4_SOURCEQUENCH 4 +#define ICMP4_REDIRECT 5 +#define ICMP4_ECHO_REQUEST 8 +#define ICMP4_TIME_EXCEEDED 11 +#define ICMP4_PARAM_PROB 12 +#define ICMP4_TIMESTAMP 13 +#define ICMP4_TIMESTAMPREPLY 14 +#define ICMP4_INFOREQUEST 15 +#define ICMP4_INFOREPLY 16 + #define ICMP_HEADER_LEN 8 struct icmp_header { uint8_t icmp_type;