967ed658df21668075cc1ed8d985cbaa0b9d3bba
1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Vincent Perot - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.pcap
.core
.filter
;
15 import org
.eclipse
.tracecompass
.internal
.pcap
.core
.packet
.Packet
;
16 import org
.eclipse
.tracecompass
.internal
.pcap
.core
.protocol
.PcapProtocol
;
19 * Class used to filter the packets by protocol. This is used, for instance, to
20 * build the packet streams.
22 * @author Vincent Perot
24 public class PacketFilterByProtocol
implements IPacketFilter
{
26 private final PcapProtocol fProtocol
;
29 * Constructor of the PacketFilterByProtocol class.
32 * The protocol that the incoming packets must contain.
34 public PacketFilterByProtocol(PcapProtocol protocol
) {
39 public boolean accepts(Packet packet
) {
40 return packet
.hasProtocol(fProtocol
);
44 * Getter method for the protocol of this filter.
46 * @return The protocol of this filter.
48 public PcapProtocol
getProtocol() {
This page took 0.032909 seconds and 4 git commands to generate.