Class Packets
java.lang.Object
org.pcap4j.util.Packets
A utility class for operating on packets.
- Since:
- pcap4j 1.7.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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).
-
Constructor Details
-
Packets
private Packets()
-
-
Method Details
-
containsTcpPacket
-
containsUdpPacket
-
containsIpV4Packet
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
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
-
containsEthernetPacket
Checks if the given packet contains an Ethernet packet (EthernetPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains an Ethernet packet; false otherwise.
-