blob: 754e139f4b34f56c66b97bdfec0b8750fcc21de8 [file] [log] [blame]
Rich Laneb1f347d2013-05-16 16:39:12 -07001-- binary
201 0f # version/type
300 20 # length
400 00 00 02 # xid
5ff fd # port_no
601 02 03 04 05 06 # hw_addr
790 ab cd ef # config
8ff 11 ff 11 # mask
9ca fe 67 89 # advertise
1000 00 00 00 # pad
11-- python
12ofp.message.port_mod(
13 xid=2,
14 port_no=ofp.OFPP_CONTROLLER,
15 hw_addr=[1,2,3,4,5,6],
16 config=0x90ABCDEF,
17 mask=0xFF11FF11,
18 advertise=0xCAFE6789)
Rich Laneccae0312013-07-21 23:34:13 -070019-- c
20obj = of_port_mod_new(OF_VERSION_1_0);
Rich Lane03be4f82013-12-16 17:08:26 -080021of_port_mod_advertise_set(obj, 0xCAFE6789);
22of_port_mod_config_set(obj, 0x90ABCDEF);
Rich Laneccae0312013-07-21 23:34:13 -070023{
24 of_mac_addr_t hw_addr = { { 1, 2, 3, 4, 5, 6 } };
25 of_port_mod_hw_addr_set(obj, hw_addr);
26}
Rich Lane03be4f82013-12-16 17:08:26 -080027of_port_mod_mask_set(obj, 0xFF11FF11);
Rich Laneccae0312013-07-21 23:34:13 -070028of_port_mod_port_no_set(obj, 65533);
29of_port_mod_xid_set(obj, 2);