blob: f23219d780d948d8aee12adfd96b8b7efe77cc50 [file] [log] [blame]
Dan Talaycoc0e802e2013-05-18 23:52:39 -07001// Copyright 2013, Big Switch Networks, Inc.
2//
3// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
4// the following special exception:
5//
6// LOXI Exception
7//
8// As a special exception to the terms of the EPL, you may distribute libraries
9// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
10// that copyright and licensing notices generated by LoxiGen are not altered or removed
11// from the LoxiGen Libraries and the notice provided below is (i) included in
12// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
13// documentation for the LoxiGen Libraries, if distributed in binary form.
14//
15// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
16//
17// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
18// a copy of the EPL at:
19//
20// http://www.eclipse.org/legal/epl-v10.html
21//
22// Unless required by applicable law or agreed to in writing, software
23// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
25// EPL for the specific language governing permissions and limitations
26// under the EPL.
27
28#version any
29
30// BSN Virtual port object header
31// FIXME For now, inheritance is not exercised. See below.
32struct ofp_bsn_vport {
33 uint16_t type; /* Discriminate virtual port type */
34 uint16_t length; /* Length in bytes of this structure with this header */
35 /* Remainder of data is specific to the port type */
36};
37
38
39// When the ingress or egress VID has this value, no outer tag should be used.
40// In this case, the corresponding TPID is ignored.
41// #define OF_BSN_VPORT_Q_IN_Q_UNTAGGED 0xffff
42
43// Q-in-Q virtual port specification
44
45struct of_bsn_vport_q_in_q {
46 uint16_t type; /* 0 */
47 uint16_t length; /* 16 */
48 uint32_t port_no; /* OF port number of parent; usually phys port */
49 uint16_t ingress_tpid;
50 uint16_t ingress_vlan_id;
51 uint16_t egress_tpid;
52 uint16_t egress_vlan_id;
53};
54
55// Request from controller to switch to create vport
56struct ofp_bsn_virtual_port_create_request {
57 uint8_t version;
58 uint8_t type;
59 uint16_t length;
60 uint32_t xid;
61 uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
62 uint32_t subtype; // BSN_VIRTUAL_PORT_CREATE_REQUEST
63 // FIXME This should be an instance of the inheritance superclass
64 of_bsn_vport_q_in_q_t vport; // Description of vport to create
65 // Additional data follows depending on header type
66};
67
68// Reply from switch to controller indicating port number created
69// vport_no must be 16 bits to be compatible with 1.0
70struct ofp_bsn_virtual_port_create_reply {
71 uint8_t version;
72 uint8_t type;
73 uint16_t length;
74 uint32_t xid; // Must match create_request
75 uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
76 uint32_t subtype; // BSN_VIRTUAL_PORT_CREATE_REPLY
77 uint32_t vport_no; // The OF port number created. 16-bits for OF 1.0
78};
79
80// Request from controller to switch to remove a vport
81struct ofp_bsn_virtual_port_remove {
82 uint8_t version;
83 uint8_t type;
84 uint16_t length;
85 uint32_t xid;
86 uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
87 uint32_t subtype; // BSN_VIRTUAL_PORT_REMOVE
88 uint32_t vport_no; // The OF port number to be removed
89};