- java.lang.Object
-
- org.pcap4j.core.Inets
-
public final class Inets extends java.lang.Object- Since:
- pcap4j 0.9.1
-
-
Field Summary
Fields Modifier and Type Field Description static shortAF_INETAddress family for IPv4.static shortAF_INET6Address family for IPv6.static shortAF_LINKAddress family for link layer interface.static shortAF_PACKETAddress family for low level packet interface.static shortAF_UNSPECUnspecified address family.
-
Constructor Summary
Constructors Modifier Constructor Description privateInets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.net.Inet4AddressitoInetAddress(int i)(package private) static java.net.Inet4AddressntoInetAddress(NativeMappings.in_addr in)(package private) static java.net.Inet6AddressntoInetAddress(NativeMappings.in6_addr in6)
-
-
-
Field Detail
-
AF_UNSPEC
public static final short AF_UNSPEC
Unspecified address family. This value is defined in<sys/socket.h>as 0.- See Also:
- Constant Field Values
-
AF_INET
public static final short AF_INET
Address family for IPv4. This value needs to be the same as AF_INET defined in<sys/socket.h>. This value may vary depending on OS. This value is set to 2 by default and can be changed by setting the propertyorg.pcap4j.af.inet(system property or pcap4j-core.jar/org/pcap4j/pcap4j.properties).- See Also:
Pcap4jPropertiesLoader
-
AF_INET6
public static final short AF_INET6
Address family for IPv6. This value needs to be the same as AF_INET6 defined in<sys/socket.h>. This value varies depending on OS. By default, this value is set to 30 on Mac OS X, 28 on FreeBSD, 10 on Linux, and 23 on the others. This value can be changed by setting the propertyorg.pcap4j.af.inet6(system property or pcap4j-core.jar/org/pcap4j/pcap4j.properties).- See Also:
Pcap4jPropertiesLoader
-
AF_PACKET
public static final short AF_PACKET
Address family for low level packet interface. This value needs to be the same as AF_PACKET defined in<sys/socket.h>. This value may vary depending on OS. This value is set to 17 by default and can be changed by setting the propertyorg.pcap4j.af.packet(system property or pcap4j-core.jar/org/pcap4j/pcap4j.properties).- See Also:
Pcap4jPropertiesLoader
-
AF_LINK
public static final short AF_LINK
Address family for link layer interface. This value needs to be the same as AF_LINK defined in<sys/socket.h>. This value may vary depending on OS. This value is set to 18 by default and can be changed by setting the propertyorg.pcap4j.af.link(system property or pcap4j-core.jar/org/pcap4j/pcap4j.properties).- See Also:
Pcap4jPropertiesLoader
-
-
Method Detail
-
ntoInetAddress
static java.net.Inet4Address ntoInetAddress(NativeMappings.in_addr in)
-
itoInetAddress
static java.net.Inet4Address itoInetAddress(int i)
-
ntoInetAddress
static java.net.Inet6Address ntoInetAddress(NativeMappings.in6_addr in6)
-
-