[ovs-dev] [PATCH 3/7] ofp-parse: Add "ipv4" and "ip4" shorthand notations.

Justin Pettit jpettit at nicira.com
Tue Aug 25 01:12:34 UTC 2015


This will allow ovs-ofctl to accept them on input and provides some
symmetry with the IPv6 versions.  Documentation was not added, since
output will always be "ip".

Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 lib/ofp-parse.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index ade664b..372d72f 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -179,6 +179,8 @@ parse_protocol(const char *name, const struct protocol **p_out)
 {
     static const struct protocol protocols[] = {
         { "ip", ETH_TYPE_IP, 0 },
+        { "ipv4", ETH_TYPE_IP, 0 },
+        { "ip4", ETH_TYPE_IP, 0 },
         { "arp", ETH_TYPE_ARP, 0 },
         { "icmp", ETH_TYPE_IP, IPPROTO_ICMP },
         { "tcp", ETH_TYPE_IP, IPPROTO_TCP },
-- 
1.7.5.4




More information about the dev mailing list