2 * Copyright 2015 Open Networking Laboratory
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onosproject.openflow.drivers;
18 import org.onosproject.openflow.controller.Dpid;
19 import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
20 import org.projectfloodlight.openflow.types.TableId;
23 * OFDescriptionStatistics Vendor (Manufacturer Desc.): Dell Make (Hardware
24 * Desc.) : OpenFlow 1.3 Reference Userspace Switch Model (Datapath Desc.) :
25 * None Software : Serial : None.
27 //TODO: Knock-off this class as we don't need any switch/app specific
28 //drivers in the south bound layers.
29 public class OFSwitchImplSpringOpenTTPDellOSR extends OFSwitchImplSpringOpenTTP {
31 /* Table IDs to be used for Dell Open Segment Routers*/
32 private static final int DELL_TABLE_VLAN = 17;
33 private static final int DELL_TABLE_TMAC = 18;
34 private static final int DELL_TABLE_IPV4_UNICAST = 30;
35 private static final int DELL_TABLE_MPLS = 25;
36 private static final int DELL_TABLE_ACL = 40;
38 public OFSwitchImplSpringOpenTTPDellOSR(Dpid dpid, OFDescStatsReply desc) {
40 vlanTableId = DELL_TABLE_VLAN;
41 tmacTableId = DELL_TABLE_TMAC;
42 ipv4UnicastTableId = DELL_TABLE_IPV4_UNICAST;
43 mplsTableId = DELL_TABLE_MPLS;
44 aclTableId = DELL_TABLE_ACL;
48 public TableType getTableType(TableId tid) {
49 switch (tid.getValue()) {
50 case DELL_TABLE_IPV4_UNICAST:
53 return TableType.MPLS;
57 return TableType.VLAN;
59 return TableType.ETHER;
61 log.error("Table type for Table id {} is not supported in the driver", tid);
62 return TableType.NONE;