Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 00 01 # type |
| 3 | 00 3C # length |
| 4 | 80 00 # oxm_list[0].class |
| 5 | 05 10 # oxm_list[0].type_len - METADATA |
| 6 | FE DC BA 98 12 14 12 10 # oxm_list[0].value |
| 7 | FF FF FF FF 12 34 56 78 # oxm_list[0].mask |
| 8 | 80 00 # oxm_list[1].class |
| 9 | 08 06 # oxm_list[1].type_len - ETH_SRC |
| 10 | 01 02 03 04 05 06 # oxm_list[1].value |
| 11 | 80 00 # oxm_list[2].class |
| 12 | 20 02 # oxm_list[2].type_len - UDP_DST |
| 13 | 00 35 # oxm_list[2].value |
| 14 | 80 00 # oxm_list[3].class |
| 15 | 36 10 # oxm_list[4].type_len - IPV6_DST |
| 16 | 12 12 12 12 12 12 12 12 # oxm_list[4].value |
| 17 | 12 12 12 12 12 12 12 12 # ... |
| 18 | 00 00 00 00 # pad |
| 19 | -- python |
| 20 | ofp.match([ |
| 21 | ofp.oxm.metadata_masked(0xFEDCBA9812141210, 0xFFFFFFFF12345678), |
| 22 | ofp.oxm.eth_src([1,2,3,4,5,6]), |
| 23 | ofp.oxm.udp_dst(53), |
| 24 | ofp.oxm.ipv6_dst("\x12" * 16), |
| 25 | ]) |
| 26 | -- java |
| 27 | builder |
| 28 | .setMasked(MatchField.METADATA, OFMetadata.ofRaw(0xFEDCBA9812141210l), OFMetadata.ofRaw(0xFFFFFFFF12345678l)) |
| 29 | .setExact(MatchField.ETH_SRC, MacAddress.of(new byte[] {1,2,3,4,5,6})) |
| 30 | .setExact(MatchField.UDP_DST, TransportPort.of(53)) |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame^] | 31 | .setExact(MatchField.IPV6_DST, IPv6Address.of(new byte[] { 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, |
| 32 | 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 })) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 33 | |