5 # = Rocker switch device
11 # Rocker switch information.
17 # @ports: number of front-panel ports
21 { 'struct': 'RockerSwitch',
22 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
27 # Return rocker switch information.
29 # Returns: @Rocker information
35 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
36 # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
38 { 'command': 'query-rocker',
39 'data': { 'name': 'str' },
40 'returns': 'RockerSwitch' }
45 # An eumeration of port duplex states.
53 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
58 # An eumeration of port autoneg states.
60 # @off: autoneg is off
66 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
71 # Rocker switch port information.
75 # @enabled: port is enabled for I/O
77 # @link-up: physical link is UP on port
79 # @speed: port link speed in Mbps
81 # @duplex: port link duplex
83 # @autoneg: port link autoneg
87 { 'struct': 'RockerPort',
88 'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
89 'speed': 'uint32', 'duplex': 'RockerPortDuplex',
90 'autoneg': 'RockerPortAutoneg' } }
93 # @query-rocker-ports:
95 # Return rocker switch port information.
97 # Returns: a list of @RockerPort information
103 # -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
104 # <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
105 # "autoneg": "off", "link-up": true, "speed": 10000},
106 # {"duplex": "full", "enabled": true, "name": "sw1.2",
107 # "autoneg": "off", "link-up": true, "speed": 10000}
110 { 'command': 'query-rocker-ports',
111 'data': { 'name': 'str' },
112 'returns': ['RockerPort'] }
115 # @RockerOfDpaFlowKey:
117 # Rocker switch OF-DPA flow key
119 # @priority: key priority, 0 being lowest priority
121 # @tbl-id: flow table ID
123 # @in-pport: physical input port
125 # @tunnel-id: tunnel ID
129 # @eth-type: Ethernet header type
131 # @eth-src: Ethernet header source MAC address
133 # @eth-dst: Ethernet header destination MAC address
135 # @ip-proto: IP Header protocol field
137 # @ip-tos: IP header TOS field
139 # @ip-dst: IP header destination address
141 # Note: optional members may or may not appear in the flow key
142 # depending if they're relevant to the flow key.
146 { 'struct': 'RockerOfDpaFlowKey',
147 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
148 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
149 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
150 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
153 # @RockerOfDpaFlowMask:
155 # Rocker switch OF-DPA flow mask
157 # @in-pport: physical input port
159 # @tunnel-id: tunnel ID
163 # @eth-src: Ethernet header source MAC address
165 # @eth-dst: Ethernet header destination MAC address
167 # @ip-proto: IP Header protocol field
169 # @ip-tos: IP header TOS field
171 # Note: optional members may or may not appear in the flow mask
172 # depending if they're relevant to the flow mask.
176 { 'struct': 'RockerOfDpaFlowMask',
177 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
178 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
179 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
182 # @RockerOfDpaFlowAction:
184 # Rocker switch OF-DPA flow action
186 # @goto-tbl: next table ID
188 # @group-id: group ID
190 # @tunnel-lport: tunnel logical port ID
194 # @new-vlan-id: new VLAN ID
196 # @out-pport: physical output port
198 # Note: optional members may or may not appear in the flow action
199 # depending if they're relevant to the flow action.
203 { 'struct': 'RockerOfDpaFlowAction',
204 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
205 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
206 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
211 # Rocker switch OF-DPA flow
213 # @cookie: flow unique cookie ID
215 # @hits: count of matches (hits) on flow
221 # @action: flow action
225 { 'struct': 'RockerOfDpaFlow',
226 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
227 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
230 # @query-rocker-of-dpa-flows:
232 # Return rocker OF-DPA flow information.
236 # @tbl-id: flow table ID. If tbl-id is not specified, returns flow
237 # information for all tables.
239 # Returns: rocker OF-DPA flow information
245 # -> { "execute": "query-rocker-of-dpa-flows",
246 # "arguments": { "name": "sw1" } }
247 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
250 # "action": {"goto-tbl": 10},
251 # "mask": {"in-pport": 4294901760}
256 { 'command': 'query-rocker-of-dpa-flows',
257 'data': { 'name': 'str', '*tbl-id': 'uint32' },
258 'returns': ['RockerOfDpaFlow'] }
263 # Rocker switch OF-DPA group
265 # @id: group unique ID
271 # @pport: physical port number
273 # @index: group index, unique with group type
275 # @out-pport: output physical port number
277 # @group-id: next group ID
279 # @set-vlan-id: VLAN ID to set
281 # @pop-vlan: pop VLAN headr from packet
283 # @group-ids: list of next group IDs
285 # @set-eth-src: set source MAC address in Ethernet header
287 # @set-eth-dst: set destination MAC address in Ethernet header
289 # @ttl-check: perform TTL check
291 # Note: optional members may or may not appear in the group depending
292 # if they're relevant to the group type.
296 { 'struct': 'RockerOfDpaGroup',
297 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16',
298 '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
299 '*group-id': 'uint32', '*set-vlan-id': 'uint16',
300 '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
301 '*set-eth-src': 'str', '*set-eth-dst': 'str',
302 '*ttl-check': 'uint8' } }
305 # @query-rocker-of-dpa-groups:
307 # Return rocker OF-DPA group information.
311 # @type: group type. If type is not specified, returns group
312 # information for all group types.
314 # Returns: rocker OF-DPA group information
320 # -> { "execute": "query-rocker-of-dpa-groups",
321 # "arguments": { "name": "sw1" } }
322 # <- { "return": [ {"type": 0, "out-pport": 2,
323 # "pport": 2, "vlan-id": 3841,
324 # "pop-vlan": 1, "id": 251723778},
325 # {"type": 0, "out-pport": 0,
326 # "pport": 0, "vlan-id": 3841,
327 # "pop-vlan": 1, "id": 251723776},
328 # {"type": 0, "out-pport": 1,
329 # "pport": 1, "vlan-id": 3840,
330 # "pop-vlan": 1, "id": 251658241},
331 # {"type": 0, "out-pport": 0,
332 # "pport": 0, "vlan-id": 3840,
333 # "pop-vlan": 1, "id": 251658240}
336 { 'command': 'query-rocker-of-dpa-groups',
337 'data': { 'name': 'str', '*type': 'uint8' },
338 'returns': ['RockerOfDpaGroup'] }