📄 events-3.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
<TITLE>JNS Event Type Documentation: Packet Events</TITLE>
<LINK HREF="Events-4.html" REL=next>
<LINK HREF="Events-2.html" REL=previous>
<LINK HREF="Events.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="Events-4.html">Next</A>
<A HREF="Events-2.html">Previous</A>
<A HREF="Events.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3. Packet Events</A></H2>
<P>Packet Events are generated whenever something significant occurs in
relation to a packet, for example it might be dropped, received, sent, etc.
All Packet events share the following minimum set of parameters you may
extract for your pleasure:
<UL>
<LI>"Source Address" (IPAddr) - the ultimate source IP of the packet</LI>
<LI>"Destination Address" (IPAddr) - the ultimate destination IP of the packet</LI>
<LI>"Source Hop" (IPAddr) - the IP of the interface the packet just left</LI>
<LI>"Destination Hop" (IPAddr) - the IP of the interface at the other end of the
link the packet is travelling on now</LI>
<LI>"Packet ID" (Integer) - the IP packet id</LI>
<LI>"Packet Protocol" (Integer) - the higher level protocol the packet is
carrying (constants defined in Protocols.java in jns.util)</LI>
<LI>"Packet Length" (Integer) - the length of the packet</LI>
</UL>
<P>
<P>Following now are the descriptions of which kinds of packet events exist.
<P>
<H2><A NAME="ss3.1">3.1 HopEvent</A>
</H2>
<P>A HopEvent is generated whenever a packet leaves an interface and goes onto
a link. It does not carry any additional parameters, just the generic packet
event parameters.
<P>
<H2><A NAME="ss3.2">3.2 ReceiveEvent</A>
</H2>
<P>A ReceiveEvent is generated whenever a packet is received by an interface
from a link. It contains only the generic packet event parameters.
<P>
<H2><A NAME="ss3.3">3.3 EnqueueEvent</A>
</H2>
<P>An interface queue will generate an EnqueueEvent whenever a packet is passed
to it from the IP handler (in case of an outgoing interface) or a packet
is coming in from a link (in case of an incoming interface).
<P>An EnqueueEvent contains all the Packet Event parameters plus the following
additional ones:
<UL>
<LI>"Queue Length" (Integer) - The length of the queue in bytes after
enqueueing the packet</LI>
</UL>
<P>
<P>
<H2><A NAME="ss3.4">3.4 DequeueEvent</A>
</H2>
<P>An interface queue will generate a DequeueEvent whenever a packet is
removed from the queue. This will happen if, for example an IP handler finds
time to read a packet from an interface and the interface dequeues the
packet to pass it in.
<P>A DequeueEvent contains all the Packet Event parameters plus the following
additional ones:
<UL>
<LI>"Queue Length" (Integer) - The length of the queue in bytes after
dequeueing the packet</LI>
</UL>
<P>
<P>
<H2><A NAME="ss3.5">3.5 QueueDropEvent</A>
</H2>
<P>A QueueDropEvent is generated if a queue decides it is too full and drops a
packet. The event contains all parameters that every packet event contains
plus in addition:
<UL>
<LI>"Queue Length" (Integer) - The length of the queue in bytes after
dropping the packet</LI>
</UL>
<P>
<P>
<P>
<H2><A NAME="ss3.6">3.6 LinkDropEvent</A>
</H2>
<P>A LinkDropEvent is generated when a link goes down (i.e. breaks). As you can
imagine, all packets on the link will be lost. This event has no extra fields,
just the ones that occur in every packet event.
<P>
<P>
<HR>
<A HREF="Events-4.html">Next</A>
<A HREF="Events-2.html">Previous</A>
<A HREF="Events.html#toc3">Contents</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -