org.jnetpcap
Class PcapSockAddr

java.lang.Object
  extended by org.jnetpcap.PcapSockAddr

public class PcapSockAddr
extends java.lang.Object

Class peered with native struct sockaddr structure. The class contains the same fields of the counter part C structure. In jNetPcap library its fields are initialized within the native library and returned to java space. The class is readonly, and only provides getter methods.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
static int AF_INET
          Socket family internet version 4
static int AF_INET6
          Socket family internet version 6
 
Constructor Summary
PcapSockAddr()
           
 
Method Summary
 byte[] getData()
          Gets protocol family specifiy array of bytes which contain the protocol's address.
 short getFamily()
          Gets the socket's protocol family identifier.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AF_INET

public static final int AF_INET
Socket family internet version 4

See Also:
Constant Field Values

AF_INET6

public static final int AF_INET6
Socket family internet version 6

See Also:
Constant Field Values
Constructor Detail

PcapSockAddr

public PcapSockAddr()
Method Detail

getFamily

public final short getFamily()
Gets the socket's protocol family identifier.

Returns:
the family

getData

public final byte[] getData()
Gets protocol family specifiy array of bytes which contain the protocol's address. Length of the byte[] is protocol type dependent.

Returns:
the data

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object