blob: f23219d780d948d8aee12adfd96b8b7efe77cc50 [file] [log] [blame]
// Copyright 2013, Big Switch Networks, Inc.
//
// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
// the following special exception:
//
// LOXI Exception
//
// As a special exception to the terms of the EPL, you may distribute libraries
// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
// that copyright and licensing notices generated by LoxiGen are not altered or removed
// from the LoxiGen Libraries and the notice provided below is (i) included in
// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
// documentation for the LoxiGen Libraries, if distributed in binary form.
//
// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
//
// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
// a copy of the EPL at:
//
// http://www.eclipse.org/legal/epl-v10.html
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// EPL for the specific language governing permissions and limitations
// under the EPL.
#version any
// BSN Virtual port object header
// FIXME For now, inheritance is not exercised. See below.
struct ofp_bsn_vport {
uint16_t type; /* Discriminate virtual port type */
uint16_t length; /* Length in bytes of this structure with this header */
/* Remainder of data is specific to the port type */
};
// When the ingress or egress VID has this value, no outer tag should be used.
// In this case, the corresponding TPID is ignored.
// #define OF_BSN_VPORT_Q_IN_Q_UNTAGGED 0xffff
// Q-in-Q virtual port specification
struct of_bsn_vport_q_in_q {
uint16_t type; /* 0 */
uint16_t length; /* 16 */
uint32_t port_no; /* OF port number of parent; usually phys port */
uint16_t ingress_tpid;
uint16_t ingress_vlan_id;
uint16_t egress_tpid;
uint16_t egress_vlan_id;
};
// Request from controller to switch to create vport
struct ofp_bsn_virtual_port_create_request {
uint8_t version;
uint8_t type;
uint16_t length;
uint32_t xid;
uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
uint32_t subtype; // BSN_VIRTUAL_PORT_CREATE_REQUEST
// FIXME This should be an instance of the inheritance superclass
of_bsn_vport_q_in_q_t vport; // Description of vport to create
// Additional data follows depending on header type
};
// Reply from switch to controller indicating port number created
// vport_no must be 16 bits to be compatible with 1.0
struct ofp_bsn_virtual_port_create_reply {
uint8_t version;
uint8_t type;
uint16_t length;
uint32_t xid; // Must match create_request
uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
uint32_t subtype; // BSN_VIRTUAL_PORT_CREATE_REPLY
uint32_t vport_no; // The OF port number created. 16-bits for OF 1.0
};
// Request from controller to switch to remove a vport
struct ofp_bsn_virtual_port_remove {
uint8_t version;
uint8_t type;
uint16_t length;
uint32_t xid;
uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
uint32_t subtype; // BSN_VIRTUAL_PORT_REMOVE
uint32_t vport_no; // The OF port number to be removed
};