blob: 67638198d9feab66303cfa6f145c67eaba25f2e3 [file] [log] [blame]
Ray Milkey7ec0d1b2015-11-13 08:51:35 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Ray Milkey7ec0d1b2015-11-13 08:51:35 -08003 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16package org.onosproject.openflow;
17
18import org.projectfloodlight.openflow.protocol.OFPacketIn;
19import org.projectfloodlight.openflow.protocol.OFPacketInReason;
20import org.projectfloodlight.openflow.protocol.OFType;
21import org.projectfloodlight.openflow.protocol.match.Match;
22import org.projectfloodlight.openflow.types.OFBufferId;
23import org.projectfloodlight.openflow.types.OFPort;
24import org.projectfloodlight.openflow.types.TableId;
25import org.projectfloodlight.openflow.types.U64;
26
27/**
28 * Mock of the Open Flow packet in message.
29 */
30public class MockOfPacketIn extends OfMessageAdapter implements OFPacketIn {
31 public MockOfPacketIn() {
32 super(OFType.PACKET_IN);
33 }
34
35 @Override
36 public OFBufferId getBufferId() {
37 return null;
38 }
39
40 @Override
41 public int getTotalLen() {
42 return 0;
43 }
44
45 @Override
46 public OFPacketInReason getReason() {
47 return null;
48 }
49
50 @Override
51 public TableId getTableId() {
52 return null;
53 }
54
55 @Override
56 public Match getMatch() {
57 return null;
58 }
59
60 @Override
61 public byte[] getData() {
62 return new byte[0];
63 }
64
65 @Override
66 public OFPort getInPort() {
67 return null;
68 }
69
70 @Override
71 public OFPort getInPhyPort() {
72 return null;
73 }
74
75 @Override
76 public U64 getCookie() {
77 return null;
78 }
79
80 @Override
81 public OFPacketIn.Builder createBuilder() {
82 return null;
83 }
84}