2 * Copyright 2012, Andrew Ferguson, Brown University
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 * not use this file except in compliance with the License. You may obtain
6 * 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, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations
17 package org.openflow.vendor.openflow;
19 import org.openflow.protocol.vendor.OFBasicVendorDataType;
20 import org.openflow.protocol.vendor.OFBasicVendorId;
21 import org.openflow.protocol.vendor.OFVendorId;
23 public class OFOpenFlowVendorExtensions {
24 private static boolean initialized = false;
26 public static synchronized void initialize() {
30 // Configure openflowj to be able to parse the OpenFlow extensions.
31 OFBasicVendorId openflowVendorId =
32 new OFBasicVendorId(OFOpenFlowVendorData.OF_VENDOR_ID, 4);
33 OFVendorId.registerVendorId(openflowVendorId);
35 OFBasicVendorDataType queueModifyVendorData =
36 new OFBasicVendorDataType(OFQueueModifyVendorData.OFP_EXT_QUEUE_MODIFY,
37 OFQueueModifyVendorData.getInstantiable());
38 openflowVendorId.registerVendorDataType(queueModifyVendorData);
40 OFBasicVendorDataType queueDeleteVendorData =
41 new OFBasicVendorDataType(OFQueueDeleteVendorData.OFP_EXT_QUEUE_DELETE,
42 OFQueueModifyVendorData.getInstantiable());
43 openflowVendorId.registerVendorDataType(queueDeleteVendorData);