- java.lang.Object
-
- org.pcap4j.util.Packets
-
public final class Packets extends java.lang.ObjectA utility class for operating on packets.- Since:
- pcap4j 1.7.2
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePackets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontainsEthernetPacket(Packet packet)Checks if the given packet contains an Ethernet packet (EthernetPacket).static booleancontainsIpPacket(Packet packet)Checks if the given packet contains an IP packet (IpPacket).static booleancontainsIpV4Packet(Packet packet)Checks if the given packet contains an IPv4 packet (IpV4Packet).static booleancontainsIpV6Packet(Packet packet)Checks if the given packet contains an IPv6 packet (IpV6Packet).static booleancontainsTcpPacket(Packet packet)Checks if the given packet contains a TCP packet (TcpPacket).static booleancontainsUdpPacket(Packet packet)Checks if the given packet contains a Udp packet (UdpPacket).
-
-
-
Method Detail
-
containsTcpPacket
public static boolean containsTcpPacket(Packet packet)
Checks if the given packet contains a TCP packet (TcpPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains a TCP packet; false otherwise.
-
containsUdpPacket
public static boolean containsUdpPacket(Packet packet)
Checks if the given packet contains a Udp packet (UdpPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains a UDP packet; false otherwise.
-
containsIpV4Packet
public static boolean containsIpV4Packet(Packet packet)
Checks if the given packet contains an IPv4 packet (IpV4Packet).- Parameters:
packet- packet- Returns:
- true if the packet contains an IPv4 packet; false otherwise.
-
containsIpV6Packet
public static boolean containsIpV6Packet(Packet packet)
Checks if the given packet contains an IPv6 packet (IpV6Packet).- Parameters:
packet- packet- Returns:
- true if the packet contains an IPv6 packet; false otherwise.
-
containsIpPacket
public static boolean containsIpPacket(Packet packet)
Checks if the given packet contains an IP packet (IpPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains an IP packet; false otherwise.
-
containsEthernetPacket
public static boolean containsEthernetPacket(Packet packet)
Checks if the given packet contains an Ethernet packet (EthernetPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains an Ethernet packet; false otherwise.
-
-