本文整理汇总了Java中org.jnetpcap.packet.JPacket.State方法的典型用法代码示例。如果您正苦于以下问题:Java JPacket.State方法的具体用法?Java JPacket.State怎么用?Java JPacket.State使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jnetpcap.packet.JPacket
的用法示例。
在下文中一共展示了JPacket.State方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: injectLoop
import org.jnetpcap.packet.JPacket; //导入方法依赖的package包/类
/**
* A special method invokes the real native loop callback with fake pcap
* packets. The loop is used to test for memory leaks and performance that
* bypasses libpcap calls.
*
* @param <T>
* type of user data
* @param cnt
* the cnt
* @param id
* the id
* @param handler
* handler to dispatch the injected packet to
* @param user
* user data
* @param packet
* packet to inject into the loop and callback
* @param state
* the state
* @param header
* pcap header for this packet
* @param scanner
* the scanner
* @return number of packets injected
*/
private native static <T> int injectLoop(
int cnt,
int id,
PcapPacketHandler<T> handler,
T user,
PcapPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner);
示例2: dispatch
import org.jnetpcap.packet.JPacket; //导入方法依赖的package包/类
/**
* Private native implemenation.
*
* @param <T>
* the generic type
* @param cnt
* the cnt
* @param id
* the id
* @param handler
* the handler
* @param user
* the user
* @param packet
* the packet
* @param state
* the state
* @param header
* the header
* @param scanner
* the scanner
* @return the int
*/
private native <T> int dispatch(int cnt,
int id,
JPacketHandler<T> handler,
T user,
JPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner);
示例3: loop
import org.jnetpcap.packet.JPacket; //导入方法依赖的package包/类
/**
* Private native implementation.
*
* @param <T>
* the generic type
* @param cnt
* the cnt
* @param id
* the id
* @param handler
* the handler
* @param user
* the user
* @param packet
* the packet
* @param state
* the state
* @param header
* the header
* @param scanner
* the scanner
* @return the int
*/
@LibraryMember("pcap_loop")
private native <T> int loop(int cnt,
int id,
JPacketHandler<T> handler,
T user,
JPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner);
示例4: loop
import org.jnetpcap.packet.JPacket; //导入方法依赖的package包/类
/**
* Private native implementation.
*
* @param <T>
* the generic type
* @param cnt
* the cnt
* @param id
* the id
* @param handler
* the handler
* @param user
* the user
* @param packet
* the packet
* @param state
* the state
* @param header
* the header
* @param scanner
* the scanner
* @return the int
*/
private native <T> int loop(int cnt,
int id,
JPacketHandler<T> handler,
T user,
JPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner);
示例5: hexdump
import org.jnetpcap.packet.JPacket; //导入方法依赖的package包/类
/**
* Formats the supplied array for single line combined hexdump output using
* all possible options turned on.
*
* @param array
* source array
* @param state
* the state
* @return a multi-line string containing verbose hexdump
*/
public static String hexdump(byte[] array, JPacket.State state) {
return hexdumpCombined(array, 0, 0, true, true, true, markers(state));
}