blob: 56242cc0ba9f9f7637f369724598ee3dad530ab8 [file] [log] [blame]
Rich Lane9a3f1fd2013-05-10 16:29:17 -07001-- binary
2ff fd # port_no
301 02 03 04 05 06 # hw_addr
466 6f 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 # name
500 00 00 10 # config
600 00 02 00 # state
700 00 00 01 # curr
800 00 00 20 # advertised
900 00 02 00 # supported
1000 00 08 00 # peer
11-- python
12ofp.port_desc(
13 port_no=ofp.OFPP_CONTROLLER,
14 hw_addr=[1,2,3,4,5,6],
15 name="foo",
16 config=ofp.OFPPC_NO_FLOOD,
17 state=ofp.OFPPS_STP_FORWARD,
18 curr=ofp.OFPPF_10MB_HD,
19 advertised=ofp.OFPPF_1GB_FD,
20 supported=ofp.OFPPF_AUTONEG,
21 peer=ofp.OFPPF_PAUSE_ASYM)
Rich Laneccae0312013-07-21 23:34:13 -070022-- c
23obj = of_port_desc_new(OF_VERSION_1_0);
24of_port_desc_advertised_set(obj, 32);
25of_port_desc_config_set(obj, 16);
26of_port_desc_curr_set(obj, 1);
27{
28 of_mac_addr_t hw_addr = { { 1, 2, 3, 4, 5, 6 } };
29 of_port_desc_hw_addr_set(obj, hw_addr);
30}
31{
32 of_port_name_t name = "foo";
33 of_port_desc_name_set(obj, name);
34}
35of_port_desc_peer_set(obj, 2048);
36of_port_desc_port_no_set(obj, 65533);
37of_port_desc_state_set(obj, 512);
38of_port_desc_supported_set(obj, 512);