📄 ipv6option.java
字号:
package jpcap;
/**
* IPv6偺僆僾僔儑儞僿僢僟傪昞尰偡傞僋儔僗偱偡丅
*/
public class IPv6Option{
/**
* 拞宲揰僆僾僔儑儞
**/
public static final byte HOP_BY_HOP_OPTION=0;
/**
* 宱楬惂屼僆僾僔儑儞
**/
public static final byte ROUTING_OPTION=43;
/**
* 抐曅僆僾僔儑儞
**/
public static final byte FRAGMENT_OPTION=44;
/**
* 僙僉儏儕僥傿儁僀儘乕僪
**/
public static final byte ESP_OPTION=50;
/**
* 擣徹僆僾僔儑儞
**/
public static final byte AH_OPTION=51;
/**
* 師僿僢僟柍偟
**/
public static final byte NONE_OPTION=59;
/**
* 廔揰僆僾僔儑儞
**/
public static final byte DESTINATION_OPTION=60;
/**
* 奼挘僆僾僔儑儞僞僀僾
**/
public byte type;
/**
* 師僿僢僟
**/
public byte next_header;
/**
* 奼挘僿僢僟挿
**/
public byte hlen;
/**
* 僆僾僔儑儞
*/
public byte[] option;
/**
* 儖乕僥傿儞僌僞僀僾乮宱楬惂屼僆僾僔儑儞乯
*/
public byte routing_type;
/**
* 儂僢僾巆悢乮宱楬惂屼僆僾僔儑儞乯
*/
public byte hop_left;
/**
* 宱楬傾僪儗僗乮宱楬惂屼僆僾僔儑儞乯
*/
public IPAddress[] addrs;
/**
* 僆僼僙僢僩乮僼儔僌儊儞僩僆僾僔儑儞乯
*/
public short offset;
/**
* 屻懕僼儔僌乮僼儔僌儊儞僩僆僾僔儑儞乯
*/
public boolean m_flag;
/**
* Identification乮僼儔僌儊儞僩僆僾僔儑儞乯
*/
public int identification;
/**
* SPI乮AH僆僾僔儑儞梡乯
*/
public int spi;
/**
* 僔乕働儞僗斣崋乮AH僆僾僔儑儞梡乯
*/
public int sequence;
void setValue(byte type,byte next,byte hlen){
this.type=type;
this.next_header=next;
this.hlen=hlen;
}
void setOptionData(byte[] option){
this.option=option;
}
void setRoutingOption(byte type,byte left,String[] addrs){
this.routing_type=type;
this.hop_left=left;
this.addrs=new IPAddress[addrs.length];
for(int i=0;i<addrs.length;i++){
try{
this.addrs[i]=new IPAddress(addrs[i]);
}catch(java.net.UnknownHostException e){}
}
}
void setFragmentOption(short offset,boolean m,int ident){
this.offset=offset;
this.m_flag=m;
this.identification=ident;
}
void setAHOption(int spi,int seq){
this.spi=spi;
this.sequence=seq;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -