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