本文整理汇总了Java中org.jnetpcap.packet.annotate.FieldSetter类的典型用法代码示例。如果您正苦于以下问题:Java FieldSetter类的具体用法?Java FieldSetter怎么用?Java FieldSetter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FieldSetter类属于org.jnetpcap.packet.annotate包,在下文中一共展示了FieldSetter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: address
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Address.
*
* @param values
* the values
*/
@FieldSetter
public void address(byte[][] values) {
for (int i = 0; i < values.length; i++) {
address(i, values[i]);
}
}
示例2: checksum
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Checksum.
*
* @param value
* the value
*/
@FieldSetter
public boolean checksum(int value) {
setUShort(10, value);
return true;
}
示例3: hlen
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Hlen.
*
* @param value
* the value
*/
@FieldSetter
public void hlen(int value) {
int o = getUByte(0) & 0xF0;
o |= value & 0x0F;
setUByte(0, o);
}
示例4: authenticator
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
@FieldSetter
public void authenticator(byte[] value) {
if (value.length != 16) {
throw new IllegalArgumentException("expecting 16 byte array");
}
super.setByteArray(8, value);
}
示例5: hlen
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Hlen.
*
* @param value
* the value
*/
@FieldSetter
public void hlen(int value) {
int o = getUByte(0) & 0xF0;
o |= value & 0x0F;
setUByte(0, o);
}
示例6: identifier
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
@FieldSetter
public void identifier(int value) {
super.setUByte(1, value);
}
示例7: length
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Length.
*
* @param value
* the value
*/
@FieldSetter
public void length(int value) {
setUByte(1, value);
}
示例8: offset
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Offset.
*
* @param value
* the value
*/
@FieldSetter
public void offset(int value) {
setUByte(2, value);
}
示例9: code
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Sets the Ip4.code field. Specifies the optional header type.
* <h3>Header Spec</h3>
* <table border=1>
* <tr>
* <td> Protocol Header:</td>
* <td> Ip4</td>
* </tr>
* <tr>
* <td> Protocol Family:</td>
* <td> Networking</td>
* </tr>
* <tr>
* <td> OSI Layer:</td>
* <td> 3</td>
* </tr>
* <tr>
* <td> Field Property:</td>
* <td> constant offset</td>
* </tr>
* <tr>
* <td> Field Offset:</td>
* <td> getUByte(0) & 0x1F</td>
* </tr>
* </table>
* <h3>Header Diagram</h3>
*
* <pre>
* +------+-----------------+
* | CODE | optional header |
* +------+-----------------+
* </pre>
*
* @param value
* new code value
*/
@FieldSetter
public void code(int value) {
setUByte(0, code() & 0xE0 | value & 0x1F);
}
示例10: compartments
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Compartments.
*
* @param value
* the value
*/
@FieldSetter
public void compartments(int value) {
setUShort(4, value);
}
示例11: control
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Control.
*
* @param value
* the value
*/
@FieldSetter
public void control(int value) {
// TODO: implement Ip4.Security.control field setter
throw new UnsupportedOperationException("Not implemented yet");
}
示例12: streamId
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Stream id.
*
* @param value
* the value
*/
@FieldSetter
public void streamId(int value) {
setUShort(2, value);
}
示例13: source
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Source.
*
* @param value
* the value
*/
@FieldSetter
public void source(byte[] value) {
setByteArray(12, value);
}
示例14: overflow
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Overflow.
*
* @param value
* the value
*/
@FieldSetter
public void overflow(int value) {
setUByte(3, value << 4 | flags());
}
示例15: destination
import org.jnetpcap.packet.annotate.FieldSetter; //导入依赖的package包/类
/**
* Destination.
*
* @param value
* the value
*/
@FieldSetter
public void destination(byte[] value) {
setByteArray(16, value);
}