blob: 7d6b849a6b6de9434ddfd51a4d9baeff48d8d833 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
2* Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior
3* University
4*
5* Licensed under the Apache License, Version 2.0 (the "License"); you may
6* not use this file except in compliance with the License. You may obtain
7* a copy of the License at
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14* License for the specific language governing permissions and limitations
15* under the License.
16**/
17
18/**
19 * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010
20 */
21package org.openflow.protocol.action;
22
23
24import org.jboss.netty.buffer.ChannelBuffer;
25
26
27/**
28 * Represents an ofp_action_strip_vlan
29 * @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010
30 */
31public class OFActionStripVirtualLan extends OFAction {
32 public static int MINIMUM_LENGTH = 8;
33
34 public OFActionStripVirtualLan() {
35 super();
36 super.setType(OFActionType.STRIP_VLAN);
37 super.setLength((short) MINIMUM_LENGTH);
38 }
39
40 @Override
41 public void readFrom(ChannelBuffer data) {
42 super.readFrom(data);
43 // PAD
44 data.readInt();
45 }
46
47 @Override
48 public void writeTo(ChannelBuffer data) {
49 super.writeTo(data);
50 // PAD
51 data.writeInt(0);
52 }
53}