|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.savarese.vserv.ipq.NetlinkMessage
public class NetlinkMessage
NetlinkMessage encapsulates a Linux netlink datagram. Linux
netlink provides the ability to communicate between kernel modules
and user space processes. NetlinkMessage is used in conjunction
with IPQHandle.read(org.savarese.vserv.ipq.NetlinkMessage, int)
to read from the user
space queue netlink messages containing network packets. Only
NetlinkMessage instances of type TYPE_PACKET
contain
packets. No support is provided for accessing other types of
netlink messages, such as netlink error messages.
Field Summary | |
---|---|
static int |
TYPE_BASE
An unused constant from which the MODE, VERDICT, and PACKET types are derived. |
static int |
TYPE_DONE
End of netlink dump. |
static int |
TYPE_ERROR
An netlink error message type to be ignored. |
static int |
TYPE_MODE
An IPQ mode request message. |
static int |
TYPE_NOOP
A noop message type to be ignored. |
static int |
TYPE_OVERRUN
Indication of loss of data. |
static int |
TYPE_PACKET
An IPQ packet message. |
static int |
TYPE_VERDICT
An IPQ verdict setting message. |
Constructor Summary | |
---|---|
NetlinkMessage()
Same as NetlinkMessage(2048); |
|
NetlinkMessage(int maxLength)
Initializes a netlink message with a given maximum length. |
Method Summary | |
---|---|
protected void |
finalize()
Frees the memory allocated for the netlink message buffer. |
int |
getError()
|
int |
getFlags()
|
int |
getLength()
|
int |
getMaxLength()
|
void |
getPacket(NetfilterPacket packet)
Retrieves a NetfilterPacket from netlink messages of type TYPE_PACKET . |
int |
getSendingProcessID()
|
int |
getSequenceNumber()
|
int |
getType()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_BASE
public static final int TYPE_MODE
public static final int TYPE_VERDICT
public static final int TYPE_PACKET
public static final int TYPE_NOOP
public static final int TYPE_ERROR
public static final int TYPE_DONE
public static final int TYPE_OVERRUN
Constructor Detail |
---|
public NetlinkMessage()
NetlinkMessage(2048);
public NetlinkMessage(int maxLength)
maxLength
- The maximum number of bytes that this netlink
message can store.Method Detail |
---|
protected void finalize() throws java.lang.Throwable
super.finalize()
.
finalize
in class java.lang.Object
java.lang.Throwable
public int getMaxLength()
public int getError()
TYPE_ERROR
netlink message. No special support is provided to interpret the
value, but it corresponds to platform-specific errno values.public int getLength()
public int getType()
TYPE_
constants.public int getFlags()
public int getSequenceNumber()
public int getSendingProcessID()
public void getPacket(NetfilterPacket packet)
TYPE_PACKET
.
packet
- The object in which to store the netfilter packet data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |