Signed-off-by: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp> --- ryu/lib/packet/arp.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ryu/lib/packet/arp.py b/ryu/lib/packet/arp.py index f8be59e..35b8a6d 100644 --- a/ryu/lib/packet/arp.py +++ b/ryu/lib/packet/arp.py @@ -16,6 +16,8 @@ import struct from ryu.ofproto import ether +from ryu.lib import ip +from ryu.lib import mac from . import packet_base ARP_HW_TYPE_ETHERNET = 1 # ethernet hardware type @@ -52,8 +54,12 @@ class arp(packet_base.PacketBase): _PACK_STR = '!HHBBH6sI6sI' _MIN_LEN = struct.calcsize(_PACK_STR) - def __init__(self, hwtype, proto, hlen, plen, opcode, - src_mac, src_ip, dst_mac, dst_ip): + def __init__(self, hwtype=ARP_HW_TYPE_ETHERNET, proto=ether.ETH_TYPE_IP, + hlen=6, plen=4, opcode=ARP_REQUEST, + src_mac=mac.haddr_to_bin('ff:ff:ff:ff:ff:ff'), + src_ip=ip.ipv4_to_bin('0.0.0.0'), + dst_mac=mac.haddr_to_bin('ff:ff:ff:ff:ff:ff'), + dst_ip=ip.ipv4_to_bin('0.0.0.0')): super(arp, self).__init__() self.hwtype = hwtype self.proto = proto -- 1.7.12.4 (Apple Git-37) ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel