📄 ippacket.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Sep 14 11:15:57 JST 2000 --><TITLE>: Class IPPacket</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../jpcap/IPAddress.html"><B>PREV CLASS</B></A> <A HREF="../jpcap/IPv6Option.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="IPPacket.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">jpcap</FONT><BR>Class IPPacket</H2><PRE>java.lang.Object | +--<A HREF="../jpcap/Packet.html">jpcap.Packet</A> | +--<B>jpcap.IPPacket</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../jpcap/ICMPPacket.html">ICMPPacket</A>, <A HREF="../jpcap/TCPPacket.html">TCPPacket</A>, <A HREF="../jpcap/UDPPacket.html">UDPPacket</A></DD></DL><HR><DL><DT>public class <B>IPPacket</B><DT>extends <A HREF="../jpcap/Packet.html">Packet</A></DL><P>This class represents an IP packet.<BR> <BR> Both IPv4 or v6 packet can be handled by this class.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#d_flag">d_flag</A></B></CODE><BR> IP flag bit [D]elay (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#dont_frag">dont_frag</A></B></CODE><BR> Don't fragment flag (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../jpcap/IPAddress.html">IPAddress</A></CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#dst_ip">dst_ip</A></B></CODE><BR> Destionation IP address</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#flow_label">flow_label</A></B></CODE><BR> Flow label (v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#hop_limit">hop_limit</A></B></CODE><BR> Hop limit (Time To Live) (v4/v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#ident">ident</A></B></CODE><BR> IDENTIFICATION (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#length">length</A></B></CODE><BR> Length of this packet (v4/v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#more_frag">more_frag</A></B></CODE><BR> More fragment flag (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#offset">offset</A></B></CODE><BR> Fragment offset (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#options">options</A></B></CODE><BR> Option headers (v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#priority">priority</A></B></CODE><BR> Priority (or class) of this packet (v4/v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#protocol">protocol</A></B></CODE><BR> Protocol of higher layer (v4/v6)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#r_flag">r_flag</A></B></CODE><BR> IP flag bit [R]eliability (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#rsv_frag">rsv_frag</A></B></CODE><BR> Reserved fragmentation flag (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../jpcap/IPAddress.html">IPAddress</A></CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#src_ip">src_ip</A></B></CODE><BR> Source IP address</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#t_flag">t_flag</A></B></CODE><BR> IP flag bit [T]hrough (v4)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#version">version</A></B></CODE><BR> IP version (v4/v6)</TD></TR></TABLE> <A NAME="fields_inherited_from_class_jpcap.Packet"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class jpcap.<A HREF="../jpcap/Packet.html">Packet</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../jpcap/Packet.html#caplen">caplen</A>, <A HREF="../jpcap/Packet.html#data">data</A>, <A HREF="../jpcap/Packet.html#datalink">datalink</A>, <A HREF="../jpcap/Packet.html#sec">sec</A>, <A HREF="../jpcap/Packet.html#usec">usec</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../jpcap/IPPacket.html#IPPacket()">IPPacket</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#setIPv4Parameter(int, boolean, boolean, boolean, boolean, boolean, boolean, int, int, int, int, jpcap.IPAddress, jpcap.IPAddress)">setIPv4Parameter</A></B>(int priority, boolean d_flag, boolean t_flag, boolean r_flag, boolean rsv_frag, boolean dont_frag, boolean more_frag, int offset, int ident, int ttl, int protocol, <A HREF="../jpcap/IPAddress.html">IPAddress</A> src, <A HREF="../jpcap/IPAddress.html">IPAddress</A> dst)</CODE><BR> Sets up the parameters of IPv4</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#setIPv6Parameter(int, int, int, int, jpcap.IPAddress, jpcap.IPAddress)">setIPv6Parameter</A></B>(int cls, int flowlabel, int nxt_hdr, int hop_limit, <A HREF="../jpcap/IPAddress.html">IPAddress</A> src, <A HREF="../jpcap/IPAddress.html">IPAddress</A> dst)</CODE><BR> Sets up the parameters of IPv6</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../jpcap/IPPacket.html#toString()">toString</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -