Ray Milkey | 7ec0d1b | 2015-11-13 08:51:35 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame^] | 2 | * Copyright 2015-present Open Networking Laboratory |
Ray Milkey | 7ec0d1b | 2015-11-13 08:51:35 -0800 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | package org.onosproject.openflow; |
| 17 | |
| 18 | import org.projectfloodlight.openflow.protocol.OFPacketIn; |
| 19 | import org.projectfloodlight.openflow.protocol.OFPacketInReason; |
| 20 | import org.projectfloodlight.openflow.protocol.OFType; |
| 21 | import org.projectfloodlight.openflow.protocol.match.Match; |
| 22 | import org.projectfloodlight.openflow.types.OFBufferId; |
| 23 | import org.projectfloodlight.openflow.types.OFPort; |
| 24 | import org.projectfloodlight.openflow.types.TableId; |
| 25 | import org.projectfloodlight.openflow.types.U64; |
| 26 | |
| 27 | /** |
| 28 | * Mock of the Open Flow packet in message. |
| 29 | */ |
| 30 | public 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 | } |