java.lang.Object
org.jnetpcap.SockAddr
org.jnetpcap.SockAddr.InetSockAddr
- Enclosing class:
SockAddr
Represents an IPv4 socket address (sockaddr_in structure).
Native Structure
struct sockaddr_in {
uint8_t sin_len; // Length of structure (BSD only)
sa_family_t sin_family; // AF_INET
in_port_t sin_port; // Transport layer port
struct in_addr sin_addr; // IPv4 address
char sin_zero[8];// Padding to sockaddr size
};
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jnetpcap.SockAddr
SockAddr.Inet6SockAddr, SockAddr.InetSockAddr, SockAddr.IpxSockAddr, SockAddr.IrdaSockAddr, SockAddr.LinkSockAddr, SockAddr.PacketSockAddr
-
Field Summary
-
Method Summary
Methods inherited from class org.jnetpcap.SockAddr
data, family, familyConstant, isFamily, totalLength
-
Method Details
-
address
public byte[] address()IPv4 address.- Returns:
- address field value
-
port
public int port()Port number in network byte order.- Returns:
- port field value
-
toString
-