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
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
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
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
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
Checks if the given packet contains an Ethernet packet (EthernetPacket).- Parameters:
packet- packet- Returns:
- true if the packet contains an Ethernet packet; false otherwise.
-