|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.savarese.vserv.ipq.NetfilterPacket
public class NetfilterPacket
NetfilterPacket encapsulates a data packet received via the
netfilter user space queue. It works in conjunction with NetlinkMessage.getPacket(org.savarese.vserv.ipq.NetfilterPacket).
| Field Summary | |
|---|---|
static int |
HOOK_LOCAL_FORWARD
|
static int |
HOOK_LOCAL_IN
|
static int |
HOOK_LOCAL_OUT
|
static int |
HOOK_POST_ROUTING
|
static int |
HOOK_PRE_ROUTING
|
| Constructor Summary | |
|---|---|
NetfilterPacket()
Creates an empty packet that can be used and reused for calls to NetlinkMessage.getPacket(org.savarese.vserv.ipq.NetfilterPacket). |
|
| Method Summary | |
|---|---|
void |
getHardwareAddress(byte[] address)
Fetches the hardware address as an array of bytes. |
int |
getHardwareAddressLength()
Returns the number of bytes in the hardware address. |
int |
getHardwareProtocol()
|
int |
getHardwareType()
|
int |
getHook()
|
long |
getID()
|
void |
getIncomingInterface(java.lang.StringBuffer buffer)
Writes in a StringBuffer the name of the network interface over which the packet arrived. |
long |
getMark()
|
void |
getOutgoingInterface(java.lang.StringBuffer buffer)
Writes in a StringBuffer the name of the network interface over which the packet is exiting. |
void |
getPacketData(byte[] data)
Fetches the packet data. |
long |
getPacketDataLength()
Returns the number of bytes in the packet data. |
long |
getTimestampMicroseconds()
|
long |
getTimestampSeconds()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HOOK_PRE_ROUTING
public static final int HOOK_LOCAL_IN
public static final int HOOK_LOCAL_FORWARD
public static final int HOOK_LOCAL_OUT
public static final int HOOK_POST_ROUTING
| Constructor Detail |
|---|
public NetfilterPacket()
NetlinkMessage.getPacket(org.savarese.vserv.ipq.NetfilterPacket).
| Method Detail |
|---|
public long getID()
public long getMark()
public long getTimestampSeconds()
public long getTimestampMicroseconds()
public int getHook()
HOOK_ constants, indicating the netfilter hook that
placed this packet on the user space queue.public void getIncomingInterface(java.lang.StringBuffer buffer)
eth0 or
lo.
buffer - The StringBuffer to which the incoming network
interface name should be appened.public void getOutgoingInterface(java.lang.StringBuffer buffer)
eth0 or
lo.
buffer - The StringBuffer to which the outgoing network
interface name should be appened.public int getHardwareProtocol()
public int getHardwareType()
public int getHardwareAddressLength()
getHardwareAddress(byte[]).
public void getHardwareAddress(byte[] address)
address - The array in which to store the address.public long getPacketDataLength()
getPacketData(byte[]).
public void getPacketData(byte[] data)
data - The array in which to store the packet data.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||