Contents

PacketIn

@open_flow13

Scenario: new

  • When I create an OpenFlow message with:
    Pio::PacketIn.new
  • Then the message has the following fields and values:
    fieldvalue
    version4
    transaction_id0
    xid0
    buffer_id0
    total_len0
    reason:no_match
    table_id0
    cookie0
    match.match_fields.size0
    raw_data.length0

Scenario: new (raw_data = ARP request)

  • When I create an OpenFlow message with:
    data_dump = [
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xac, 0x5d, 0x10, 0x31, 0x37,
      0x79, 0x08, 0x06, 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x01,
      0xac, 0x5d, 0x10, 0x31, 0x37, 0x79, 0xc0, 0xa8, 0x02, 0xfe, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xa8, 0x02, 0x05, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00
    ].pack('C*')
    
    Pio::PacketIn.new(raw_data: data_dump)
  • Then the message has the following fields and values:
    fieldvalue
    version4
    transaction_id0
    xid0
    buffer_id0
    total_len60
    reason:no_match
    table_id0
    cookie0
    match.match_fields.size0
    raw_data.length60
    source_macac:5d:10:31:37:79
    destination_macff:ff:ff:ff:ff:ff

Source: features/open_flow13/packet_in.feature at commit 40dd0fb6, Pio (GPL license).