summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib
AgeCommit message (Collapse)Author
2017-05-09lib/hub: Workaround for issue of eventletIWASE Yusuke
This patch adopts the workaround which is discussing on the eventlet team at the following: https://github.com/eventlet/eventlet/issues/401 This workaround is suggested by Raymond Burkholder. Suggested-by: Raymond Burkholder <ray@oneunified.net> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28ofctl_v1_5: Fix lack of arguments for modify role APISatoshi Fujimoto
ofctl_v1_5 can't send role request messages, because of lack of arguments. This patch fixes it by adding the argument for short_id. ofctl_v1_5 sets None to short_id. It means ofctl_v1_5 uses the default value of short_id. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28ofctl_rest: Add get role APISatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28ofctl: Fix type of fields of DescStatSatoshi Fujimoto
With Python3 and OpenFlow v1.0/v1.2/v1.3, Ryu can't dump the description statistics reply message into JSON, because the message has byte type values. This patch fixes it by using to_jsondict(). Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Implement the utility of Flow Specification for BGPSpeakerShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Fix subtype for Traffic Filtering Actions of Flow SpecificationShinpei Muraoka
This patch sets the constant value so that you can omit argument "subtype" for Traffic Filtering Action of Flow Specification. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Unify variable names for Flow SpecificationShinpei Muraoka
Currently, FLOW_SPEC and FLOWSPEC constants are mixed, so this patch will unify to FLOWSPEC. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Add the address converter for Flow SpecificationShinpei Muraoka
Argument "addr" of "_FlowSpecPrefixBase" must be specified in the network address. If argument "addr" specified in the host address, this patch converts the given address into the network address. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Fix data structure for VPNv4 Flow SpecificationShinpei Muraoka
The Route Distinguisher did not include in data structure for VPNv4 Flow Specification. This patch adds the Route Distinguisher to data structure for VPNv4 Flow Specification. For details, refer to Chapter 8 of RFC 5575. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-28packet/bgp: Implement user interface of Flow SpecificationShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-28hub.StreamServer: Ommit validation for IPv4 addressIWASE Yusuke
To support the case that user specifies the host address like 'localhost', this patch removes the validation of the given address as IPv4 address family and fixes to try listening as IPv4 by default. Then, the validation will be handled in "eventlet.listen()". This behavior is the same as that of before supporting the unix domain socket. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22lib/netdevice: Constants defined in netdevice(7)IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22hub: Enable StreamServer to listen Unix domain socketIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22Implement Zebra protocol client serviceIWASE Yusuke
This patch implements APIs for performing as a protocol daemon of Quagga such as "ripd", "ospfd", "bgpd", for example. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22BGPSpeaker: Support Route Reflector features [RFC4456]IWASE Yusuke
This patch implements the features for acting as a Route Reflector which defined in RFC4456. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17packet/zebra: Enable to specify "prefix" arg in strIWASE Yusuke
Currently, "prefix" argument should be an instance of IPv4Prefix or IPv6Prefix in some Zebra message body classes. But for the convenience, this patch enables to specify "prefix" in the str type representation. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17lib/ip: Add wrapper for netaddr.valid_ipv4/6IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11allow_local_as_in_count : allow local ASN in AS patch, e.g. "rd ↵Albert Siersema
auto/route-target both auto" Cisco/Juniper/Cumulus and undoubtedly more vendors offer a simplification of the EVPN configuration by not having to specify individual RD/RT's, e.g. in Cisco NX-OS syntax: evpn vni 10311 l2 rd auto route-target import auto route-target export auto This simplifies/unifies the configuration. All leaf switches/ryu instances share the same ASN (e.g. 65511). Spine switches in the same layer can share an ASN as well (e.g. 65510). To facilitate the above, the local ASN has to be accepted in the AS path. To this end, Cisco includes an 'allowas-in' configuration statement. See: http://www.cisco.com/c/en/us/products/collateral/switches/nexus-9000-series-switches/guide-c07-734107.html search for "MP-eBGP Design with VTEP Leaf Nodes in the Same BGP Autonomous System" This patch offers the possibility to specify the number of accepted occurrences of the local ASN in incoming AS paths. The default value is 0, which basically is the same as the code before this patch: local ASN in the path indicates a loop. Non-zero values allow the local ASN to appear the specified number of times in the AS path. A maximum value of 3 should satisfy most deployments. Signed-off-by: Albert Siersema <albert@mediacaster.nl>
2017-02-11ofctl_v1_*: Use utility functions of ofctl_utilsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11ofctl_v1_*: Use str_to_int instead of builtin intIWASE Yusuke
This patch fixes lib/ofctl_v1_* to use the utility function str_to_int() instead of the builtin function int(). With this change, lib/ofctl_v1_* can convert the user input values into integer even if non-decimal string values (e.g. hexadecimal "0x80"). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11packet/bgp: Support Flow SpecificationShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11pakcket/bgp: pylintShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23packet/zebra: Add Zebra protocol parserIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14packet lib: adding DHCPv6 supportOlivier DESNOE
Signed-off-by: Olivier DESNOE <olivier.desnoe@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14packet lib: Add packet library of OpenFlowShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06packet/dhcp: Revert b'str' conversionShinpei Muraoka
This patch partially reverts 75e8c58916524243e6796e73c371981e14fff6ee and 536a42d8c1c0be48e78d5f29b6fd55a38012d953. dhcp.boot_file is ascii. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06packet/dhcp: Support fragmented optionsShinpei Muraoka
Currently, if you set fragmented option data for the packet library of dhcp, Traceback occurs. This patch fixes to analyze up to options not corrupting data. The remaining corrupting data will be appended at the end of option list. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29library_bgp_speaker_ref: Fix unexpected unindentShinpei Muraoka
This patch fixes unexpected unindent that occur when building. Also, add ESI type to be specified for argument esi of evpn_prefix_add and evpn_prefix_del. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29packet lib: Add packet library of GeneveShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29packet/gre: Support NVGRE extensionShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29doc: library_packet_ref: Update referencesShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10mrtlib: Add parser for MRT format [RFC6396]IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/ospf: Reduce Pylint warningsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10type_desc: Define TypeDisp class for re-usabilityIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10Add DHCP options constants to DHCP libOmer Anson
Add DHCP options constants to DHCP lib for the following options: * Domain name option (15) * Interface MTU (26) * Classless route (121) These constants are used in Dragonflow, which uses ryu's DHCP lib to construct a DHCP responder. Signed-Off-By: Omer Anson <oaanson@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10lib/ofctl_v_*: Enable to filter flow stats by priorityIWASE Yusuke
OpenFlow Spec does not allow to filter flow entries by priority, but when with a large amount of flow entries, filtering by priority is convenient to get statistics efficiently. This patch enables lib/ofctl_v_* modules to filter flow stats by priority. This patch is suggested by China Shenzhen TICOMM Information Technology Co. Ltd. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/bgp: Fix default of esi for IP Prefix routeIWASE Yusuke
"esi" value should be an instance of EvpnEsi subclass and not int type value, this patch fixes the default value to "None". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10BGPSpeaker: ESI to be optional arg in MAC/IP Adv routeIWASE Yusuke
The ESI field should not be a route key for BGP processing in EVPN MAC/IP Advertisement route, this patch confirms "esi" is an optional argument for this route. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/bgp: Support multiple next_hop in BGPPathAttributeMpReachNLRIIWASE Yusuke
In case of the IPv6 address family in MP-BGP, NLRI might has multipule next_hop addresses (e.g., one is global unicast address and the other is link local unicast address). This patch fixes to support multipule next_hop addresses in MP-BGP NLRIs. For the backward compatibility, this patch make it to stor the first next_hop address as next_hop attribute and all next_hop addresses as next_hop_list. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/bgp: Unpack mpls_label in BGPPathAttributePmsiTunnelIWASE Yusuke
The decoded mpls_labe should be return as a tuple of (mpls_labe, is_bos). This patch fixes to unpack the returned tuple. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10stringify: Add optional attributes list to be displayedIWASE Yusuke
Currently, propery type attributes are ignored in the str and json representations. If we want to include them, it is required to override to_jsondict() and from_jsondict() methods. This patch adds the optional attributes list to specify the addtional attributes included in the str and json representations. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/bgp: Support multiple BGP messages in a packetIWASE Yusuke
This patch fixes to BGPMessage.parser() to return the reference to its own class and to support multiple BGP messages in a single packet. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10BGPSpeaker: Support Ethernet A-D Route and Ethernet Segment RouteShinpei Muraoka
This patch supports Ethernet Auto-discovery Route and Ethernet Segment Route in BGPSpeaker. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10packet/bgp: Fix the ESI Label Extended Community to use mpls_labelShinpei Muraoka
Currently, ESI Label in BGPEvpnEsiLabelExtendedCommunity has 3 byte integer set. This patch fixes to use the mpls_label for ESI Label of BGPEvpnEsiLabelExtendedCommunity. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14RPC: Specify encoding to msgpack.Packer/UnpackerIWASE Yusuke
Currently, RPC requests using rpc_cli.py will crash on Python 3, because the decoded string through msgpack-rpc is not str type when the default encoding is not specified into msgpack.Unpacker. On Python 2, bytes type is the same as str type, and this problem does not occur. The old spec of msgpack had no notation of the encoding, but now, msgpack defines "UTF-8" as the default encoding and has the explicit type definitions for String and Binary. https://github.com/msgpack/msgpack/blob/master/spec.md This patch fixes to specify the encoding to msgpack.Packer/Unpacker and enable to use Binary type when packing for the Python 3 compatibility. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14contrib: Revert module path to ryu.contribIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14packet/bgp: Support for IP Prefix Route encodingShinpei Muraoka
This patch supports on the basis of the [draft-ietf-bess-evpn-prefix-advertisement-03] Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14packet/bgp: Fix the EvpnNLRI to use the ryu.lib.packet.vxlanShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14packet/bgp: Fix the EvpnNLRI to use the ryu.lib.packet.mplsShinpei Muraoka
Also, this patch changes name of is_stack to is_bos. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14packet/bgp: Fix the EvpnNLRI to use the ryu.lib.ipShinpei Muraoka
Also, this patch changes size of ip_len from bit to byte. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>