On Mon, Apr 08, 2013 at 05:24:00PM +0900, FUJITA Tomonori wrote:
> On Mon, 8 Apr 2013 16:39:57 +0900
> Isaku Yamahata <[email protected]> wrote:
>
> > Since ether+ip case is most often used, introduce a convenience function
> > for that.
>
> Not sure about. If you live in real environments, mostly vlan is
> always used.
Probably the commit log was misleading.
How about this commit message? (ether+ip => ether(+vlan)+ip)
> lib/packet/arp.py: add convenience function to create arp for ether(+vlan)+ip
>
> Since ether(+vlan)+ip case is most often used, introduce a convenience
> function for that.
Even if ether + vlan + ip case, ARP packet has the same value
to ether+ip case. i.e.
- hardware ether type as ARP_HW_TYPE_ETHERNET
- protocol as ETH_TYPE_IP
In pseudo code,
ether + ip case
p = Packet(..)
e = ethernet.ethernet(...)
a = arp.arp(ARP_HW_TYPE_ETHERNET, ETH_TYPE_IP, 6, 4, ...) <<<<
p.add_protocols(e)
p.add_protocols(a)
ether + vlan + ip case
p = Packet(..)
e = ethernet.ethernet(...)
v = vlan.vlan(...)
a = arp.arp(ARP_HW_TYPE_ETHERNET, ETH_TYPE_IP, 6, 4, ...) <<<
p.add_protocols(e)
p.add_protocols(v)
p.add_protocols(a)
--
yamahata
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel