4 # = Rocker switch device
10 # Rocker switch information.
16 # @ports: number of front-panel ports
20 { 'struct': 'RockerSwitch',
21 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
26 # Return rocker switch information.
28 # Returns: @Rocker information
34 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
35 # <- { "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}
111 { 'command': 'query-rocker-ports',
112 'data': { 'name': 'str' },
113 'returns': ['RockerPort'] }
116 # @RockerOfDpaFlowKey:
118 # Rocker switch OF-DPA flow key
120 # @priority: key priority, 0 being lowest priority
122 # @tbl-id: flow table ID
124 # @in-pport: physical input port
126 # @tunnel-id: tunnel ID
130 # @eth-type: Ethernet header type
132 # @eth-src: Ethernet header source MAC address
134 # @eth-dst: Ethernet header destination MAC address
136 # @ip-proto: IP Header protocol field
138 # @ip-tos: IP header TOS field
140 # @ip-dst: IP header destination address
142 # Note: optional members may or may not appear in the flow key
143 # depending if they're relevant to the flow key.
147 { 'struct': 'RockerOfDpaFlowKey',
148 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
149 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
150 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
151 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
154 # @RockerOfDpaFlowMask:
156 # Rocker switch OF-DPA flow mask
158 # @in-pport: physical input port
160 # @tunnel-id: tunnel ID
164 # @eth-src: Ethernet header source MAC address
166 # @eth-dst: Ethernet header destination MAC address
168 # @ip-proto: IP Header protocol field
170 # @ip-tos: IP header TOS field
172 # Note: optional members may or may not appear in the flow mask
173 # depending if they're relevant to the flow mask.
177 { 'struct': 'RockerOfDpaFlowMask',
178 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
179 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
180 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
183 # @RockerOfDpaFlowAction:
185 # Rocker switch OF-DPA flow action
187 # @goto-tbl: next table ID
189 # @group-id: group ID
191 # @tunnel-lport: tunnel logical port ID
195 # @new-vlan-id: new VLAN ID
197 # @out-pport: physical output port
199 # Note: optional members may or may not appear in the flow action
200 # depending if they're relevant to the flow action.
204 { 'struct': 'RockerOfDpaFlowAction',
205 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
206 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
207 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
212 # Rocker switch OF-DPA flow
214 # @cookie: flow unique cookie ID
216 # @hits: count of matches (hits) on flow
222 # @action: flow action
226 { 'struct': 'RockerOfDpaFlow',
227 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
228 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
231 # @query-rocker-of-dpa-flows:
233 # Return rocker OF-DPA flow information.
237 # @tbl-id: flow table ID. If tbl-id is not specified, returns
238 # flow information for all tables.
240 # Returns: rocker OF-DPA flow information
246 # -> { "execute": "query-rocker-of-dpa-flows",
247 # "arguments": { "name": "sw1" } }
248 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
251 # "action": {"goto-tbl": 10},
252 # "mask": {"in-pport": 4294901760}
258 { 'command': 'query-rocker-of-dpa-flows',
259 'data': { 'name': 'str', '*tbl-id': 'uint32' },
260 'returns': ['RockerOfDpaFlow'] }
265 # Rocker switch OF-DPA group
267 # @id: group unique ID
273 # @pport: physical port number
275 # @index: group index, unique with group type
277 # @out-pport: output physical port number
279 # @group-id: next group ID
281 # @set-vlan-id: VLAN ID to set
283 # @pop-vlan: pop VLAN headr from packet
285 # @group-ids: list of next group IDs
287 # @set-eth-src: set source MAC address in Ethernet header
289 # @set-eth-dst: set destination MAC address in Ethernet header
291 # @ttl-check: perform TTL check
293 # Note: optional members may or may not appear in the group depending
294 # if they're relevant to the group type.
298 { 'struct': 'RockerOfDpaGroup',
299 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16',
300 '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
301 '*group-id': 'uint32', '*set-vlan-id': 'uint16',
302 '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
303 '*set-eth-src': 'str', '*set-eth-dst': 'str',
304 '*ttl-check': 'uint8' } }
307 # @query-rocker-of-dpa-groups:
309 # Return rocker OF-DPA group information.
313 # @type: group type. If type is not specified, returns
314 # group information for all group types.
316 # Returns: rocker OF-DPA group information
322 # -> { "execute": "query-rocker-of-dpa-groups",
323 # "arguments": { "name": "sw1" } }
324 # <- { "return": [ {"type": 0, "out-pport": 2,
325 # "pport": 2, "vlan-id": 3841,
326 # "pop-vlan": 1, "id": 251723778},
327 # {"type": 0, "out-pport": 0,
328 # "pport": 0, "vlan-id": 3841,
329 # "pop-vlan": 1, "id": 251723776},
330 # {"type": 0, "out-pport": 1,
331 # "pport": 1, "vlan-id": 3840,
332 # "pop-vlan": 1, "id": 251658241},
333 # {"type": 0, "out-pport": 0,
334 # "pport": 0, "vlan-id": 3840,
335 # "pop-vlan": 1, "id": 251658240}
339 { 'command': 'query-rocker-of-dpa-groups',
340 'data': { 'name': 'str', '*type': 'uint8' },
341 'returns': ['RockerOfDpaGroup'] }