pio 0.30.0 → 0.30.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +6 -49
- data/Rakefile +4 -4
- data/features/{arp.feature → arp/arp.feature} +14 -30
- data/features/arp/arp_reply.feature +69 -0
- data/features/arp/arp_request.feature +67 -0
- data/features/dhcp.feature +157 -162
- data/features/ethernet_header.feature +149 -0
- data/features/icmp/icmp.feature +47 -0
- data/features/icmp/icmp_reply.feature +93 -0
- data/features/icmp/icmp_request.feature +89 -0
- data/features/ipv4_header.feature +89 -0
- data/features/lldp.feature +5 -8
- data/features/open_flow/header.feature +13 -0
- data/features/open_flow/nicira_resubmit.feature +4 -22
- data/features/open_flow/nicira_resubmit_table.feature +6 -16
- data/features/open_flow10/aggregate_stats_reply.feature +5 -7
- data/features/open_flow10/aggregate_stats_request.feature +12 -14
- data/features/open_flow10/bad_request.feature +7 -24
- data/features/open_flow10/barrier_reply.feature +14 -25
- data/features/open_flow10/barrier_request.feature +12 -25
- data/features/open_flow10/description_stats_reply.feature +9 -7
- data/features/open_flow10/description_stats_request.feature +12 -25
- data/features/open_flow10/echo_reply.feature +14 -35
- data/features/open_flow10/echo_request.feature +16 -39
- data/features/open_flow10/enqueue.feature +3 -4
- data/features/open_flow10/exact_match.feature +5 -5
- data/features/open_flow10/features_reply.feature +28 -73
- data/features/open_flow10/features_request.feature +10 -28
- data/features/open_flow10/flow_mod.feature +4 -188
- data/features/open_flow10/flow_removed.feature +28 -30
- data/features/open_flow10/flow_stats_reply.feature +5 -89
- data/features/open_flow10/flow_stats_request.feature +12 -42
- data/features/open_flow10/hello.feature +10 -32
- data/features/open_flow10/hello_failed.feature +7 -57
- data/features/open_flow10/packet_in.feature +130 -49
- data/features/open_flow10/packet_out.feature +29 -18
- data/features/open_flow10/port_stats_request.feature +8 -29
- data/features/open_flow10/port_status.feature +22 -21
- data/features/open_flow10/queue_stats_request.feature +12 -30
- data/features/open_flow10/send_out_port.feature +17 -25
- data/features/open_flow10/set_destination_mac_address.feature +3 -4
- data/features/open_flow10/set_ip_destination_address.feature +3 -4
- data/features/open_flow10/set_source_ip_address.feature +3 -4
- data/features/open_flow10/set_source_mac_address.feature +3 -4
- data/features/open_flow10/set_tos.feature +3 -4
- data/features/open_flow10/set_transport_destination_port.feature +3 -4
- data/features/open_flow10/set_transport_source_port.feature +3 -4
- data/features/open_flow10/set_vlan_priority.feature +3 -4
- data/features/open_flow10/set_vlan_vid.feature +3 -4
- data/features/open_flow10/strip_vlan_header.feature +3 -4
- data/features/open_flow10/table_stats_request.feature +11 -13
- data/features/open_flow10/vendor_action.feature +4 -5
- data/features/open_flow13/apply_actions.feature +15 -18
- data/features/open_flow13/bad_request.feature +7 -13
- data/features/open_flow13/copy_ttl_inwards.feature +13 -0
- data/features/open_flow13/copy_ttl_outwards.feature +13 -0
- data/features/open_flow13/decrement_ip_ttl.feature +11 -0
- data/features/open_flow13/echo_reply.feature +16 -42
- data/features/open_flow13/echo_request.feature +16 -42
- data/features/open_flow13/features_reply.feature +4 -25
- data/features/open_flow13/features_request.feature +7 -36
- data/features/open_flow13/flow_mod.feature +16 -76
- data/features/open_flow13/goto_table.feature +18 -20
- data/features/open_flow13/hello.feature +7 -37
- data/features/open_flow13/hello_failed.feature +7 -30
- data/features/open_flow13/match.feature +239 -248
- data/features/open_flow13/meter.feature +18 -20
- data/features/open_flow13/nicira_conjunction.feature +15 -0
- data/features/open_flow13/nicira_reg_load.feature +27 -42
- data/features/open_flow13/nicira_reg_move.feature +41 -35
- data/features/open_flow13/nicira_send_out_port.feature +21 -13
- data/features/open_flow13/nicira_stack_pop.feature +26 -0
- data/features/open_flow13/nicira_stack_push.feature +26 -0
- data/features/open_flow13/packet_in.feature +7 -34
- data/features/open_flow13/packet_out.feature +7 -45
- data/features/open_flow13/send_out_port.feature +19 -28
- data/features/open_flow13/set_arp_operation.feature +4 -5
- data/features/open_flow13/set_arp_sender_hardware_address.feature +3 -4
- data/features/open_flow13/set_arp_sender_protocol_address.feature +3 -4
- data/features/open_flow13/set_destination_mac_address.feature +3 -4
- data/features/open_flow13/set_ip_ttl.feature +12 -0
- data/features/open_flow13/set_metadata.feature +3 -4
- data/features/open_flow13/set_source_mac_address.feature +3 -4
- data/features/open_flow13/stats_request.feature +4 -7
- data/features/open_flow13/write_metadata.feature +20 -22
- data/features/open_flow_read.feature +24 -5
- data/features/open_flow_version.feature +1 -1
- data/features/parser.feature +8 -9
- data/features/step_definitions/open_flow_steps.rb +11 -16
- data/features/step_definitions/packet_data_steps.rb +16 -32
- data/features/step_definitions/ruby_steps.rb +7 -0
- data/features/step_definitions/show_stats_steps.rb +3 -3
- data/features/support/env.rb +1 -0
- data/features/support/hooks.rb +2 -2
- data/features/udp.feature +26 -27
- data/lib/pio.rb +1 -1
- data/lib/pio/arp.rb +9 -6
- data/lib/pio/arp/format.rb +3 -7
- data/lib/pio/arp/message.rb +8 -4
- data/lib/pio/arp/reply.rb +9 -32
- data/lib/pio/arp/request.rb +9 -33
- data/lib/pio/class_inspector.rb +18 -0
- data/lib/pio/dhcp.rb +2 -2
- data/lib/pio/dhcp/frame.rb +4 -4
- data/lib/pio/dhcp/optional_tlv.rb +3 -3
- data/lib/pio/ethernet_frame.rb +20 -0
- data/lib/pio/ethernet_header.rb +35 -13
- data/lib/pio/icmp.rb +8 -5
- data/lib/pio/icmp/format.rb +19 -22
- data/lib/pio/icmp/message.rb +18 -4
- data/lib/pio/icmp/reply.rb +8 -34
- data/lib/pio/icmp/request.rb +8 -43
- data/lib/pio/instance_inspector.rb +14 -0
- data/lib/pio/ipv4_address.rb +11 -11
- data/lib/pio/ipv4_header.rb +24 -2
- data/lib/pio/lldp/frame.rb +2 -2
- data/lib/pio/lldp/optional_tlv.rb +2 -2
- data/lib/pio/mac.rb +7 -3
- data/lib/pio/message.rb +50 -0
- data/lib/pio/monkey_patch/bindata_record.rb +6 -0
- data/lib/pio/monkey_patch/bindata_string.rb +10 -0
- data/lib/pio/monkey_patch/integer/base_conversions.rb +1 -1
- data/lib/pio/monkey_patch/uint.rb +9 -0
- data/lib/pio/monkey_patch/uint/base_conversions.rb +14 -0
- data/lib/pio/open_flow.rb +38 -52
- data/lib/pio/open_flow/action.rb +8 -4
- data/lib/pio/open_flow/buffer_id.rb +19 -0
- data/lib/pio/open_flow/datapath_id.rb +3 -3
- data/lib/pio/open_flow/error_message.rb +32 -0
- data/lib/pio/open_flow/flags.rb +15 -6
- data/lib/pio/open_flow/flow_match.rb +10 -0
- data/lib/pio/open_flow/header.rb +26 -0
- data/lib/pio/open_flow/hello_failed_code.rb +1 -1
- data/lib/pio/open_flow/instruction.rb +10 -0
- data/lib/pio/open_flow/message.rb +49 -14
- data/lib/pio/open_flow/nicira_resubmit.rb +13 -11
- data/lib/pio/open_flow/nicira_resubmit_table.rb +17 -10
- data/lib/pio/open_flow/parser.rb +19 -0
- data/lib/pio/open_flow/port.rb +2 -2
- data/lib/pio/open_flow/transaction_id.rb +2 -2
- data/lib/pio/open_flow/version.rb +22 -0
- data/lib/pio/open_flow10/actions.rb +16 -16
- data/lib/pio/open_flow10/aggregate_stats/reply.rb +2 -1
- data/lib/pio/open_flow10/aggregate_stats/request.rb +1 -3
- data/lib/pio/open_flow10/barrier/reply.rb +1 -1
- data/lib/pio/open_flow10/barrier/request.rb +1 -1
- data/lib/pio/open_flow10/description_stats/reply.rb +1 -1
- data/lib/pio/open_flow10/description_stats/request.rb +1 -3
- data/lib/pio/open_flow10/echo/reply.rb +3 -3
- data/lib/pio/open_flow10/echo/request.rb +3 -3
- data/lib/pio/open_flow10/enqueue.rb +3 -3
- data/lib/pio/open_flow10/error.rb +3 -13
- data/lib/pio/open_flow10/error/bad_request.rb +5 -29
- data/lib/pio/open_flow10/error/bad_request/bad_request_code.rb +35 -0
- data/lib/pio/open_flow10/error/error_type10.rb +1 -1
- data/lib/pio/open_flow10/error/hello_failed.rb +6 -4
- data/lib/pio/open_flow10/exact_match.rb +12 -10
- data/lib/pio/open_flow10/features/reply.rb +16 -31
- data/lib/pio/open_flow10/features/request.rb +1 -4
- data/lib/pio/open_flow10/flow_mod.rb +8 -33
- data/lib/pio/open_flow10/flow_mod/command.rb +28 -0
- data/lib/pio/open_flow10/flow_removed.rb +2 -17
- data/lib/pio/open_flow10/flow_removed/reason.rb +22 -0
- data/lib/pio/open_flow10/flow_stats/reply.rb +3 -4
- data/lib/pio/open_flow10/flow_stats/request.rb +1 -3
- data/lib/pio/open_flow10/hello.rb +1 -4
- data/lib/pio/open_flow10/match.rb +13 -12
- data/lib/pio/open_flow10/packet_in.rb +32 -28
- data/lib/pio/open_flow10/packet_in/reason.rb +25 -0
- data/lib/pio/open_flow10/packet_out.rb +5 -6
- data/lib/pio/open_flow10/phy_port16.rb +36 -58
- data/lib/pio/open_flow10/port_stats/request.rb +1 -3
- data/lib/pio/open_flow10/port_status.rb +23 -30
- data/lib/pio/open_flow10/port_status/reason.rb +21 -0
- data/lib/pio/open_flow10/queue_stats/request.rb +1 -3
- data/lib/pio/open_flow10/send_out_port.rb +2 -2
- data/lib/pio/open_flow10/set_tos.rb +2 -2
- data/lib/pio/open_flow10/set_transport_port.rb +4 -2
- data/lib/pio/open_flow10/set_vlan_priority.rb +1 -1
- data/lib/pio/open_flow10/set_vlan_vid.rb +1 -1
- data/lib/pio/open_flow10/stats_reply.rb +7 -10
- data/lib/pio/open_flow10/stats_request.rb +16 -15
- data/lib/pio/open_flow10/stats_type.rb +1 -1
- data/lib/pio/open_flow10/table_stats/request.rb +1 -3
- data/lib/pio/open_flow10/vendor_action.rb +22 -20
- data/lib/pio/open_flow13.rb +7 -0
- data/lib/pio/open_flow13/actions.rb +34 -32
- data/lib/pio/open_flow13/apply.rb +25 -22
- data/lib/pio/open_flow13/copy_ttl_inwards.rb +15 -0
- data/lib/pio/open_flow13/copy_ttl_outwards.rb +15 -0
- data/lib/pio/open_flow13/decrement_ip_ttl.rb +15 -0
- data/lib/pio/open_flow13/echo/reply.rb +3 -3
- data/lib/pio/open_flow13/echo/request.rb +3 -3
- data/lib/pio/open_flow13/error.rb +7 -18
- data/lib/pio/open_flow13/error/bad_request.rb +4 -3
- data/lib/pio/open_flow13/error/error_type13.rb +1 -1
- data/lib/pio/open_flow13/error/hello_failed.rb +3 -2
- data/lib/pio/open_flow13/features/reply.rb +9 -16
- data/lib/pio/open_flow13/features/request.rb +1 -1
- data/lib/pio/open_flow13/flow_mod.rb +14 -19
- data/lib/pio/open_flow13/goto_table.rb +26 -24
- data/lib/pio/open_flow13/hello.rb +3 -4
- data/lib/pio/open_flow13/match.rb +173 -9
- data/lib/pio/open_flow13/meter.rb +23 -20
- data/lib/pio/open_flow13/nicira_conjunction.rb +26 -0
- data/lib/pio/open_flow13/nicira_reg_load.rb +44 -24
- data/lib/pio/open_flow13/nicira_reg_move.rb +77 -35
- data/lib/pio/open_flow13/nicira_send_out_port.rb +37 -21
- data/lib/pio/open_flow13/nicira_stack_pop.rb +49 -0
- data/lib/pio/open_flow13/nicira_stack_push.rb +49 -0
- data/lib/pio/open_flow13/packet_in.rb +11 -8
- data/lib/pio/open_flow13/packet_out.rb +9 -8
- data/lib/pio/open_flow13/set_ip_ttl.rb +16 -0
- data/lib/pio/open_flow13/stats_request.rb +2 -4
- data/lib/pio/open_flow13/write_metadata.rb +40 -38
- data/lib/pio/options.rb +8 -3
- data/lib/pio/parser.rb +7 -16
- data/lib/pio/ruby_dumper.rb +69 -0
- data/lib/pio/type/ether_type.rb +31 -0
- data/lib/pio/type/ip_address.rb +8 -0
- data/lib/pio/type/mac_address.rb +10 -0
- data/lib/pio/udp.rb +3 -3
- data/lib/pio/udp_header.rb +1 -1
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +5 -38
- data/spec/pio/arp/reply_spec.rb +0 -4
- data/spec/pio/arp/request_spec.rb +0 -4
- data/spec/pio/arp_spec.rb +0 -4
- data/spec/pio/icmp/reply_spec.rb +4 -8
- data/spec/pio/icmp/request_spec.rb +6 -10
- data/spec/pio/icmp_spec.rb +8 -12
- data/spec/pio/monkey_patch/integer_spec.rb +23 -0
- data/spec/pio/open_flow/nicira_resubmit_spec.rb +19 -0
- data/spec/pio/open_flow/nicira_resubmit_table_spec.rb +20 -0
- data/spec/pio/open_flow10/error/hello_failed_spec.rb +2 -2
- data/spec/pio/open_flow10/flow_mod_spec.rb +24 -24
- data/spec/pio/open_flow10/flow_stats_request_spec.rb +3 -3
- data/spec/pio/open_flow10/hello_spec.rb +0 -2
- data/spec/pio/open_flow10/match_spec.rb +38 -38
- data/spec/pio/open_flow10/packet_out_spec.rb +0 -349
- data/spec/pio/open_flow10/phy_port16_spec.rb +5 -5
- data/spec/pio/open_flow13/error/hello_failed_spec.rb +2 -2
- data/spec/pio/open_flow13/goto_table_spec.rb +2 -2
- data/spec/pio/open_flow13/hello_spec.rb +15 -15
- data/spec/pio/open_flow13/match_spec.rb +29 -29
- data/spec/pio/open_flow13/meter_spec.rb +2 -2
- data/spec/pio/open_flow13/nicira_reg_load_spec.rb +71 -0
- data/spec/pio/open_flow13/nicira_reg_move_spec.rb +40 -0
- data/spec/pio/open_flow13/nicira_send_out_port_spec.rb +29 -0
- data/spec/pio/open_flow13/write_metadata_spec.rb +3 -3
- data/spec/pio/open_flow_spec.rb +6 -6
- data/spec/spec_helper.rb +1 -1
- data/spec/support/shared_examples_for_openflow_messages.rb +5 -13
- metadata +191 -790
- data/LICENSE +0 -674
- data/bin/_guard-core +0 -16
- data/bin/byebug +0 -16
- data/bin/cc-tddium-post-worker +0 -16
- data/bin/cdiff +0 -16
- data/bin/coderay +0 -16
- data/bin/colortab +0 -16
- data/bin/coveralls +0 -16
- data/bin/cucumber +0 -16
- data/bin/decolor +0 -16
- data/bin/flay +0 -16
- data/bin/flog +0 -16
- data/bin/guard +0 -16
- data/bin/htmldiff +0 -16
- data/bin/inch +0 -16
- data/bin/ldiff +0 -16
- data/bin/listen +0 -16
- data/bin/minitar +0 -16
- data/bin/pry +0 -16
- data/bin/rake +0 -16
- data/bin/reek +0 -16
- data/bin/relish +0 -16
- data/bin/restclient +0 -16
- data/bin/rspec +0 -16
- data/bin/rubocop +0 -16
- data/bin/ruby-parse +0 -16
- data/bin/ruby-rewrite +0 -16
- data/bin/ruby_parse +0 -16
- data/bin/ruby_parse_extract_error +0 -16
- data/bin/sparkr +0 -16
- data/bin/term_display +0 -16
- data/bin/term_mandel +0 -16
- data/bin/terminal-notifier +0 -16
- data/bin/thor +0 -16
- data/bin/unparser +0 -16
- data/bin/yard +0 -16
- data/bin/yardoc +0 -16
- data/bin/yri +0 -16
- data/features/arp-storm.pcap +0 -0
- data/features/arp.pcap +0 -0
- data/features/dhcp.pcap +0 -0
- data/features/icmp.feature +0 -130
- data/features/icmp.pcap +0 -0
- data/features/icmpv6.pcap +0 -0
- data/features/lldp.detailed.pcap +0 -0
- data/features/lldp.minimal.pcap +0 -0
- data/features/open_flow10/aggregate_stats_reply.raw +0 -0
- data/features/open_flow10/aggregate_stats_request.raw +0 -0
- data/features/open_flow10/bad_request.raw +0 -0
- data/features/open_flow10/barrier_reply.raw +0 -0
- data/features/open_flow10/barrier_request.raw +0 -0
- data/features/open_flow10/description_stats_reply.raw +0 -0
- data/features/open_flow10/description_stats_request.raw +0 -0
- data/features/open_flow10/echo_reply.raw +0 -0
- data/features/open_flow10/echo_request.raw +0 -0
- data/features/open_flow10/error.raw +0 -0
- data/features/open_flow10/features_reply.raw +0 -0
- data/features/open_flow10/features_request.raw +0 -0
- data/features/open_flow10/flow_mod_add.raw +0 -0
- data/features/open_flow10/flow_mod_delete.raw +0 -0
- data/features/open_flow10/flow_mod_delete_strict.raw +0 -0
- data/features/open_flow10/flow_mod_modify.raw +0 -0
- data/features/open_flow10/flow_mod_modify_strict.raw +0 -0
- data/features/open_flow10/flow_removed.raw +0 -0
- data/features/open_flow10/flow_stats_reply.raw +0 -0
- data/features/open_flow10/flow_stats_request.raw +0 -0
- data/features/open_flow10/get_config_reply.raw +0 -0
- data/features/open_flow10/get_config_request.raw +0 -0
- data/features/open_flow10/hello.raw +0 -0
- data/features/open_flow10/hello_failed.raw +0 -0
- data/features/open_flow10/nx_flow_mod_add.raw +0 -0
- data/features/open_flow10/nx_flow_mod_delete.raw +0 -0
- data/features/open_flow10/nx_flow_mod_delete_strict.raw +0 -0
- data/features/open_flow10/nx_flow_mod_modify.raw +0 -0
- data/features/open_flow10/nx_flow_mod_modify_strict.raw +0 -0
- data/features/open_flow10/nxast_learn.raw +0 -0
- data/features/open_flow10/packet_in.raw +0 -0
- data/features/open_flow10/packet_in_arp_reply.raw +0 -0
- data/features/open_flow10/packet_in_arp_request.raw +0 -0
- data/features/open_flow10/packet_in_cbench.raw +0 -0
- data/features/open_flow10/packet_out.raw +0 -0
- data/features/open_flow10/port_mod.raw +0 -0
- data/features/open_flow10/port_stats_reply.raw +0 -0
- data/features/open_flow10/port_stats_request.raw +0 -0
- data/features/open_flow10/port_status.raw +0 -0
- data/features/open_flow10/queue_get_config_reply.raw +0 -0
- data/features/open_flow10/queue_get_config_request.raw +0 -0
- data/features/open_flow10/queue_stats_request.raw +0 -0
- data/features/open_flow10/set_config.raw +0 -0
- data/features/open_flow10/table_stats_reply.raw +0 -0
- data/features/open_flow10/table_stats_request.raw +0 -0
- data/features/open_flow10/vendor.raw +0 -0
- data/features/open_flow10/vendor_stats_request.raw +0 -0
- data/features/open_flow13/action_copy_ttl_in.raw +0 -0
- data/features/open_flow13/action_copy_ttl_out.raw +0 -0
- data/features/open_flow13/action_dec_mpls_ttl.raw +0 -0
- data/features/open_flow13/action_dec_nw_ttl.raw +0 -0
- data/features/open_flow13/action_group.raw +0 -0
- data/features/open_flow13/action_pop_mpls.raw +0 -0
- data/features/open_flow13/action_pop_pbb.raw +0 -0
- data/features/open_flow13/action_pop_vlan.raw +0 -0
- data/features/open_flow13/action_push_mpls.raw +0 -0
- data/features/open_flow13/action_push_pbb.raw +0 -0
- data/features/open_flow13/action_push_vlan.raw +0 -0
- data/features/open_flow13/action_set_field.raw +0 -0
- data/features/open_flow13/action_set_mpls_ttl.raw +0 -0
- data/features/open_flow13/action_set_nw_ttl.raw +0 -0
- data/features/open_flow13/action_set_queue.raw +0 -0
- data/features/open_flow13/apply_actions.raw +0 -0
- data/features/open_flow13/bad_request.raw +0 -0
- data/features/open_flow13/echo_reply_body.raw +0 -0
- data/features/open_flow13/echo_reply_no_body.raw +0 -0
- data/features/open_flow13/echo_request_body.raw +0 -0
- data/features/open_flow13/echo_request_no_body.raw +0 -0
- data/features/open_flow13/features_reply.raw +0 -0
- data/features/open_flow13/features_request.raw +0 -0
- data/features/open_flow13/flow_add_apply_no_match.raw +0 -0
- data/features/open_flow13/flow_mod_add_apply_no_match.raw +0 -0
- data/features/open_flow13/flow_mod_no_match_or_instructions.raw +0 -0
- data/features/open_flow13/hello_failed.raw +0 -0
- data/features/open_flow13/hello_no_version_bitmap.raw +0 -0
- data/features/open_flow13/hello_version_bitmap.raw +0 -0
- data/features/open_flow13/instruction_clear_actions.raw +0 -0
- data/features/open_flow13/instruction_goto_table.raw +0 -0
- data/features/open_flow13/instruction_meter.raw +0 -0
- data/features/open_flow13/instruction_write_actions.raw +0 -0
- data/features/open_flow13/instruction_write_metadata.raw +0 -0
- data/features/open_flow13/oxm_arp_op_field.raw +0 -0
- data/features/open_flow13/oxm_arp_sha_field.raw +0 -0
- data/features/open_flow13/oxm_arp_spa_field.raw +0 -0
- data/features/open_flow13/oxm_arp_tha_field.raw +0 -0
- data/features/open_flow13/oxm_arp_tpa_field.raw +0 -0
- data/features/open_flow13/oxm_ether_destination_field.raw +0 -0
- data/features/open_flow13/oxm_ether_source_field.raw +0 -0
- data/features/open_flow13/oxm_ether_type_field.raw +0 -0
- data/features/open_flow13/oxm_experimenter_stratos_basic_dot11.raw +0 -0
- data/features/open_flow13/oxm_icmpv4_code_field.raw +0 -0
- data/features/open_flow13/oxm_icmpv4_type_field.raw +0 -0
- data/features/open_flow13/oxm_in_phy_port_field.raw +0 -0
- data/features/open_flow13/oxm_in_port_field.raw +0 -0
- data/features/open_flow13/oxm_invalid_field.raw +0 -0
- data/features/open_flow13/oxm_ip_dscp_field.raw +0 -0
- data/features/open_flow13/oxm_ip_ecn_field.raw +0 -0
- data/features/open_flow13/oxm_ipv4_destination_field.raw +0 -0
- data/features/open_flow13/oxm_ipv4_source_field.raw +0 -0
- data/features/open_flow13/oxm_ipv6_destination_field.raw +0 -0
- data/features/open_flow13/oxm_ipv6_source_field.raw +0 -0
- data/features/open_flow13/oxm_masked_arp_sha_field.raw +0 -0
- data/features/open_flow13/oxm_masked_arp_spa_field.raw +0 -0
- data/features/open_flow13/oxm_masked_arp_tha_field.raw +0 -0
- data/features/open_flow13/oxm_masked_arp_tpa_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ether_destination_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ether_source_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ipv4_destination_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ipv4_source_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ipv6_destination_field.raw +0 -0
- data/features/open_flow13/oxm_masked_ipv6_source_field.raw +0 -0
- data/features/open_flow13/oxm_masked_tunnel_id_field.raw +0 -0
- data/features/open_flow13/oxm_metadata_field.raw +0 -0
- data/features/open_flow13/oxm_metadata_masked_field.raw +0 -0
- data/features/open_flow13/oxm_no_fields.raw +0 -0
- data/features/open_flow13/oxm_sctp_destination_field.raw +0 -0
- data/features/open_flow13/oxm_sctp_source_field.raw +0 -0
- data/features/open_flow13/oxm_tcp_destination_field.raw +0 -0
- data/features/open_flow13/oxm_tcp_field.raw +0 -0
- data/features/open_flow13/oxm_tcp_source_field.raw +0 -0
- data/features/open_flow13/oxm_tunnel_id_field.raw +0 -0
- data/features/open_flow13/oxm_udp_destination_field.raw +0 -0
- data/features/open_flow13/oxm_udp_field.raw +0 -0
- data/features/open_flow13/oxm_udp_source_field.raw +0 -0
- data/features/open_flow13/oxm_vlan_pcp_field.raw +0 -0
- data/features/open_flow13/oxm_vlan_vid_field.raw +0 -0
- data/features/open_flow13/packet_in.raw +0 -0
- data/features/open_flow13/packet_out.raw +0 -0
- data/features/open_flow13/send_out_port.raw +0 -0
- data/features/open_flow13/table_stats_reply.raw +0 -0
- data/features/open_flow13/table_stats_request.raw +0 -0
- data/features/step_definitions/LICENSE +0 -675
- data/features/udp_no_payload.raw +0 -0
- data/features/udp_with_payload.raw +0 -0
- data/lib/pio/icmp/options.rb +0 -21
- data/lib/pio/open_flow/error.rb +0 -19
- data/lib/pio/open_flow/open_flow_header.rb +0 -31
- data/lib/pio/open_flow13/buffer_id.rb +0 -17
- data/spec/pio/arp/reply/options_spec.rb +0 -143
- data/spec/pio/arp/request/options_spec.rb +0 -113
@@ -2,32 +2,34 @@ require 'bindata'
|
|
2
2
|
require 'forwardable'
|
3
3
|
|
4
4
|
module Pio
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
module OpenFlow10
|
6
|
+
# Vendor defined action
|
7
|
+
class VendorAction
|
8
|
+
# OpenFlow 1.0 OFPAT_VENDOR action format.
|
9
|
+
class Format < BinData::Record
|
10
|
+
endian :big
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
uint16 :action_type, value: 0xffff
|
13
|
+
uint16 :action_length, value: 8
|
14
|
+
uint32 :vendor
|
15
|
+
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
def self.read(raw_data)
|
18
|
+
allocate.tap do |strip_vlan|
|
19
|
+
strip_vlan.instance_variable_set :@format, Format.read(raw_data)
|
20
|
+
end
|
19
21
|
end
|
20
|
-
end
|
21
22
|
|
22
|
-
|
23
|
+
extend Forwardable
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
def_delegators :@format, :action_type
|
26
|
+
def_delegator :@format, :action_length, :length
|
27
|
+
def_delegators :@format, :vendor
|
28
|
+
def_delegator :@format, :to_binary_s, :to_binary
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
def initialize(vendor)
|
31
|
+
@format = Format.new(vendor: vendor)
|
32
|
+
end
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
data/lib/pio/open_flow13.rb
CHANGED
@@ -15,14 +15,21 @@ require 'pio/open_flow13/stats_request'
|
|
15
15
|
# Actions
|
16
16
|
require 'pio/open_flow/nicira_resubmit'
|
17
17
|
require 'pio/open_flow/nicira_resubmit_table'
|
18
|
+
require 'pio/open_flow13/copy_ttl_inwards'
|
19
|
+
require 'pio/open_flow13/copy_ttl_outwards'
|
20
|
+
require 'pio/open_flow13/decrement_ip_ttl'
|
18
21
|
require 'pio/open_flow13/nicira_reg_load'
|
19
22
|
require 'pio/open_flow13/nicira_reg_move'
|
20
23
|
require 'pio/open_flow13/nicira_send_out_port'
|
24
|
+
require 'pio/open_flow13/nicira_stack_pop'
|
25
|
+
require 'pio/open_flow13/nicira_stack_push'
|
26
|
+
require 'pio/open_flow13/nicira_conjunction'
|
21
27
|
require 'pio/open_flow13/send_out_port'
|
22
28
|
require 'pio/open_flow13/set_arp_operation'
|
23
29
|
require 'pio/open_flow13/set_arp_sender_hardware_address'
|
24
30
|
require 'pio/open_flow13/set_arp_sender_protocol_address'
|
25
31
|
require 'pio/open_flow13/set_destination_mac_address'
|
32
|
+
require 'pio/open_flow13/set_ip_ttl'
|
26
33
|
require 'pio/open_flow13/set_metadata'
|
27
34
|
require 'pio/open_flow13/set_source_mac_address'
|
28
35
|
|
@@ -1,47 +1,49 @@
|
|
1
1
|
require 'bindata'
|
2
2
|
|
3
3
|
module Pio
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
module OpenFlow13
|
5
|
+
# Actions not yet implemented.
|
6
|
+
class UnsupportedAction < BinData::Record
|
7
|
+
endian :big
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
uint16 :action_type
|
10
|
+
uint16 :action_length
|
11
|
+
string :body, length: -> { action_length - 4 }
|
11
12
|
|
12
|
-
|
13
|
-
|
13
|
+
def to_binary
|
14
|
+
to_binary_s
|
15
|
+
end
|
14
16
|
end
|
15
|
-
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
# Actions list of actions-apply instruction.
|
19
|
+
class Actions13 < BinData::Primitive
|
20
|
+
mandatory_parameter :length
|
20
21
|
|
21
|
-
|
22
|
+
endian :big
|
22
23
|
|
23
|
-
|
24
|
+
string :binary, read_length: :length
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def set(actions)
|
27
|
+
self.binary = Array(actions).map(&:to_binary).join
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
30
|
+
# rubocop:disable MethodLength
|
31
|
+
def get
|
32
|
+
actions = []
|
33
|
+
tmp = binary
|
34
|
+
until tmp.empty?
|
35
|
+
action = case BinData::Uint16be.read(tmp)
|
36
|
+
when 0
|
37
|
+
OpenFlow13::SendOutPort.read(tmp)
|
38
|
+
else
|
39
|
+
UnsupportedAction.read(tmp)
|
40
|
+
end
|
41
|
+
tmp = tmp[action.action_length..-1]
|
42
|
+
actions << action
|
43
|
+
end
|
44
|
+
actions
|
42
45
|
end
|
43
|
-
|
46
|
+
# rubocop:enable MethodLength
|
44
47
|
end
|
45
|
-
# rubocop:enable MethodLength
|
46
48
|
end
|
47
49
|
end
|
@@ -1,36 +1,39 @@
|
|
1
1
|
require 'bindata'
|
2
2
|
require 'forwardable'
|
3
|
+
require 'pio/open_flow/instruction'
|
3
4
|
require 'pio/open_flow13/actions'
|
4
5
|
|
5
6
|
module Pio
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
module OpenFlow13
|
8
|
+
# An instruction to apply a list of actions to a packet in-order.
|
9
|
+
class Apply < OpenFlow::Instruction
|
10
|
+
# OpenFlow 1.3.4 OFPIT_APPLY_ACTIONS instruction format.
|
11
|
+
class Format < BinData::Record
|
12
|
+
endian :big
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
uint16 :instruction_type, value: 4
|
15
|
+
uint16 :instruction_length,
|
16
|
+
initial_value: -> { 8 + actions.binary.length }
|
17
|
+
string :padding, length: 4
|
18
|
+
actions13 :actions, length: -> { instruction_length - 8 }
|
19
|
+
end
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
def self.read(raw_data)
|
22
|
+
allocate.tap do |apply|
|
23
|
+
apply.instance_variable_set :@format, Format.read(raw_data)
|
24
|
+
end
|
22
25
|
end
|
23
|
-
end
|
24
26
|
|
25
|
-
|
27
|
+
extend Forwardable
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
def_delegators :@format, :instruction_type
|
30
|
+
def_delegators :@format, :instruction_length
|
31
|
+
def_delegators :@format, :actions
|
32
|
+
def_delegators :@format, :to_binary_s
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
+
def initialize(actions = [])
|
35
|
+
@format = Format.new(actions: actions)
|
36
|
+
end
|
34
37
|
end
|
35
38
|
end
|
36
39
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'pio/open_flow/action'
|
2
|
+
|
3
|
+
module Pio
|
4
|
+
module OpenFlow13
|
5
|
+
# Copies TTL "inwards" -- from outermost to next-to-outermost
|
6
|
+
class CopyTtlInwards < OpenFlow::Action
|
7
|
+
action_header action_type: 12, action_length: 8
|
8
|
+
string :padding, length: 4
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super({})
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'pio/open_flow/action'
|
2
|
+
|
3
|
+
module Pio
|
4
|
+
module OpenFlow13
|
5
|
+
# Copies TTL "outwards" -- from next-to-outermost to outermost
|
6
|
+
class CopyTtlOutwards < OpenFlow::Action
|
7
|
+
action_header action_type: 11, action_length: 8
|
8
|
+
string :padding, length: 4
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super({})
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'pio/open_flow/action'
|
2
|
+
|
3
|
+
module Pio
|
4
|
+
module OpenFlow13
|
5
|
+
# Decrements IP TTL
|
6
|
+
class DecrementIpTtl < OpenFlow::Action
|
7
|
+
action_header action_type: 24, action_length: 8
|
8
|
+
string :padding, length: 4
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super({})
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -5,10 +5,10 @@ module Pio
|
|
5
5
|
module Echo
|
6
6
|
# OpenFlow 1.3 Echo Reply message.
|
7
7
|
class Reply < OpenFlow::Message
|
8
|
-
open_flow_header version: 4,
|
9
|
-
string :body, read_length: -> {
|
8
|
+
open_flow_header version: 4, type: 3
|
9
|
+
string :body, read_length: -> { length - 8 }
|
10
10
|
|
11
|
-
|
11
|
+
alias user_data body
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -5,10 +5,10 @@ module Pio
|
|
5
5
|
module Echo
|
6
6
|
# OpenFlow 1.3 Echo Request message.
|
7
7
|
class Request < OpenFlow::Message
|
8
|
-
open_flow_header version: 4,
|
9
|
-
string :body, read_length: -> {
|
8
|
+
open_flow_header version: 4, type: 2
|
9
|
+
string :body, read_length: -> { length - header_length }
|
10
10
|
|
11
|
-
|
11
|
+
alias user_data body
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,33 +1,22 @@
|
|
1
|
+
require 'pio/open_flow/error_message'
|
2
|
+
require 'pio/open_flow13/error/bad_request'
|
1
3
|
require 'pio/open_flow13/error/error_type13'
|
4
|
+
require 'pio/open_flow13/error/hello_failed'
|
2
5
|
|
3
6
|
module Pio
|
4
7
|
module OpenFlow13
|
5
8
|
# Error message parser
|
6
9
|
module Error
|
10
|
+
mattr_reader(:type) { 1 }
|
11
|
+
|
12
|
+
extend OpenFlow::ErrorMessage
|
13
|
+
|
7
14
|
# Error message body parser.
|
8
15
|
class BodyParser < BinData::Record
|
9
16
|
endian :big
|
10
17
|
error_type13 :error_type
|
11
18
|
uint16 :error_code
|
12
19
|
end
|
13
|
-
|
14
|
-
# rubocop:disable MethodLength
|
15
|
-
def self.read(binary)
|
16
|
-
body = OpenFlowHeaderParser.read(binary).body
|
17
|
-
error = BodyParser.read(body).snapshot
|
18
|
-
klass = case error.error_type
|
19
|
-
when :hello_failed
|
20
|
-
HelloFailed
|
21
|
-
when :bad_request
|
22
|
-
BadRequest
|
23
|
-
else
|
24
|
-
# Not implemented yet
|
25
|
-
fail 'Unknown error message '\
|
26
|
-
"(type=#{error.error_type}, code=#{error.error_code})"
|
27
|
-
end
|
28
|
-
klass.read binary
|
29
|
-
end
|
30
|
-
# rubocop:enable MethodLength
|
31
20
|
end
|
32
21
|
end
|
33
22
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pio/open_flow/error_message'
|
1
2
|
require 'pio/open_flow/message'
|
2
3
|
require 'pio/open_flow13/error/error_type13'
|
3
4
|
|
@@ -23,7 +24,7 @@ module Pio
|
|
23
24
|
bad_port: 11,
|
24
25
|
bad_packet: 12,
|
25
26
|
multipart_buffer_overflow: 13
|
26
|
-
}
|
27
|
+
}.freeze
|
27
28
|
|
28
29
|
endian :big
|
29
30
|
uint16 :error_code
|
@@ -38,8 +39,8 @@ module Pio
|
|
38
39
|
end
|
39
40
|
|
40
41
|
open_flow_header version: 4,
|
41
|
-
|
42
|
-
|
42
|
+
type: OpenFlow::ErrorMessage.type,
|
43
|
+
length: -> { 12 + raw_data.length }
|
43
44
|
error_type13 :error_type, value: -> { :bad_request }
|
44
45
|
bad_request_code :error_code
|
45
46
|
rest :raw_data
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pio/open_flow/error_message'
|
1
2
|
require 'pio/open_flow/hello_failed_code'
|
2
3
|
require 'pio/open_flow/message'
|
3
4
|
require 'pio/open_flow13/error/error_type13'
|
@@ -8,8 +9,8 @@ module Pio
|
|
8
9
|
# Hello Failed error message
|
9
10
|
class HelloFailed < OpenFlow::Message
|
10
11
|
open_flow_header version: 4,
|
11
|
-
|
12
|
-
|
12
|
+
type: OpenFlow::ErrorMessage.type,
|
13
|
+
length: -> { 12 + description.length }
|
13
14
|
error_type13 :error_type
|
14
15
|
hello_failed_code :error_code
|
15
16
|
rest :description
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pio/open_flow/datapath_id'
|
1
2
|
require 'pio/open_flow/message'
|
2
3
|
|
3
4
|
module Pio
|
@@ -6,8 +7,14 @@ module Pio
|
|
6
7
|
class Features
|
7
8
|
# Features Reply message.
|
8
9
|
class Reply < OpenFlow::Message
|
9
|
-
|
10
|
-
|
10
|
+
open_flow_header version: 4, type: 6, length: 32
|
11
|
+
datapath_id :datapath_id
|
12
|
+
alias dpid datapath_id
|
13
|
+
uint32 :n_buffers
|
14
|
+
uint8 :n_tables
|
15
|
+
uint8 :auxiliary_id
|
16
|
+
uint16 :padding
|
17
|
+
hide :padding
|
11
18
|
flags_32bit(:capabilities,
|
12
19
|
[:flow_stats,
|
13
20
|
:table_stats,
|
@@ -18,21 +25,7 @@ module Pio
|
|
18
25
|
:queue_stats,
|
19
26
|
:NOT_USED,
|
20
27
|
:port_blocked])
|
21
|
-
|
22
|
-
open_flow_header version: 4, message_type: 6, message_length: 32
|
23
|
-
datapath_id :datapath_id
|
24
|
-
uint32 :n_buffers
|
25
|
-
uint8 :n_tables
|
26
|
-
uint8 :auxiliary_id
|
27
|
-
uint16 :padding
|
28
|
-
hide :padding
|
29
|
-
capabilities :capabilities
|
30
28
|
uint32 :reserved
|
31
|
-
|
32
|
-
def datapath_id
|
33
|
-
@format.datapath_id.to_i
|
34
|
-
end
|
35
|
-
alias_method :dpid, :datapath_id
|
36
29
|
end
|
37
30
|
end
|
38
31
|
end
|