From patchwork Mon Nov 16 06:21:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Di Proietto X-Patchwork-Id: 544902 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id A22CC14144E for ; Mon, 16 Nov 2015 17:21:43 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 794AC10304; Sun, 15 Nov 2015 22:21:41 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 7438E102FC for ; Sun, 15 Nov 2015 22:21:39 -0800 (PST) Received: from bar4.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 82E0616208D for ; Sun, 15 Nov 2015 23:21:38 -0700 (MST) X-ASG-Debug-ID: 1447654897-03dc21626627be0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar4.cudamail.com with ESMTP id 6SYXpCQeh7Qa1Fol (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 15 Nov 2015 23:21:37 -0700 (MST) X-Barracuda-Envelope-From: diproiettod@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO smtp-outbound-1.vmware.com) (208.91.2.12) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 16 Nov 2015 06:21:37 -0000 Received-SPF: error (mx3-pf1.cudamail.com: error in processing during lookup of vmware.com: DNS problem) X-Barracuda-Apparent-Source-IP: 208.91.2.12 X-Barracuda-RBL-IP: 208.91.2.12 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 110E828851 for ; Sun, 15 Nov 2015 22:21:37 -0800 (PST) Received: from sc9-mailhost3.vmware.com (unknown [10.129.192.239]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id DCB1AB052C; Sun, 15 Nov 2015 22:21:36 -0800 (PST) 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-V1-1114020133 X-CudaMail-DTE: 111515 X-CudaMail-Originating-IP: 208.91.2.12 Date: Sun, 15 Nov 2015 22:21:12 -0800 X-ASG-Orig-Subj: [##CM-V1-1114020133##][PATCH 01/12] packets: Define ICMP types. Message-Id: <1447654883-8097-2-git-send-email-diproiettod@vmware.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447654883-8097-1-git-send-email-diproiettod@vmware.com> References: <1447654883-8097-1-git-send-email-diproiettod@vmware.com> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1447654897 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA 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 01/12] 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 different names for these constants. Windows doesn't define them. It is simpler to redefine them from scratch for OVS. These definitions will be used by a future commit. Signed-off-by: Daniele Di Proietto Acked-by: Ben Pfaff --- lib/packets.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/packets.h b/lib/packets.h index de8d4b6..e1b310c 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -606,9 +606,21 @@ struct ip_header { ovs_16aligned_be32 ip_src; ovs_16aligned_be32 ip_dst; }; - BUILD_ASSERT_DECL(IP_HEADER_LEN == sizeof(struct ip_header)); +/* ICMP types. */ +#define ICMP_ECHO_REPLY 0 +#define ICMP_DST_UNREACH 3 +#define ICMP_SOURCEQUENCH 4 +#define ICMP_REDIRECT 5 +#define ICMP_ECHO_REQUEST 8 +#define ICMP_TIME_EXCEEDED 11 +#define ICMP_PARAM_PROB 12 +#define ICMP_TIMESTAMP 13 +#define ICMP_TIMESTAMPREPLY 14 +#define ICMP_INFOREQUEST 15 +#define ICMP_INFOREPLY 16 + #define ICMP_HEADER_LEN 8 struct icmp_header { uint8_t icmp_type;