⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpsegment.java

📁 一个小型网络仿真器的实现
💻 JAVA
字号:
/*
   JaNetSim  ---  Java Network Simulator
   -------------------------------------

   This software was developed at the Network Research Lab, Faculty of
   Computer Science and Information Technology (FCSIT), University of Malaya.
   This software may be used and distributed freely. FCSIT assumes no responsibility
   whatsoever for its use by other parties, and makes no guarantees, expressed or
   implied, about its quality, reliability, or any other characteristic.

   We would appreciate acknowledgement if the software is used.

   FCSIT ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND
   DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING
   FROM THE USE OF THIS SOFTWARE.
*/

package janetsim.component;

import janetsim.*;

public class TCPSegment implements java.io.Serializable {
  public int sourceport=0; //2 bytes
  public int destport=0; //2 bytes
  public int seg_seq=0; //4 bytes
  public int seg_ack=0; //4 bytes
  public boolean urg=false;
  public boolean ack=false;
  public boolean psh=false;
  public boolean rst=false;
  public boolean syn=false;
  public boolean fin=false;
  public int seg_wnd=0; //2 bytes
  public int urg_ptr=0; //2 bytes

  public int seg_len=0; //payload length in bytes
                        //NOTE: this len DOES include SYN/FIN as 1 octet

  //payload (TCPBuffer objects in a list)
  public java.util.List payload=null;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -