- All Superinterfaces:
PcapHandler
- Enclosing interface:
PcapHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
NativeCallback
relies on preview features of the Java platform:
NativeCallback
refers to one or more preview APIs:MemorySegment
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A native pcap callback which is called with packets captured using the
Pcap.loop(int, org.jnetpcap.PcapDumper)
or Pcap.dispatch(int, org.jnetpcap.PcapDumper)
calls.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jnetpcap.PcapHandler
PcapHandler.NativeCallback, PcapHandler.OfArray<U>, PcapHandler.OfByteBuffer<U>, PcapHandler.OfMemorySegment<U>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
nativeCallback
(MemorySegmentPREVIEW user, MemorySegmentPREVIEW header, MemorySegmentPREVIEW packet) Receive native packets.
-
Method Details
-
nativeCallback
void nativeCallback(MemorySegmentPREVIEW user, MemorySegmentPREVIEW header, MemorySegmentPREVIEW packet) Receive native packets.- Parameters:
user
- user opaque dataheader
- libpcap headerpacket
- packet data
-
NativeCallback
when preview features are enabled.