2012/11/20 FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp>: > On Mon, 19 Nov 2012 21:38:26 +0900 > OHMURA Kei <ohmura....@lab.ntt.co.jp> wrote: > >> Signed-off-by: OHMURA Kei <ohmura....@lab.ntt.co.jp> >> --- >> ryu/lib/packet/arp.py | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/ryu/lib/packet/arp.py b/ryu/lib/packet/arp.py >> index 24ba2c0..fb56aad 100644 >> --- a/ryu/lib/packet/arp.py >> +++ b/ryu/lib/packet/arp.py >> @@ -16,6 +16,15 @@ >> import struct >> from . import packet_base >> >> +ARP_HW_TYPE_ETHERNET = 1 # ethernet hardware type >> +ARP_PROTO_TYPE_IP = 0x0800 # ip protocol type > > Can we use ryu/ofproto/ether.py?
Yes, we can use it. The protocol type value is the same as the ethertype. I removed it. >From 75e78b8d4d9ca93d797a446bade9064bc13538fa Mon Sep 17 00:00:00 2001 From: OHMURA Kei <ohmura....@lab.ntt.co.jp> Date: Mon, 19 Nov 2012 22:04:32 +0900 Subject: [PATCH] packet lib: add arp constants Signed-off-by: OHMURA Kei <ohmura....@lab.ntt.co.jp> --- ryu/lib/packet/arp.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ryu/lib/packet/arp.py b/ryu/lib/packet/arp.py index 24ba2c0..3cef38d 100644 --- a/ryu/lib/packet/arp.py +++ b/ryu/lib/packet/arp.py @@ -16,6 +16,14 @@ import struct from . import packet_base +ARP_HW_TYPE_ETHERNET = 1 # ethernet hardware type + +# arp operation codes +ARP_REQUEST = 1 +ARP_REPLY = 2 +ARP_REV_REQUEST = 3 +ARP_REV_REPLY = 4 + class arp(packet_base.PacketBase): _PACK_STR = '!HHBBH6sI6sI' -- 1.7.9.5 ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel