├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── LICENSE ├── ic_launcher-web.png ├── jni ├── Android.mk ├── analysis.h ├── export.h ├── jnetpcap.cpp ├── jnetpcap_beta.cpp ├── jnetpcap_bpf.cpp ├── jnetpcap_bpf.h ├── jnetpcap_dumper.cpp ├── jnetpcap_dumper.h ├── jnetpcap_ids.cpp ├── jnetpcap_ids.h ├── jnetpcap_pcap_header.cpp ├── jnetpcap_utils.cpp ├── jnetpcap_utils.h ├── libpcap │ ├── Android.mk │ ├── CHANGES │ ├── CREDITS │ ├── ChmodBPF │ │ ├── ChmodBPF │ │ └── StartupParameters.plist │ ├── CleanSpec.mk │ ├── FILES │ ├── INSTALL.txt │ ├── LICENSE │ ├── MODULE_LICENSE_BSD │ ├── Makefile.in │ ├── NOTICE │ ├── README │ ├── README.linux │ ├── TODO │ ├── VERSION │ ├── acconfig.h │ ├── aclocal.m4 │ ├── arcnet.h │ ├── atmuni31.h │ ├── bpf │ │ └── net │ │ │ └── bpf_filter.c │ ├── bpf_dump.c │ ├── bpf_image.c │ ├── config.guess │ ├── config.h │ ├── config.h.in │ ├── config.sub │ ├── configure │ ├── configure.in │ ├── doc │ │ ├── pcap.html │ │ ├── pcap.txt │ │ └── pcap.xml │ ├── etherent.c │ ├── ethertype.h │ ├── fad-getad.c │ ├── fad-gifc.c │ ├── fad-glifc.c │ ├── fad-null.c │ ├── fad-win32.c │ ├── ffs.h │ ├── gencode.c │ ├── gencode.h │ ├── grammar.c │ ├── grammar.y │ ├── inet.c │ ├── install-sh │ ├── lbl │ │ ├── os-aix4.h │ │ ├── os-hpux11.h │ │ ├── os-osf4.h │ │ ├── os-osf5.h │ │ ├── os-solaris2.h │ │ ├── os-sunos4.h │ │ └── os-ultrix4.h │ ├── llc.h │ ├── missing │ │ └── snprintf.c │ ├── mkdep │ ├── nametoaddr.c │ ├── nlpid.h │ ├── optimize.c │ ├── packaging │ │ ├── pcap.spec │ │ └── pcap.spec.in │ ├── pcap-bpf.c │ ├── pcap-bpf.h │ ├── pcap-dag.c │ ├── pcap-dag.h │ ├── pcap-dlpi.c │ ├── pcap-dos.c │ ├── pcap-dos.h │ ├── pcap-enet.c │ ├── pcap-int.h │ ├── pcap-linux.c │ ├── pcap-namedb.h │ ├── pcap-nit.c │ ├── pcap-nit.h │ ├── pcap-null.c │ ├── pcap-pf.c │ ├── pcap-pf.h │ ├── pcap-septel.c │ ├── pcap-septel.h │ ├── pcap-snit.c │ ├── pcap-snoop.c │ ├── pcap-stdinc.h │ ├── pcap-win32.c │ ├── pcap.3 │ ├── pcap.c │ ├── pcap.h │ ├── pcap1.h │ ├── ppp.h │ ├── savefile.c │ ├── scanner.c │ ├── scanner.l │ ├── sll.h │ ├── sunatmpos.h │ ├── tokdefs.h │ ├── version.c │ ├── version.h │ └── wlan_filtering.patch ├── nio_jbuffer.cpp ├── nio_jbuffer.h ├── nio_jmemory.cpp ├── nio_jmemory.h ├── nio_jnumber.cpp ├── org_jnetpcap_Pcap.h ├── org_jnetpcap_PcapAddr.h ├── org_jnetpcap_PcapBpfProgram.h ├── org_jnetpcap_PcapDumper.h ├── org_jnetpcap_PcapHeader.h ├── org_jnetpcap_PcapIf.h ├── org_jnetpcap_PcapPktBuffer.h ├── org_jnetpcap_PcapPktHdr.h ├── org_jnetpcap_PcapSockAddr.h ├── org_jnetpcap_PcapStat.h ├── org_jnetpcap_PcapUtils.h ├── org_jnetpcap_nio_JBuffer.h ├── org_jnetpcap_nio_JMemory.h ├── org_jnetpcap_nio_JMemoryReference.h ├── org_jnetpcap_nio_JNumber.h ├── org_jnetpcap_packet_JFlowKey.h ├── org_jnetpcap_packet_JHeader.h ├── org_jnetpcap_packet_JHeaderScanner.h ├── org_jnetpcap_packet_JHeader_State.h ├── org_jnetpcap_packet_JPacket_State.h ├── org_jnetpcap_packet_JRegistry.h ├── org_jnetpcap_packet_JScan.h ├── org_jnetpcap_packet_JScanner.h ├── org_jnetpcap_packet_JScannerReference.h ├── org_jnetpcap_packet_PcapPacket.h ├── org_jnetpcap_protocol_JProtocol.h ├── org_jnetpcap_util_Debug.h ├── org_jnetpcap_util_checksum_Checksum.h ├── org_jnetpcap_winpcap_WinPcap.h ├── org_jnetpcap_winpcap_WinPcapRmtAuth.h ├── org_jnetpcap_winpcap_WinPcapSamp.h ├── org_jnetpcap_winpcap_WinPcapSendQueue.h ├── org_jnetpcap_winpcap_WinPcapStat.h ├── packet_flow.cpp ├── packet_flow.h ├── packet_jheader.cpp ├── packet_jheader_scanner.cpp ├── packet_jpacket.cpp ├── packet_jscan.cpp ├── packet_jscanner.h ├── packet_jsmall_scanner.cpp ├── packet_protocol.cpp ├── packet_protocol.h ├── util_checksum.cpp ├── util_crc16.c ├── util_crc16.h ├── util_crc32.c ├── util_crc32.h ├── util_debug.cpp ├── util_debug.h ├── util_in_cksum.cpp ├── util_in_cksum.h ├── winpcap_ext.cpp ├── winpcap_ext.h ├── winpcap_ids.cpp ├── winpcap_ids.h ├── winpcap_send_queue.cpp ├── winpcap_stat_ex.cpp └── winpcap_stat_ex.h ├── libs ├── android-support-v4.jar └── armeabi │ └── libjnetpcap.so ├── lint.xml ├── obj ├── convert-dependencies.sh └── local │ └── armeabi │ ├── libjnetpcap.so │ ├── libpcap.a │ ├── libstdc++.a │ └── objs │ ├── jnetpcap │ ├── jnetpcap.o │ ├── jnetpcap.o.d │ ├── jnetpcap_beta.o │ ├── jnetpcap_beta.o.d │ ├── jnetpcap_bpf.o │ ├── jnetpcap_bpf.o.d │ ├── jnetpcap_dumper.o │ ├── jnetpcap_dumper.o.d │ ├── jnetpcap_ids.o │ ├── jnetpcap_ids.o.d │ ├── jnetpcap_pcap_header.o │ ├── jnetpcap_pcap_header.o.d │ ├── jnetpcap_utils.o │ ├── jnetpcap_utils.o.d │ ├── nio_jbuffer.o │ ├── nio_jbuffer.o.d │ ├── nio_jmemory.o │ ├── nio_jmemory.o.d │ ├── nio_jnumber.o │ ├── nio_jnumber.o.d │ ├── packet_flow.o │ ├── packet_flow.o.d │ ├── packet_jheader.o │ ├── packet_jheader.o.d │ ├── packet_jheader_scanner.o │ ├── packet_jheader_scanner.o.d │ ├── packet_jpacket.o │ ├── packet_jpacket.o.d │ ├── packet_jscan.o │ ├── packet_jscan.o.d │ ├── packet_jsmall_scanner.o │ ├── packet_jsmall_scanner.o.d │ ├── packet_protocol.o │ ├── packet_protocol.o.d │ ├── util_checksum.o │ ├── util_checksum.o.d │ ├── util_crc16.o │ ├── util_crc16.o.d │ ├── util_crc32.o │ ├── util_crc32.o.d │ ├── util_debug.o │ ├── util_debug.o.d │ ├── util_in_cksum.o │ ├── util_in_cksum.o.d │ ├── winpcap_ext.o │ ├── winpcap_ext.o.d │ ├── winpcap_ids.o │ ├── winpcap_ids.o.d │ ├── winpcap_send_queue.o │ ├── winpcap_send_queue.o.d │ ├── winpcap_stat_ex.o │ └── winpcap_stat_ex.o.d │ └── pcap │ ├── bpf │ └── net │ │ ├── bpf_filter.o │ │ └── bpf_filter.o.d │ ├── bpf_dump.o │ ├── bpf_dump.o.d │ ├── bpf_image.o │ ├── bpf_image.o.d │ ├── etherent.o │ ├── etherent.o.d │ ├── fad-gifc.o │ ├── fad-gifc.o.d │ ├── gencode.o │ ├── gencode.o.d │ ├── grammar.o │ ├── grammar.o.d │ ├── inet.o │ ├── inet.o.d │ ├── nametoaddr.o │ ├── nametoaddr.o.d │ ├── optimize.o │ ├── optimize.o.d │ ├── pcap-linux.o │ ├── pcap-linux.o.d │ ├── pcap.o │ ├── pcap.o.d │ ├── savefile.o │ ├── savefile.o.d │ ├── scanner.o │ ├── scanner.o.d │ ├── version.o │ └── version.o.d ├── proguard-project.txt ├── project.properties ├── rec.txt ├── res ├── drawable-hdpi │ ├── collapsed.png │ ├── expanded.png │ └── ic_launcher_pcap_reader.png ├── drawable-ldpi │ ├── collapsed.png │ ├── expanded.png │ └── ic_launcher_pcap_reader.png ├── drawable-mdpi │ ├── collapsed.png │ ├── expanded.png │ └── ic_launcher_pcap_reader.png ├── drawable-xhdpi │ ├── collapsed.png │ ├── expanded.png │ └── ic_launcher_pcap_reader.png ├── drawable-xxhdpi │ └── ic_launcher_pcap_reader.png ├── drawable-xxxhdpi │ └── ic_launcher_pcap_reader.png ├── drawable │ ├── directory_icon.png │ ├── directory_up.png │ ├── file_icon.png │ └── item_packet_tree_selector.xml ├── layout │ ├── activity_pcap_display.xml │ ├── activity_pcap_open.xml │ ├── fragment_license.xml │ ├── fragment_packet_details.xml │ ├── fragment_packet_list.xml │ ├── fragment_pcap_open.xml │ ├── item_license_list.xml │ ├── item_packet_list.xml │ ├── item_packet_tree.xml │ └── item_scan_list.xml ├── menu │ └── main.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml ├── values-w820dp │ └── dimens.xml ├── values │ ├── color.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── xml │ └── preferences.xml └── src ├── com ├── glacialsoftware │ └── pcapreader │ │ ├── InvalidFileDialogFragment.java │ │ ├── LicenseDialogFragment.java │ │ ├── LicenseFragment.java │ │ ├── LicenseListAdapter.java │ │ ├── LicenseListItem.java │ │ ├── PacketDetailsFragment.java │ │ ├── PacketFormatter.java │ │ ├── PacketListAdapter.java │ │ ├── PacketListFragment.java │ │ ├── PacketListItem.java │ │ ├── PacketTreeAdapter.java │ │ ├── PcapDisplayActivity.java │ │ ├── PcapFileLoader.java │ │ ├── PcapOpenActivity.java │ │ ├── PcapOpenFragment.java │ │ ├── PcapReaderPreferenceFragment.java │ │ └── ScanListAdapter.java └── mburman │ └── fileexplore │ └── FileExplore.java └── org └── jnetpcap ├── ByteBufferHandler.java ├── DataLinkType.java ├── IncompatiblePeer.java ├── JBufferHandler.java ├── JCaptureHeader.java ├── Pcap.java ├── PcapAddr.java ├── PcapBpfProgram.java ├── PcapClosedException.java ├── PcapDLT.java ├── PcapDumper.java ├── PcapExtensionNotAvailableException.java ├── PcapHandler.java ├── PcapHeader.java ├── PcapIf.java ├── PcapInteger.java ├── PcapPktBuffer.java ├── PcapPktHdr.java ├── PcapSockAddr.java ├── PcapStat.java ├── PcapTask.java ├── PcapUtils.java ├── nio ├── Disposable.java ├── DisposableGC.java ├── DisposableReference.java ├── JBuffer.java ├── JBufferInputStream.java ├── JFunction.java ├── JMemory.java ├── JMemoryPool.java ├── JMemoryReference.java ├── JNumber.java ├── JStruct.java ├── Link.java ├── LinkSequence.java └── package.html ├── package.html ├── packet ├── AbstractBinding.java ├── AbstractMessageHeader.java ├── JBinding.java ├── JCompoundHeader.java ├── JDependency.java ├── JFlow.java ├── JFlowKey.java ├── JFlowMap.java ├── JHeader.java ├── JHeaderAccessor.java ├── JHeaderChecksum.java ├── JHeaderMap.java ├── JHeaderPool.java ├── JHeaderScanner.java ├── JHeaderType.java ├── JMappedHeader.java ├── JMemoryPacket.java ├── JPacket.java ├── JPacketHandler.java ├── JPayloadAccessor.java ├── JRegistry.java ├── JScan.java ├── JScanner.java ├── JScannerReference.java ├── JSubHeader.java ├── Payload.java ├── PcapPacket.java ├── PcapPacketHandler.java ├── PeeringException.java ├── RegistryException.java ├── RegistryHeaderErrors.java ├── RegistryRuntimeException.java ├── UnregisteredHeaderException.java ├── annotate │ ├── Analyzer.java │ ├── Bind.java │ ├── BindingVariable.java │ ├── Dynamic.java │ ├── Field.java │ ├── FieldDefinitionException.java │ ├── FieldSetter.java │ ├── FlowKey.java │ ├── Format.java │ ├── Header.java │ ├── HeaderLength.java │ ├── Protocol.java │ ├── ProtocolSuite.java │ ├── Scanner.java │ ├── Validate.java │ └── package.html ├── format │ ├── FormatUtils.java │ ├── JFormatter.java │ ├── TextFormatter.java │ ├── XmlFormatter.java │ └── package.html ├── package.html └── structure │ ├── AnnotatedBindMethod.java │ ├── AnnotatedBinding.java │ ├── AnnotatedField.java │ ├── AnnotatedFieldMethod.java │ ├── AnnotatedFieldRuntime.java │ ├── AnnotatedHeader.java │ ├── AnnotatedHeaderLengthMethod.java │ ├── AnnotatedMethod.java │ ├── AnnotatedMethodException.java │ ├── AnnotatedScannerMethod.java │ ├── DefaultField.java │ ├── HeaderDefinitionError.java │ ├── JField.java │ └── package.html ├── protocol ├── JProtocol.java ├── application │ ├── Html.java │ ├── HtmlParser.java │ ├── WebImage.java │ └── package.html ├── lan │ ├── Ethernet.java │ ├── IEEE802dot1q.java │ ├── IEEE802dot2.java │ ├── IEEE802dot3.java │ ├── IEEESnap.java │ ├── SLL.java │ └── package.html ├── network │ ├── Arp.java │ ├── Icmp.java │ ├── Ip4.java │ ├── Ip6.java │ ├── Rip.java │ ├── Rip1.java │ ├── Rip2.java │ └── package.html ├── package.html ├── tcpip │ ├── Http.java │ ├── HttpOptions.java │ ├── Tcp.java │ ├── Udp.java │ └── package.html ├── voip │ ├── Rtp.java │ ├── Sdp.java │ ├── Sip.java │ └── package.html ├── vpn │ ├── L2TP.java │ └── package.html └── wan │ ├── PPP.java │ └── package.html ├── util ├── BlockingQueuePump.java ├── DataUtils.java ├── Debug.java ├── ExpandableString.java ├── HoldQueue.java ├── JEvent.java ├── JLogger.java ├── JNetPcapFormatter.java ├── JPacketSupport.java ├── JStringBuilder.java ├── JThreadLocal.java ├── Length.java ├── Offset.java ├── PcapPacketArrayList.java ├── PcapPacketSupport.java ├── SlidingBuffer.java ├── Timeout.java ├── TimeoutQueue.java ├── Units.java ├── checksum │ ├── Checksum.java │ └── package.html ├── config │ ├── ConfigString.java │ ├── JConfig.java │ ├── SearchpathString.java │ └── package.html ├── package.html └── resolver │ ├── AbstractResolver.java │ ├── IEEEOuiPrefixResolver.java │ ├── IpResolver.java │ ├── Resolver.java │ └── package.html └── winpcap ├── WinPcap.java ├── WinPcapRmtAuth.java ├── WinPcapSamp.java ├── WinPcapSendQueue.java ├── WinPcapStat.java └── package.html /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | syntax:glob 2 | bin/ 3 | assets/ 4 | gen/ -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PCAPReader 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/ic_launcher-web.png -------------------------------------------------------------------------------- /jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := jnetpcap 5 | 6 | LOCAL_SRC_FILES :=\ 7 | jnetpcap.cpp\ 8 | packet_flow.cpp\ 9 | packet_jheader.cpp\ 10 | jnetpcap_pcap_header.cpp\ 11 | nio_jbuffer.cpp\ 12 | winpcap_stat_ex.cpp\ 13 | winpcap_send_queue.cpp\ 14 | winpcap_ext.cpp\ 15 | jnetpcap_ids.cpp\ 16 | jnetpcap_dumper.cpp\ 17 | jnetpcap_utils.cpp\ 18 | util_in_cksum.cpp\ 19 | jnetpcap_beta.cpp\ 20 | nio_jmemory.cpp\ 21 | packet_jsmall_scanner.cpp\ 22 | packet_protocol.cpp\ 23 | nio_jnumber.cpp\ 24 | packet_jheader_scanner.cpp\ 25 | packet_jscan.cpp\ 26 | util_checksum.cpp\ 27 | packet_jpacket.cpp\ 28 | winpcap_ids.cpp\ 29 | util_debug.cpp\ 30 | util_crc16.c\ 31 | util_crc32.c\ 32 | jnetpcap_bpf.cpp 33 | 34 | LOCAL_C_INCLUDES :=\ 35 | $(NDK_ROOT)/platforms/android-8/arch-arm/usr/include\ 36 | $(LOCAL_PATH)/libpcap 37 | 38 | LOCAL_CFLAGS := -DLIBPCAP_VERSION=0x097 39 | 40 | LOCAL_STATIC_LIBRARIES := libpcap 41 | 42 | include $(BUILD_SHARED_LIBRARY) 43 | 44 | include $(LOCAL_PATH)/libpcap/Android.mk 45 | -------------------------------------------------------------------------------- /jni/analysis.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_analysis_h 4 | #define _Included_analysis_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_analysis_Analysis.h" 16 | #include "org_jnetpcap_packet_analysis_AnalysisUtils.h" 17 | 18 | #define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE 19 | 20 | /* 21 | * A header for every analysis object 22 | */ 23 | typedef struct analysis_t { 24 | uint16_t type; 25 | uint16_t len; // length so we can walk unknown analysis types 26 | } analysis_t; 27 | 28 | /* 29 | * Roots are embeded in packet_state_t and header_state_t objects 30 | */ 31 | typedef struct root_analysis_t { 32 | uint16_t type; // == ROOT_TYPE 33 | uint16_t len; // length so we can walk unknown analysis types 34 | 35 | analysis_t *child; 36 | }; 37 | 38 | 39 | typedef void (*native_analyzer_func_t)(packet_state_t *packet); 40 | extern native_analyzer_func_t native_analyzers[]; 41 | 42 | typedef struct analyzer_t { 43 | 44 | native_analyzer_func_t analyzers[64][4]; 45 | 46 | } analyzer_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /jni/export.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_export_h 6 | #define Include_export_h 7 | 8 | // JNIEXPORT is designed for microsoft compilers, we're using gcc to compile 9 | #ifdef JNIEXPORT 10 | #undef JNIEXPORT 11 | #endif 12 | #undef JNIEXPORT 13 | #define JNIEXPORT extern "C" 14 | 15 | #undef __declspec 16 | #define __declspec(a) extern "C" 17 | 18 | #ifndef FALSE 19 | #define TRUE 1 20 | #define FALSE !TRUE 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /jni/jnetpcap_bpf.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_bpf_h 4 | #define _Included_jnetpcap_bpf_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | extern jclass bpfProgramClass; 15 | 16 | extern jfieldID bpfProgramPhysicalFID; 17 | 18 | // Prototypes 19 | bpf_program *getBpfProgram(JNIEnv *env, jobject obj); 20 | void setBpfProgramPhysical(JNIEnv *env, jobject obj, jlong value); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /jni/jnetpcap_dumper.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_dumper methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_PcapDumper 5 | #define _Included_org_jnetpcap_PcapDumper 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass pcapDumperClass; 12 | 13 | extern jclass pcapDumperClass; 14 | 15 | extern jmethodID pcapDumperConstructorMID; 16 | 17 | extern jfieldID pcapDumperPhysicalFID; 18 | 19 | // Prototypes 20 | void setPcapDumper(JNIEnv *env, jobject obj, pcap_dumper_t *dumper); 21 | pcap_dumper_t *getPcapDumper(JNIEnv *env, jobject obj); 22 | jobject newPcapDumper(JNIEnv *env, pcap_dumper_t *dumper); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /jni/libpcap/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_SRC_FILES:=\ 5 | bpf_dump.c\ 6 | bpf/net/bpf_filter.c\ 7 | bpf_image.c\ 8 | etherent.c\ 9 | fad-gifc.c\ 10 | gencode.c\ 11 | grammar.c\ 12 | inet.c\ 13 | nametoaddr.c\ 14 | optimize.c\ 15 | pcap.c\ 16 | pcap-linux.c\ 17 | savefile.c\ 18 | scanner.c\ 19 | version.c 20 | 21 | LOCAL_CFLAGS:=-O2 -g 22 | LOCAL_CFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -Dlinux -D__GLIBC__ -D_GNU_SOURCE 23 | 24 | LOCAL_MODULE:= libpcap 25 | 26 | include $(BUILD_STATIC_LIBRARY) 27 | -------------------------------------------------------------------------------- /jni/libpcap/CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/jni/libpcap/CREDITS -------------------------------------------------------------------------------- /jni/libpcap/ChmodBPF/ChmodBPF: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | . /etc/rc.common 4 | 5 | StartService () 6 | { 7 | # 8 | # Unfortunately, Mac OS X's devfs is based on the old FreeBSD 9 | # one, not the current one, so there's no way to configure it 10 | # to create BPF devices with particular owners or groups. 11 | # This startup item will make it owned by the admin group, 12 | # with permissions rw-rw----, so that anybody in the admin 13 | # group can use programs that capture or send raw packets. 14 | # 15 | # Change this as appropriate for your site, e.g. to make 16 | # it owned by a particular user without changing the permissions, 17 | # so only that user and the super-user can capture or send raw 18 | # packets, or give it the permissions rw-r-----, so that 19 | # only the super-user can send raw packets but anybody in the 20 | # admin group can capture packets. 21 | # 22 | chgrp admin /dev/bpf* 23 | chmod g+rw /dev/bpf* 24 | } 25 | 26 | StopService () 27 | { 28 | return 0; 29 | } 30 | 31 | RestartService () { StartService; } 32 | 33 | RunService "$1" 34 | -------------------------------------------------------------------------------- /jni/libpcap/ChmodBPF/StartupParameters.plist: -------------------------------------------------------------------------------- 1 | { 2 | Description = "Change BPF permissions"; 3 | Provides = ("Non-root permission to capture or send raw packets"); 4 | } 5 | -------------------------------------------------------------------------------- /jni/libpcap/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | -------------------------------------------------------------------------------- /jni/libpcap/FILES: -------------------------------------------------------------------------------- 1 | CHANGES 2 | ChmodBPF/ChmodBPF 3 | ChmodBPF/StartupParameters.plist 4 | CREDITS 5 | FILES 6 | INSTALL.txt 7 | LICENSE 8 | Makefile.in 9 | README 10 | README.aix 11 | README.dag 12 | README.hpux 13 | README.linux 14 | README.macosx 15 | README.septel 16 | README.tru64 17 | README.Win32 18 | SUNOS4/nit_if.o.sparc 19 | SUNOS4/nit_if.o.sun3 20 | SUNOS4/nit_if.o.sun4c.4.0.3c 21 | TODO 22 | VERSION 23 | acconfig.h 24 | aclocal.m4 25 | arcnet.h 26 | atmuni31.h 27 | bpf/net/bpf_filter.c 28 | bpf_dump.c 29 | bpf_image.c 30 | config.guess 31 | config.h.in 32 | config.sub 33 | configure 34 | configure.in 35 | etherent.c 36 | ethertype.h 37 | fad-getad.c 38 | fad-gifc.c 39 | fad-glifc.c 40 | fad-null.c 41 | fad-win32.c 42 | gencode.c 43 | gencode.h 44 | grammar.y 45 | inet.c 46 | install-sh 47 | lbl/os-aix4.h 48 | lbl/os-hpux11.h 49 | lbl/os-osf4.h 50 | lbl/os-osf5.h 51 | lbl/os-solaris2.h 52 | lbl/os-sunos4.h 53 | lbl/os-ultrix4.h 54 | llc.h 55 | missing/snprintf.c 56 | mkdep 57 | msdos/bin2c.c 58 | msdos/common.dj 59 | msdos/makefile 60 | msdos/makefile.dj 61 | msdos/makefile.wc 62 | msdos/ndis2.c 63 | msdos/ndis2.h 64 | msdos/ndis_0.asm 65 | msdos/pkt_rx0.asm 66 | msdos/pkt_rx1.s 67 | msdos/pktdrvr.c 68 | msdos/pktdrvr.h 69 | msdos/readme.dos 70 | nametoaddr.c 71 | nlpid.h 72 | optimize.c 73 | packaging/pcap.spec 74 | packaging/pcap.spec.in 75 | pcap-bpf.c 76 | pcap-bpf.h 77 | pcap-dag.c 78 | pcap-dag.h 79 | pcap-dlpi.c 80 | pcap-dos.c 81 | pcap-dos.h 82 | pcap-enet.c 83 | pcap-int.h 84 | pcap-linux.c 85 | pcap-namedb.h 86 | pcap-nit.c 87 | pcap-nit.h 88 | pcap-null.c 89 | pcap-pf.c 90 | pcap-pf.h 91 | pcap-septel.c 92 | pcap-septel.h 93 | pcap-stdinc.h 94 | pcap-snit.c 95 | pcap-snoop.c 96 | pcap-win32.c 97 | pcap.3 98 | pcap.c 99 | pcap.h 100 | ppp.h 101 | savefile.c 102 | scanner.l 103 | sll.h 104 | sunatmpos.h 105 | Win32/Include/Gnuc.h 106 | Win32/Include/addrinfo.h 107 | Win32/Include/bittypes.h 108 | Win32/Include/cdecl_ext.h 109 | Win32/Include/inetprivate.h 110 | Win32/Include/ip6_misc.h 111 | Win32/Include/sockstorage.h 112 | Win32/Include/arpa/nameser.h 113 | Win32/Include/net/if.h 114 | Win32/Include/net/netdb.h 115 | Win32/Include/net/paths.h 116 | Win32/Src/ffs.c 117 | Win32/Src/getaddrinfo.c 118 | Win32/Src/getnetbynm.c 119 | Win32/Src/getnetent.c 120 | Win32/Src/getopt.c 121 | Win32/Src/getservent.c 122 | Win32/Src/inet_aton.c 123 | Win32/Src/inet_net.c 124 | Win32/Src/inet_pton.c 125 | -------------------------------------------------------------------------------- /jni/libpcap/LICENSE: -------------------------------------------------------------------------------- 1 | License: BSD 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 3. The names of the authors may not be used to endorse or promote 14 | products derived from this software without specific prior 15 | written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 18 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | -------------------------------------------------------------------------------- /jni/libpcap/MODULE_LICENSE_BSD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/jni/libpcap/MODULE_LICENSE_BSD -------------------------------------------------------------------------------- /jni/libpcap/NOTICE: -------------------------------------------------------------------------------- 1 | License: BSD 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 3. The names of the authors may not be used to endorse or promote 14 | products derived from this software without specific prior 15 | written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 18 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | -------------------------------------------------------------------------------- /jni/libpcap/TODO: -------------------------------------------------------------------------------- 1 | TODO list for libpcap 2 | ======================= 3 | 4 | Important stuff (to be done before the next release) 5 | --------------- 6 | 7 | General 8 | 9 | - configure should not be in the CVS. Most open source projects have an 10 | autogen.sh script to run autoconf etc. after checkout. I think we 11 | should stick to the standard. 12 | 13 | - The source files should be better documented. There is no official 14 | design guideline for what is done where. There should be a common coding 15 | style (okay, you can guess that by looking at the code) and a guide for 16 | what needs to be documented. 17 | 18 | Less urgent items 19 | ----------------- 20 | 21 | - Better documentation and cleanup of the interface. I am seeing a few 22 | problems at the first glance which needs fixing: 23 | + pcap_lookupnet makes little to no sense with protocols != IPv4 24 | + not very well suited for interactive programs (think ethereal). There 25 | should be a way for the application to get a file descriptor which it 26 | has to monitor and a callback in pcap which has to be called on 27 | activity (XXX - "pcap_fileno()" handles the first part, although 28 | "select()" and "poll()" don't work on BPF devices on most BSDs, and 29 | you can call "pcap_dispatch()" as the dispatch routine after putting 30 | the descriptor into non-blocking mode) 31 | + too many functions. There are a lot of functions for everything which 32 | violates the KISS principle. Why do we need pcap_strerror, pcap_perror 33 | and pcap_geterr? 34 | + the manpage has a brief description of each function but where is the 35 | big picture? Seems like you need to buy UNP for that... 36 | -------------------------------------------------------------------------------- /jni/libpcap/VERSION: -------------------------------------------------------------------------------- 1 | 0.9.8 2 | -------------------------------------------------------------------------------- /jni/libpcap/acconfig.h: -------------------------------------------------------------------------------- 1 | /* Long story short: aclocal.m4 depends on autoconf 2.13 2 | * implementation details wrt "const"; newer versions 3 | * have different implementation details so for now we 4 | * put "const" here. This may cause duplicate definitions 5 | * in config.h but that should be OK since they're the same. 6 | */ 7 | #undef const 8 | -------------------------------------------------------------------------------- /jni/libpcap/bpf_dump.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1992, 1993, 1994, 1995, 1996 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | #ifndef lint 22 | static const char rcsid[] _U_ = 23 | "@(#) $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.14 2003/11/15 23:23:57 guy Exp $ (LBL)"; 24 | #endif 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include "config.h" 28 | #endif 29 | 30 | #include 31 | #include 32 | 33 | void 34 | bpf_dump(struct bpf_program *p, int option) 35 | { 36 | struct bpf_insn *insn; 37 | int i; 38 | int n = p->bf_len; 39 | 40 | insn = p->bf_insns; 41 | if (option > 2) { 42 | printf("%d\n", n); 43 | for (i = 0; i < n; ++insn, ++i) { 44 | printf("%u %u %u %u\n", insn->code, 45 | insn->jt, insn->jf, insn->k); 46 | } 47 | return ; 48 | } 49 | if (option > 1) { 50 | for (i = 0; i < n; ++insn, ++i) 51 | printf("{ 0x%x, %d, %d, 0x%08x },\n", 52 | insn->code, insn->jt, insn->jf, insn->k); 53 | return; 54 | } 55 | for (i = 0; i < n; ++insn, ++i) { 56 | #ifdef BDEBUG 57 | extern int bids[]; 58 | printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1); 59 | #endif 60 | puts(bpf_image(insn, i)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /jni/libpcap/ffs.h: -------------------------------------------------------------------------------- 1 | #ifndef _FFS_H_ 2 | #define _FFS_H_ 3 | 4 | /* 5 | * A really hacky implementation copied from asm/bitops.h 6 | * to make it compile 7 | */ 8 | inline int ffs(int x) 9 | { 10 | int r = 1; 11 | 12 | if (!x) 13 | return 0; 14 | if (!(x & 0xffff)) { 15 | x >>= 16; 16 | r += 16; 17 | } 18 | if (!(x & 0xff)) { 19 | x >>= 8; 20 | r += 8; 21 | } 22 | if (!(x & 0xf)) { 23 | x >>= 4; 24 | r += 4; 25 | } 26 | if (!(x & 3)) { 27 | x >>= 2; 28 | r += 2; 29 | } 30 | if (!(x & 1)) { 31 | x >>= 1; 32 | r += 1; 33 | } 34 | return r; 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-aix4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-aix4.h,v 1.1 2002/06/01 09:37:40 guy Exp $ 22 | */ 23 | 24 | /* Prototypes missing in AIX 4.x */ 25 | int ffs(int i); 26 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-hpux11.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-hpux11.h,v 1.1 2002/06/01 09:37:41 guy Exp $ 22 | */ 23 | 24 | /* Prototypes missing in HP-UX 11.x */ 25 | int ffs(int i); 26 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-osf4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-osf4.h,v 1.2 2000/12/22 11:51:33 guy Exp $ (LBL) 22 | */ 23 | 24 | /* Prototypes missing in Digital UNIX 4.x */ 25 | int snprintf(char *, size_t, const char *, ...); 26 | int vsnprintf(char *, size_t, const char *, va_list); 27 | int pfopen(char *, int); 28 | 29 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-osf5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-osf5.h,v 1.2 2002/08/02 03:24:15 guy Exp $ (LBL) 22 | */ 23 | 24 | /* 25 | * Prototypes missing in Tru64 UNIX 5.x 26 | * XXX - "snprintf()" and "vsnprintf()" aren't missing, but you have to 27 | * #define the right value to get them defined by . 28 | */ 29 | int snprintf(char *, size_t, const char *, ...); 30 | int vsnprintf(char *, size_t, const char *, va_list); 31 | int pfopen(char *, int); 32 | 33 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-solaris2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-solaris2.h,v 1.19 2000/10/11 04:02:52 guy Exp $ (LBL) 22 | */ 23 | 24 | /* Prototypes missing in SunOS 5 */ 25 | char *strerror(int); 26 | int snprintf(char *, size_t, const char *, ...); 27 | -------------------------------------------------------------------------------- /jni/libpcap/lbl/os-ultrix4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1990, 1993, 1994, 1995, 1996 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/lbl/os-ultrix4.h,v 1.19.1.1 1999/10/07 23:46:41 mcr Exp $ (LBL) 22 | */ 23 | 24 | /* Prototypes missing in Ultrix 4 */ 25 | int bcmp(const char *, const char *, u_int); 26 | void bcopy(const void *, void *, u_int); 27 | void bzero(void *, u_int); 28 | void endservent(void); 29 | int getopt(int, char * const *, const char *); 30 | #ifdef __STDC__ 31 | struct timeval; 32 | struct timezone; 33 | #endif 34 | int gettimeofday(struct timeval *, struct timezone *); 35 | int ioctl(int, int, caddr_t); 36 | int pfopen(char *, int); 37 | int setlinebuf(FILE *); 38 | int socket(int, int, int); 39 | int strcasecmp(const char *, const char *); 40 | -------------------------------------------------------------------------------- /jni/libpcap/llc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * @(#) $Header: /tcpdump/master/libpcap/llc.h,v 1.2 2001/01/28 09:44:50 guy Exp $ (LBL) 22 | */ 23 | 24 | /* 25 | * 802.2 LLC SAP values. 26 | */ 27 | 28 | #ifndef LLCSAP_NULL 29 | #define LLCSAP_NULL 0x00 30 | #endif 31 | #ifndef LLCSAP_GLOBAL 32 | #define LLCSAP_GLOBAL 0xff 33 | #endif 34 | #ifndef LLCSAP_8021B 35 | #define LLCSAP_8021B_I 0x02 36 | #endif 37 | #ifndef LLCSAP_8021B 38 | #define LLCSAP_8021B_G 0x03 39 | #endif 40 | #ifndef LLCSAP_IP 41 | #define LLCSAP_IP 0x06 42 | #endif 43 | #ifndef LLCSAP_PROWAYNM 44 | #define LLCSAP_PROWAYNM 0x0e 45 | #endif 46 | #ifndef LLCSAP_8021D 47 | #define LLCSAP_8021D 0x42 48 | #endif 49 | #ifndef LLCSAP_RS511 50 | #define LLCSAP_RS511 0x4e 51 | #endif 52 | #ifndef LLCSAP_ISO8208 53 | #define LLCSAP_ISO8208 0x7e 54 | #endif 55 | #ifndef LLCSAP_PROWAY 56 | #define LLCSAP_PROWAY 0x8e 57 | #endif 58 | #ifndef LLCSAP_SNAP 59 | #define LLCSAP_SNAP 0xaa 60 | #endif 61 | #ifndef LLCSAP_IPX 62 | #define LLCSAP_IPX 0xe0 63 | #endif 64 | #ifndef LLCSAP_NETBEUI 65 | #define LLCSAP_NETBEUI 0xf0 66 | #endif 67 | #ifndef LLCSAP_ISONS 68 | #define LLCSAP_ISONS 0xfe 69 | #endif 70 | -------------------------------------------------------------------------------- /jni/libpcap/missing/snprintf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/jni/libpcap/missing/snprintf.c -------------------------------------------------------------------------------- /jni/libpcap/nlpid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996 3 | * Juniper Networks, Inc. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution. The name of Juniper Networks may not 11 | * be used to endorse or promote products derived from this software 12 | * without specific prior written permission. 13 | * 14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 15 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * @(#) $Header: /tcpdump/master/libpcap/nlpid.h,v 1.2 2002/12/06 00:01:34 hannes Exp $ (Juniper) 19 | */ 20 | 21 | /* Types missing from some systems */ 22 | 23 | /* 24 | * Network layer prototocol identifiers 25 | */ 26 | #ifndef ISO8473_CLNP 27 | #define ISO8473_CLNP 0x81 28 | #endif 29 | #ifndef ISO9542_ESIS 30 | #define ISO9542_ESIS 0x82 31 | #endif 32 | #ifndef ISO9542X25_ESIS 33 | #define ISO9542X25_ESIS 0x8a 34 | #endif 35 | #ifndef ISO10589_ISIS 36 | #define ISO10589_ISIS 0x83 37 | #endif 38 | /* 39 | * this does not really belong in the nlpid.h file 40 | * however we need it for generating nice 41 | * IS-IS related BPF filters 42 | */ 43 | #define ISIS_L1_LAN_IIH 15 44 | #define ISIS_L2_LAN_IIH 16 45 | #define ISIS_PTP_IIH 17 46 | #define ISIS_L1_LSP 18 47 | #define ISIS_L2_LSP 20 48 | #define ISIS_L1_CSNP 24 49 | #define ISIS_L2_CSNP 25 50 | #define ISIS_L1_PSNP 26 51 | #define ISIS_L2_PSNP 27 52 | 53 | #ifndef ISO8878A_CONS 54 | #define ISO8878A_CONS 0x84 55 | #endif 56 | #ifndef ISO10747_IDRP 57 | #define ISO10747_IDRP 0x85 58 | #endif 59 | -------------------------------------------------------------------------------- /jni/libpcap/packaging/pcap.spec: -------------------------------------------------------------------------------- 1 | %define prefix /usr 2 | %define version 0.9.4 3 | 4 | Summary: packet capture library 5 | Name: libpcap 6 | Version: %version 7 | Release: 1 8 | Group: Development/Libraries 9 | Copyright: BSD 10 | Source: libpcap-0.9.4.tar.gz 11 | BuildRoot: /tmp/%{name}-buildroot 12 | URL: http://www.tcpdump.org 13 | 14 | %description 15 | Packet-capture library LIBPCAP 0.9.4 16 | Now maintained by "The Tcpdump Group" 17 | See http://www.tcpdump.org 18 | Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org 19 | 20 | %prep 21 | %setup 22 | 23 | %post 24 | ldconfig 25 | 26 | %build 27 | CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix 28 | make 29 | 30 | %install 31 | rm -rf $RPM_BUILD_ROOT 32 | mkdir -p $RPM_BUILD_ROOT/usr/{lib,include} 33 | mkdir -p $RPM_BUILD_ROOT/usr/share/man 34 | mkdir -p $RPM_BUILD_ROOT/usr/include/net 35 | mkdir -p $RPM_BUILD_ROOT/usr/man/man3 36 | make install DESTDIR=$RPM_BUILD_ROOT mandir=/usr/share/man 37 | cd $RPM_BUILD_ROOT/usr/lib 38 | V1=`echo 0.9.4 | sed 's/\\.[^\.]*$//g'` 39 | V2=`echo 0.9.4 | sed 's/\\.[^\.]*\.[^\.]*$//g'` 40 | ln -sf libpcap.so.0.9.4 libpcap.so.$V1 41 | if test "$V2" -ne "$V1"; then 42 | ln -sf libpcap.so.$V1 libpcap.so.$V2 43 | ln -sf libpcap.so.$V2 libpcap.so 44 | else 45 | ln -sf libpcap.so.$V1 libpcap.so 46 | fi 47 | 48 | #install -m 755 -o root libpcap.a $RPM_BUILD_ROOT/usr/lib 49 | #install -m 644 -o root pcap.3 $RPM_BUILD_ROOT/usr/man/man3 50 | #install -m 644 -o root pcap.h $RPM_BUILD_ROOT/usr/include 51 | #install -m 644 -o root pcap-bpf.h $RPM_BUILD_ROOT/usr/include/net 52 | #install -m 644 -o root pcap-namedb.h $RPM_BUILD_ROOT/usr/include 53 | 54 | %clean 55 | rm -rf $RPM_BUILD_ROOT 56 | 57 | %files 58 | %defattr(-,root,root) 59 | %doc LICENSE CHANGES INSTALL.txt README.linux TODO VERSION CREDITS packaging/pcap.spec 60 | /usr/lib/libpcap.a 61 | /usr/share/man/man3/* 62 | /usr/include/pcap.h 63 | /usr/include/pcap-bpf.h 64 | /usr/include/pcap-namedb.h 65 | /usr/lib/libpcap.so* 66 | -------------------------------------------------------------------------------- /jni/libpcap/packaging/pcap.spec.in: -------------------------------------------------------------------------------- 1 | %define prefix /usr 2 | %define version @VERSION@ 3 | 4 | Summary: packet capture library 5 | Name: libpcap 6 | Version: %version 7 | Release: 1 8 | Group: Development/Libraries 9 | Copyright: BSD 10 | Source: @NAME@.tar.gz 11 | BuildRoot: /tmp/%{name}-buildroot 12 | URL: http://www.tcpdump.org 13 | 14 | %description 15 | Packet-capture library LIBPCAP @VERSION@ 16 | Now maintained by "The Tcpdump Group" 17 | See http://www.tcpdump.org 18 | Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org 19 | 20 | %prep 21 | %setup 22 | 23 | %post 24 | ldconfig 25 | 26 | %build 27 | CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix 28 | make 29 | 30 | %install 31 | rm -rf $RPM_BUILD_ROOT 32 | mkdir -p $RPM_BUILD_ROOT/usr/{lib,include} 33 | mkdir -p $RPM_BUILD_ROOT/usr/share/man 34 | mkdir -p $RPM_BUILD_ROOT/usr/include/net 35 | mkdir -p $RPM_BUILD_ROOT/usr/man/man3 36 | make install DESTDIR=$RPM_BUILD_ROOT mandir=/usr/share/man 37 | cd $RPM_BUILD_ROOT/usr/lib 38 | V1=`echo @VERSION@ | sed 's/\\.[^\.]*$//g'` 39 | V2=`echo @VERSION@ | sed 's/\\.[^\.]*\.[^\.]*$//g'` 40 | ln -sf libpcap.so.@VERSION@ libpcap.so.$V1 41 | if test "$V2" -ne "$V1"; then 42 | ln -sf libpcap.so.$V1 libpcap.so.$V2 43 | ln -sf libpcap.so.$V2 libpcap.so 44 | else 45 | ln -sf libpcap.so.$V1 libpcap.so 46 | fi 47 | 48 | #install -m 755 -o root libpcap.a $RPM_BUILD_ROOT/usr/lib 49 | #install -m 644 -o root pcap.3 $RPM_BUILD_ROOT/usr/man/man3 50 | #install -m 644 -o root pcap.h $RPM_BUILD_ROOT/usr/include 51 | #install -m 644 -o root pcap-bpf.h $RPM_BUILD_ROOT/usr/include/net 52 | #install -m 644 -o root pcap-namedb.h $RPM_BUILD_ROOT/usr/include 53 | 54 | %clean 55 | rm -rf $RPM_BUILD_ROOT 56 | 57 | %files 58 | %defattr(-,root,root) 59 | %doc LICENSE CHANGES INSTALL.txt README.linux TODO VERSION CREDITS packaging/pcap.spec 60 | /usr/lib/libpcap.a 61 | /usr/share/man/man3/* 62 | /usr/include/pcap.h 63 | /usr/include/pcap-bpf.h 64 | /usr/include/pcap-namedb.h 65 | /usr/lib/libpcap.so* 66 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-dag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pcap-dag.c: Packet capture interface for Endace DAG card. 3 | * 4 | * The functionality of this code attempts to mimic that of pcap-linux as much 5 | * as possible. This code is only needed when compiling in the DAG card code 6 | * at the same time as another type of device. 7 | * 8 | * Author: Richard Littin, Sean Irvine ({richard,sean}@reeltwo.com) 9 | * 10 | * @(#) $Header: /tcpdump/master/libpcap/pcap-dag.h,v 1.3.4.1 2005/07/07 06:56:04 guy Exp $ (LBL) 11 | */ 12 | 13 | pcap_t *dag_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf); 14 | int dag_platform_finddevs(pcap_if_t **devlistp, char *errbuf); 15 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-nit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1990, 1994 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms are permitted 6 | * provided that the above copyright notice and this paragraph are 7 | * duplicated in all such forms and that any documentation, 8 | * advertising materials, and other materials related to such 9 | * distribution and use acknowledge that the software was developed 10 | * by the University of California, Lawrence Berkeley Laboratory, 11 | * Berkeley, CA. The name of the University may not be used to 12 | * endorse or promote products derived from this software without 13 | * specific prior written permission. 14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * @(#) $Header: /tcpdump/master/libpcap/pcap-nit.h,v 1.2.1.1 1999/10/07 23:46:40 mcr Exp $ (LBL) 19 | */ 20 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-null.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1994, 1995, 1996 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | #ifndef lint 22 | static const char rcsid[] _U_ = 23 | "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.21 2003/11/15 23:24:03 guy Exp $ (LBL)"; 24 | #endif 25 | 26 | #ifdef HAVE_CONFIG_H 27 | #include "config.h" 28 | #endif 29 | 30 | #include /* optionally get BSD define */ 31 | 32 | #include 33 | 34 | #ifdef HAVE_OS_PROTO_H 35 | #include "os-proto.h" 36 | #endif 37 | 38 | #include "pcap-int.h" 39 | 40 | static char nosup[] = "live packet capture not supported on this system"; 41 | 42 | pcap_t * 43 | pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, 44 | char *ebuf) 45 | { 46 | (void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE); 47 | return (NULL); 48 | } 49 | 50 | int 51 | pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf) 52 | { 53 | return (0); 54 | } 55 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-pf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1990, 1994 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms are permitted 6 | * provided that the above copyright notice and this paragraph are 7 | * duplicated in all such forms and that any documentation, 8 | * advertising materials, and other materials related to such 9 | * distribution and use acknowledge that the software was developed 10 | * by the University of California, Lawrence Berkeley Laboratory, 11 | * Berkeley, CA. The name of the University may not be used to 12 | * endorse or promote products derived from this software without 13 | * specific prior written permission. 14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * @(#) $Header: /tcpdump/master/libpcap/pcap-pf.h,v 1.2.1.1 1999/10/07 23:46:40 mcr Exp $ (LBL) 19 | */ 20 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-septel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pcap-septel.c: Packet capture interface for Intel Septel card 3 | * 4 | * The functionality of this code attempts to mimic that of pcap-linux as much 5 | * as possible. This code is only needed when compiling in the Intel/Septel 6 | * card code at the same time as another type of device. 7 | * 8 | * Authors: Gilbert HOYEK (gil_hoyek@hotmail.com), Elias M. KHOURY 9 | * (+961 3 485343); 10 | * 11 | * @(#) $Header: /tcpdump/master/libpcap/pcap-septel.h,v 1.1.2.1 2005/06/20 21:30:19 guy Exp $ 12 | */ 13 | 14 | pcap_t *septel_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf); 15 | 16 | -------------------------------------------------------------------------------- /jni/libpcap/pcap-stdinc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002 - 2003 3 | * NetGroup, Politecnico di Torino (Italy) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. Neither the name of the Politecnico di Torino nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | * 31 | */ 32 | 33 | #define SIZEOF_CHAR 1 34 | #define SIZEOF_SHORT 2 35 | #define SIZEOF_INT 4 36 | #ifndef _MSC_EXTENSIONS 37 | #define SIZEOF_LONG_LONG 8 38 | #endif 39 | 40 | /* 41 | * Avoids a compiler warning in case this was already defined 42 | * (someone defined _WINSOCKAPI_ when including 'windows.h', in order 43 | * to prevent it from including 'winsock.h') 44 | */ 45 | #ifdef _WINSOCKAPI_ 46 | #undef _WINSOCKAPI_ 47 | #endif 48 | #include 49 | 50 | #include 51 | 52 | #include "bittypes.h" 53 | #include 54 | #include 55 | 56 | #ifndef __MINGW32__ 57 | #include "IP6_misc.h" 58 | #endif 59 | 60 | #define caddr_t char* 61 | 62 | #define snprintf _snprintf 63 | #define vsnprintf _vsnprintf 64 | #define inline __inline 65 | -------------------------------------------------------------------------------- /jni/libpcap/sunatmpos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 Yen Yen Lim and North Dakota State University 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by Yen Yen Lim and 16 | North Dakota State University 17 | * 4. The name of the author may not be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 24 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 28 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 29 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | * POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * @(#) $Header: /tcpdump/master/libpcap/sunatmpos.h,v 1.1 2002/07/11 09:06:47 guy Exp $ (LBL) 33 | */ 34 | 35 | /* SunATM header for ATM packet */ 36 | #define SUNATM_DIR_POS 0 37 | #define SUNATM_VPI_POS 1 38 | #define SUNATM_VCI_POS 2 39 | #define SUNATM_PKT_BEGIN_POS 4 /* Start of ATM packet */ 40 | 41 | /* Protocol type values in the bottom for bits of the byte at SUNATM_DIR_POS. */ 42 | #define PT_LANE 0x01 /* LANE */ 43 | #define PT_LLC 0x02 /* LLC encapsulation */ 44 | #define PT_ILMI 0x05 /* ILMI */ 45 | #define PT_QSAAL 0x06 /* Q.SAAL */ 46 | -------------------------------------------------------------------------------- /jni/libpcap/version.c: -------------------------------------------------------------------------------- 1 | char pcap_version[] = "0.9.8"; 2 | -------------------------------------------------------------------------------- /jni/libpcap/version.h: -------------------------------------------------------------------------------- 1 | static const char pcap_version_string[] = "libpcap version 0.9.8"; 2 | -------------------------------------------------------------------------------- /jni/nio_jmemory.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_nio_jmemory_h 4 | #define _Included_nio_jmemory_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include "export.h" 12 | 13 | #include 14 | 15 | typedef struct memory_usage_t { 16 | uint64_t total_allocated; 17 | uint64_t total_deallocated; 18 | 19 | uint64_t total_allocate_calls; 20 | uint64_t total_deallocate_calls; 21 | 22 | uint64_t seg_0_255_bytes; 23 | uint64_t seg_256_or_above_bytes; 24 | 25 | uint64_t max_direct; 26 | uint64_t soft_direct; 27 | uint64_t reserved_direct; 28 | uint64_t available_direct; 29 | 30 | } memory_usage_t; 31 | 32 | typedef struct jni_global_ref_t { 33 | int count; // Number of references held 34 | jobject reference[]; // array of references held 35 | } jni_global_ref_t; 36 | 37 | 38 | extern jclass jmemoryClass; 39 | extern jclass jmemoryPoolClass; 40 | extern jclass jmemoryReferenceClass; 41 | 42 | extern jmethodID jmemoryToDebugStringMID; 43 | extern jmethodID jmemoryMaxDirectMemoryBreachMID; 44 | extern jmethodID jmemorySoftDirectMemoryBreachMID; 45 | extern jmethodID jmemoryCleanupMID; 46 | extern jmethodID jmemoryPeer0MID; 47 | extern jmethodID jmemoryAllocateMID; 48 | extern jmethodID jmemorySetSize0MID; 49 | 50 | extern jfieldID jmemoryPhysicalFID; 51 | extern jfieldID jmemorySizeFID; 52 | extern jfieldID jmemoryOwnerFID; 53 | extern jfieldID jmemoryKeeperFID; 54 | extern jfieldID jmemoryRefFID; 55 | extern jfieldID jmemoryRefAddressFID; 56 | extern jobject jmemoryPOINTER_CONST; // JMemory.POINTER constant reference 57 | 58 | extern jmethodID jmemoryPoolAllocateExclusiveMID; 59 | extern jmethodID jmemoryPoolDefaultMemoryPoolMID; 60 | 61 | extern jobject defaultMemoryPool; 62 | 63 | extern memory_usage_t memory_usage; 64 | 65 | // Prototypes 66 | void init_jmemory(JNIEnv *env); 67 | void *getJMemoryPhysical(JNIEnv *env, jobject obj); 68 | void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value); 69 | void jmemoryCleanup(JNIEnv *env, jobject obj); 70 | 71 | jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length, jobject owner); 72 | 73 | char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref); 74 | void jmemoryResize(JNIEnv *env, jobject obj, size_t size); 75 | char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj); 76 | char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf); 77 | 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapAddr.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapAddr */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapAddr 6 | #define _Included_org_jnetpcap_PcapAddr 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapAddr 12 | * Method: initIDs 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapAddr_initIDs 16 | (JNIEnv *, jclass); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapBpfProgram.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapBpfProgram */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapBpfProgram 6 | #define _Included_org_jnetpcap_PcapBpfProgram 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapBpfProgram 12 | * Method: initIDs 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapBpfProgram_initIDs 16 | (JNIEnv *, jclass); 17 | 18 | /* 19 | * Class: org_jnetpcap_PcapBpfProgram 20 | * Method: initPeer 21 | * Signature: ()V 22 | */ 23 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapBpfProgram_initPeer 24 | (JNIEnv *, jobject); 25 | 26 | /* 27 | * Class: org_jnetpcap_PcapBpfProgram 28 | * Method: cleanup 29 | * Signature: ()V 30 | */ 31 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapBpfProgram_cleanup 32 | (JNIEnv *, jobject); 33 | 34 | /* 35 | * Class: org_jnetpcap_PcapBpfProgram 36 | * Method: initFromBuffer 37 | * Signature: (Ljava/nio/ByteBuffer;)V 38 | */ 39 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapBpfProgram_initFromBuffer 40 | (JNIEnv *, jobject, jobject); 41 | 42 | /* 43 | * Class: org_jnetpcap_PcapBpfProgram 44 | * Method: getInstructionCount 45 | * Signature: ()I 46 | */ 47 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapBpfProgram_getInstructionCount 48 | (JNIEnv *, jobject); 49 | 50 | /* 51 | * Class: org_jnetpcap_PcapBpfProgram 52 | * Method: getInstruction 53 | * Signature: (I)J 54 | */ 55 | JNIEXPORT jlong JNICALL Java_org_jnetpcap_PcapBpfProgram_getInstruction 56 | (JNIEnv *, jobject, jint); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | #endif 62 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapDumper.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapDumper */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapDumper 6 | #define _Included_org_jnetpcap_PcapDumper 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapDumper 12 | * Method: initIDs 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapDumper_initIDs 16 | (JNIEnv *, jclass); 17 | 18 | /* 19 | * Class: org_jnetpcap_PcapDumper 20 | * Method: dump 21 | * Signature: (Lorg/jnetpcap/PcapHeader;Ljava/nio/ByteBuffer;)V 22 | */ 23 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapDumper_dump__Lorg_jnetpcap_PcapHeader_2Ljava_nio_ByteBuffer_2 24 | (JNIEnv *, jobject, jobject, jobject); 25 | 26 | /* 27 | * Class: org_jnetpcap_PcapDumper 28 | * Method: dump 29 | * Signature: (Lorg/jnetpcap/PcapHeader;Lorg/jnetpcap/nio/JBuffer;)V 30 | */ 31 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapDumper_dump__Lorg_jnetpcap_PcapHeader_2Lorg_jnetpcap_nio_JBuffer_2 32 | (JNIEnv *, jobject, jobject, jobject); 33 | 34 | /* 35 | * Class: org_jnetpcap_PcapDumper 36 | * Method: dump 37 | * Signature: (JIIILjava/nio/ByteBuffer;)V 38 | */ 39 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapDumper_dump__JIIILjava_nio_ByteBuffer_2 40 | (JNIEnv *, jobject, jlong, jint, jint, jint, jobject); 41 | 42 | /* 43 | * Class: org_jnetpcap_PcapDumper 44 | * Method: ftell 45 | * Signature: ()J 46 | */ 47 | JNIEXPORT jlong JNICALL Java_org_jnetpcap_PcapDumper_ftell 48 | (JNIEnv *, jobject); 49 | 50 | /* 51 | * Class: org_jnetpcap_PcapDumper 52 | * Method: flush 53 | * Signature: ()I 54 | */ 55 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapDumper_flush 56 | (JNIEnv *, jobject); 57 | 58 | /* 59 | * Class: org_jnetpcap_PcapDumper 60 | * Method: close 61 | * Signature: ()V 62 | */ 63 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapDumper_close 64 | (JNIEnv *, jobject); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | #endif 70 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapHeader.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapHeader */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapHeader 6 | #define _Included_org_jnetpcap_PcapHeader 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: directMemory */ 11 | /* Inaccessible static: directMemorySoft */ 12 | #undef org_jnetpcap_PcapHeader_MAX_DIRECT_MEMORY_DEFAULT 13 | #define org_jnetpcap_PcapHeader_MAX_DIRECT_MEMORY_DEFAULT 67108864LL 14 | /* Inaccessible static: POINTER */ 15 | #undef org_jnetpcap_PcapHeader_LENGTH 16 | #define org_jnetpcap_PcapHeader_LENGTH 16L 17 | /* 18 | * Class: org_jnetpcap_PcapHeader 19 | * Method: sizeof 20 | * Signature: ()I 21 | */ 22 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapHeader_sizeof 23 | (JNIEnv *, jclass); 24 | 25 | /* 26 | * Class: org_jnetpcap_PcapHeader 27 | * Method: hdr_len 28 | * Signature: ()I 29 | */ 30 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapHeader_hdr_1len__ 31 | (JNIEnv *, jobject); 32 | 33 | /* 34 | * Class: org_jnetpcap_PcapHeader 35 | * Method: hdr_len 36 | * Signature: (I)V 37 | */ 38 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapHeader_hdr_1len__I 39 | (JNIEnv *, jobject, jint); 40 | 41 | /* 42 | * Class: org_jnetpcap_PcapHeader 43 | * Method: hdr_sec 44 | * Signature: ()J 45 | */ 46 | JNIEXPORT jlong JNICALL Java_org_jnetpcap_PcapHeader_hdr_1sec__ 47 | (JNIEnv *, jobject); 48 | 49 | /* 50 | * Class: org_jnetpcap_PcapHeader 51 | * Method: hdr_sec 52 | * Signature: (J)V 53 | */ 54 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapHeader_hdr_1sec__J 55 | (JNIEnv *, jobject, jlong); 56 | 57 | /* 58 | * Class: org_jnetpcap_PcapHeader 59 | * Method: hdr_usec 60 | * Signature: ()I 61 | */ 62 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapHeader_hdr_1usec__ 63 | (JNIEnv *, jobject); 64 | 65 | /* 66 | * Class: org_jnetpcap_PcapHeader 67 | * Method: hdr_usec 68 | * Signature: (I)V 69 | */ 70 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapHeader_hdr_1usec__I 71 | (JNIEnv *, jobject, jint); 72 | 73 | /* 74 | * Class: org_jnetpcap_PcapHeader 75 | * Method: hdr_wirelen 76 | * Signature: ()I 77 | */ 78 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapHeader_hdr_1wirelen__ 79 | (JNIEnv *, jobject); 80 | 81 | /* 82 | * Class: org_jnetpcap_PcapHeader 83 | * Method: hdr_wirelen 84 | * Signature: (I)V 85 | */ 86 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapHeader_hdr_1wirelen__I 87 | (JNIEnv *, jobject, jint); 88 | 89 | #ifdef __cplusplus 90 | } 91 | #endif 92 | #endif 93 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapIf.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapIf */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapIf 6 | #define _Included_org_jnetpcap_PcapIf 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapIf 12 | * Method: initIDs 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapIf_initIDs 16 | (JNIEnv *, jclass); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapPktBuffer.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapPktBuffer */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapPktBuffer 6 | #define _Included_org_jnetpcap_PcapPktBuffer 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapPktHdr.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapPktHdr */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapPktHdr 6 | #define _Included_org_jnetpcap_PcapPktHdr 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapPktHdr 12 | * Method: initIDs 13 | * Signature: ()V 14 | */ 15 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapPktHdr_initIDs 16 | (JNIEnv *, jclass); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapSockAddr.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapSockAddr */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapSockAddr 6 | #define _Included_org_jnetpcap_PcapSockAddr 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #undef org_jnetpcap_PcapSockAddr_AF_INET 11 | #define org_jnetpcap_PcapSockAddr_AF_INET 2L 12 | #undef org_jnetpcap_PcapSockAddr_AF_INET6 13 | #define org_jnetpcap_PcapSockAddr_AF_INET6 23L 14 | /* 15 | * Class: org_jnetpcap_PcapSockAddr 16 | * Method: initIDs 17 | * Signature: ()V 18 | */ 19 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapSockAddr_initIDs 20 | (JNIEnv *, jclass); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapStat.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapStat */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapStat 6 | #define _Included_org_jnetpcap_PcapStat 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: out */ 11 | /* 12 | * Class: org_jnetpcap_PcapStat 13 | * Method: initIDs 14 | * Signature: ()V 15 | */ 16 | JNIEXPORT void JNICALL Java_org_jnetpcap_PcapStat_initIDs 17 | (JNIEnv *, jclass); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_PcapUtils.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_PcapUtils */ 4 | 5 | #ifndef _Included_org_jnetpcap_PcapUtils 6 | #define _Included_org_jnetpcap_PcapUtils 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: org_jnetpcap_PcapUtils 12 | * Method: getHardwareAddress 13 | * Signature: (Ljava/lang/String;)[B 14 | */ 15 | JNIEXPORT jbyteArray JNICALL Java_org_jnetpcap_PcapUtils_getHardwareAddress 16 | (JNIEnv *, jclass, jstring); 17 | 18 | /* 19 | * Class: org_jnetpcap_PcapUtils 20 | * Method: injectLoop 21 | * Signature: (IILorg/jnetpcap/packet/PcapPacketHandler;Ljava/lang/Object;Lorg/jnetpcap/packet/PcapPacket;Lorg/jnetpcap/packet/JPacket$State;Lorg/jnetpcap/PcapHeader;Lorg/jnetpcap/packet/JScanner;)I 22 | */ 23 | JNIEXPORT jint JNICALL Java_org_jnetpcap_PcapUtils_injectLoop 24 | (JNIEnv *, jclass, jint, jint, jobject, jobject, jobject, jobject, jobject, jobject); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_nio_JMemoryReference.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_nio_JMemoryReference */ 4 | 5 | #ifndef _Included_org_jnetpcap_nio_JMemoryReference 6 | #define _Included_org_jnetpcap_nio_JMemoryReference 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: lock */ 11 | /* Inaccessible static: pending */ 12 | /* Inaccessible static: gc */ 13 | /* 14 | * Class: org_jnetpcap_nio_JMemoryReference 15 | * Method: disposeNative0 16 | * Signature: (JJ)V 17 | */ 18 | JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemoryReference_disposeNative0 19 | (JNIEnv *, jobject, jlong, jlong); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_packet_JHeader.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_packet_JHeader */ 4 | 5 | #ifndef _Included_org_jnetpcap_packet_JHeader 6 | #define _Included_org_jnetpcap_packet_JHeader 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: directMemory */ 11 | /* Inaccessible static: directMemorySoft */ 12 | #undef org_jnetpcap_packet_JHeader_MAX_DIRECT_MEMORY_DEFAULT 13 | #define org_jnetpcap_packet_JHeader_MAX_DIRECT_MEMORY_DEFAULT 67108864LL 14 | /* Inaccessible static: POINTER */ 15 | #undef org_jnetpcap_packet_JHeader_BYTE 16 | #define org_jnetpcap_packet_JHeader_BYTE 8L 17 | /* Inaccessible static: DEFAULT_FIELDS */ 18 | /* Inaccessible static: EMPTY_HEADER_ARRAY */ 19 | /* 20 | * Class: org_jnetpcap_packet_JHeader 21 | * Method: sizeof 22 | * Signature: ()I 23 | */ 24 | JNIEXPORT jint JNICALL Java_org_jnetpcap_packet_JHeader_sizeof 25 | (JNIEnv *, jclass); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_packet_JHeaderScanner.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_packet_JHeaderScanner */ 4 | 5 | #ifndef _Included_org_jnetpcap_packet_JHeaderScanner 6 | #define _Included_org_jnetpcap_packet_JHeaderScanner 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: directMemory */ 11 | /* Inaccessible static: directMemorySoft */ 12 | #undef org_jnetpcap_packet_JHeaderScanner_MAX_DIRECT_MEMORY_DEFAULT 13 | #define org_jnetpcap_packet_JHeaderScanner_MAX_DIRECT_MEMORY_DEFAULT 67108864LL 14 | /* Inaccessible static: POINTER */ 15 | /* 16 | * Class: org_jnetpcap_packet_JHeaderScanner 17 | * Method: bindNativeScanner 18 | * Signature: (I)V 19 | */ 20 | JNIEXPORT void JNICALL Java_org_jnetpcap_packet_JHeaderScanner_bindNativeScanner 21 | (JNIEnv *, jobject, jint); 22 | 23 | /* 24 | * Class: org_jnetpcap_packet_JHeaderScanner 25 | * Method: nativeScan 26 | * Signature: (Lorg/jnetpcap/packet/JScan;)V 27 | */ 28 | JNIEXPORT void JNICALL Java_org_jnetpcap_packet_JHeaderScanner_nativeScan 29 | (JNIEnv *, jobject, jobject); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif 35 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_packet_JRegistry.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_packet_JRegistry */ 4 | 5 | #ifndef _Included_org_jnetpcap_packet_JRegistry 6 | #define _Included_org_jnetpcap_packet_JRegistry 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #undef org_jnetpcap_packet_JRegistry_A_MAX_ID_COUNT 11 | #define org_jnetpcap_packet_JRegistry_A_MAX_ID_COUNT 64L 12 | /* Inaccessible static: CORE_ID_COUNT */ 13 | /* Inaccessible static: DLTS_TO_IDS */ 14 | /* Inaccessible static: errors */ 15 | #undef org_jnetpcap_packet_JRegistry_FLAG_HEURISTIC_BINDING 16 | #define org_jnetpcap_packet_JRegistry_FLAG_HEURISTIC_BINDING 16L 17 | #undef org_jnetpcap_packet_JRegistry_FLAG_HEURISTIC_PRE_BINDING 18 | #define org_jnetpcap_packet_JRegistry_FLAG_HEURISTIC_PRE_BINDING 32L 19 | #undef org_jnetpcap_packet_JRegistry_FLAG_OVERRIDE_BINDING 20 | #define org_jnetpcap_packet_JRegistry_FLAG_OVERRIDE_BINDING 2L 21 | #undef org_jnetpcap_packet_JRegistry_FLAG_OVERRIDE_LENGTH 22 | #define org_jnetpcap_packet_JRegistry_FLAG_OVERRIDE_LENGTH 1L 23 | /* Inaccessible static: headerFlags */ 24 | /* Inaccessible static: IDS_TO_DLTS */ 25 | /* Inaccessible static: LAST_ID */ 26 | /* Inaccessible static: MAP_BY_ID */ 27 | /* Inaccessible static: mapByClassName */ 28 | /* Inaccessible static: mapSubsByClassName */ 29 | #undef org_jnetpcap_packet_JRegistry_MAX_DLT_COUNT 30 | #define org_jnetpcap_packet_JRegistry_MAX_DLT_COUNT 512L 31 | #undef org_jnetpcap_packet_JRegistry_MAX_ID_COUNT 32 | #define org_jnetpcap_packet_JRegistry_MAX_ID_COUNT 64L 33 | #undef org_jnetpcap_packet_JRegistry_NO_DLT_MAPPING 34 | #define org_jnetpcap_packet_JRegistry_NO_DLT_MAPPING -1L 35 | /* Inaccessible static: resolvers */ 36 | /* Inaccessible static: scanners */ 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_packet_JScannerReference.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_packet_JScannerReference */ 4 | 5 | #ifndef _Included_org_jnetpcap_packet_JScannerReference 6 | #define _Included_org_jnetpcap_packet_JScannerReference 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: lock */ 11 | /* Inaccessible static: pending */ 12 | /* Inaccessible static: gc */ 13 | /* 14 | * Class: org_jnetpcap_packet_JScannerReference 15 | * Method: disposeNative 16 | * Signature: (J)V 17 | */ 18 | JNIEXPORT void JNICALL Java_org_jnetpcap_packet_JScannerReference_disposeNative 19 | (JNIEnv *, jobject, jlong); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_packet_PcapPacket.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_packet_PcapPacket */ 4 | 5 | #ifndef _Included_org_jnetpcap_packet_PcapPacket 6 | #define _Included_org_jnetpcap_packet_PcapPacket 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: directMemory */ 11 | /* Inaccessible static: directMemorySoft */ 12 | #undef org_jnetpcap_packet_PcapPacket_MAX_DIRECT_MEMORY_DEFAULT 13 | #define org_jnetpcap_packet_PcapPacket_MAX_DIRECT_MEMORY_DEFAULT 67108864LL 14 | /* Inaccessible static: POINTER */ 15 | #undef org_jnetpcap_packet_PcapPacket_DEFAULT_STATE_HEADER_COUNT 16 | #define org_jnetpcap_packet_PcapPacket_DEFAULT_STATE_HEADER_COUNT 20L 17 | /* Inaccessible static: defaultScanner */ 18 | /* Inaccessible static: out */ 19 | /* Inaccessible static: pool */ 20 | /* Inaccessible static: STATE_SIZE */ 21 | /* 22 | * Class: org_jnetpcap_packet_PcapPacket 23 | * Method: initIds 24 | * Signature: ()V 25 | */ 26 | JNIEXPORT void JNICALL Java_org_jnetpcap_packet_PcapPacket_initIds 27 | (JNIEnv *, jclass); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_util_Debug.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_util_Debug */ 4 | 5 | #ifndef _Included_org_jnetpcap_util_Debug 6 | #define _Included_org_jnetpcap_util_Debug 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: directMemory */ 11 | /* Inaccessible static: directMemorySoft */ 12 | #undef org_jnetpcap_util_Debug_MAX_DIRECT_MEMORY_DEFAULT 13 | #define org_jnetpcap_util_Debug_MAX_DIRECT_MEMORY_DEFAULT 67108864LL 14 | /* Inaccessible static: POINTER */ 15 | /* 16 | * Class: org_jnetpcap_util_Debug 17 | * Method: sizeof 18 | * Signature: ()I 19 | */ 20 | JNIEXPORT jint JNICALL Java_org_jnetpcap_util_Debug_sizeof 21 | (JNIEnv *, jclass); 22 | 23 | /* 24 | * Class: org_jnetpcap_util_Debug 25 | * Method: setLevel 26 | * Signature: (I)V 27 | */ 28 | JNIEXPORT void JNICALL Java_org_jnetpcap_util_Debug_setLevel 29 | (JNIEnv *, jobject, jint); 30 | 31 | /* 32 | * Class: org_jnetpcap_util_Debug 33 | * Method: getLevel 34 | * Signature: ()I 35 | */ 36 | JNIEXPORT jint JNICALL Java_org_jnetpcap_util_Debug_getLevel 37 | (JNIEnv *, jobject); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif 43 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_winpcap_WinPcapRmtAuth.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_winpcap_WinPcapRmtAuth */ 4 | 5 | #ifndef _Included_org_jnetpcap_winpcap_WinPcapRmtAuth 6 | #define _Included_org_jnetpcap_winpcap_WinPcapRmtAuth 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #undef org_jnetpcap_winpcap_WinPcapRmtAuth_RMT_AUTH_NULL 11 | #define org_jnetpcap_winpcap_WinPcapRmtAuth_RMT_AUTH_NULL 0L 12 | #undef org_jnetpcap_winpcap_WinPcapRmtAuth_RMT_AUTH_PWD 13 | #define org_jnetpcap_winpcap_WinPcapRmtAuth_RMT_AUTH_PWD 1L 14 | /* 15 | * Class: org_jnetpcap_winpcap_WinPcapRmtAuth 16 | * Method: initIDs 17 | * Signature: ()V 18 | */ 19 | JNIEXPORT void JNICALL Java_org_jnetpcap_winpcap_WinPcapRmtAuth_initIDs 20 | (JNIEnv *, jclass); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_winpcap_WinPcapSamp.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_winpcap_WinPcapSamp */ 4 | 5 | #ifndef _Included_org_jnetpcap_winpcap_WinPcapSamp 6 | #define _Included_org_jnetpcap_winpcap_WinPcapSamp 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #undef org_jnetpcap_winpcap_WinPcapSamp_NO_SAMP 11 | #define org_jnetpcap_winpcap_WinPcapSamp_NO_SAMP 0L 12 | #undef org_jnetpcap_winpcap_WinPcapSamp_ONE_EVERY_N 13 | #define org_jnetpcap_winpcap_WinPcapSamp_ONE_EVERY_N 1L 14 | #undef org_jnetpcap_winpcap_WinPcapSamp_FIRST_AFTER_N_MS 15 | #define org_jnetpcap_winpcap_WinPcapSamp_FIRST_AFTER_N_MS 2L 16 | /* 17 | * Class: org_jnetpcap_winpcap_WinPcapSamp 18 | * Method: initIDs 19 | * Signature: ()V 20 | */ 21 | JNIEXPORT void JNICALL Java_org_jnetpcap_winpcap_WinPcapSamp_initIDs 22 | (JNIEnv *, jclass); 23 | 24 | /* 25 | * Class: org_jnetpcap_winpcap_WinPcapSamp 26 | * Method: getMethod 27 | * Signature: ()I 28 | */ 29 | JNIEXPORT jint JNICALL Java_org_jnetpcap_winpcap_WinPcapSamp_getMethod 30 | (JNIEnv *, jobject); 31 | 32 | /* 33 | * Class: org_jnetpcap_winpcap_WinPcapSamp 34 | * Method: setMethod 35 | * Signature: (I)V 36 | */ 37 | JNIEXPORT void JNICALL Java_org_jnetpcap_winpcap_WinPcapSamp_setMethod 38 | (JNIEnv *, jobject, jint); 39 | 40 | /* 41 | * Class: org_jnetpcap_winpcap_WinPcapSamp 42 | * Method: getValue 43 | * Signature: ()I 44 | */ 45 | JNIEXPORT jint JNICALL Java_org_jnetpcap_winpcap_WinPcapSamp_getValue 46 | (JNIEnv *, jobject); 47 | 48 | /* 49 | * Class: org_jnetpcap_winpcap_WinPcapSamp 50 | * Method: setValue 51 | * Signature: (I)V 52 | */ 53 | JNIEXPORT void JNICALL Java_org_jnetpcap_winpcap_WinPcapSamp_setValue 54 | (JNIEnv *, jobject, jint); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #endif 60 | -------------------------------------------------------------------------------- /jni/org_jnetpcap_winpcap_WinPcapStat.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class org_jnetpcap_winpcap_WinPcapStat */ 4 | 5 | #ifndef _Included_org_jnetpcap_winpcap_WinPcapStat 6 | #define _Included_org_jnetpcap_winpcap_WinPcapStat 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* Inaccessible static: out */ 11 | /* 12 | * Class: org_jnetpcap_winpcap_WinPcapStat 13 | * Method: initIDs 14 | * Signature: ()V 15 | */ 16 | JNIEXPORT void JNICALL Java_org_jnetpcap_winpcap_WinPcapStat_initIDs 17 | (JNIEnv *, jclass); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /jni/packet_flow.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_packet_flow_h 4 | #define _Included_packet_flow_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_JFlowKey.h" 16 | 17 | #define FLOW_KEY_PAIR_COUNT org_jnetpcap_packet_JFlowKey_FLOW_KEY_PAIR_COUNT 18 | 19 | struct scan_t; // Forward reference 20 | 21 | /* 22 | * Flow key is made up of several key pairs. In order for a flow key to be 23 | * equal to another flow key, all the pair values must match. The flow pairs 24 | * can be bi-directional. If uni directional flag is not set, it means that the 25 | * second array of pairs is also in use and the values there are exact pair 26 | * reversal of the first array of pairs. 27 | */ 28 | typedef struct flow_key_t { 29 | uint64_t header_map; // bitmap of header IDs part of this flowkey 30 | uint32_t hash; // Hashcode 31 | #define FLOW_KEY_FLAG_REVERSABLE_PAIRS org_jnetpcap_packet_JFlowKey_FLAG_REVERSABLE 32 | uint16_t flags; // flags 33 | uint16_t pair_count; // number of pairs upto FLOW_KEY_PAIR_COUNT 34 | uint8_t id[FLOW_KEY_PAIR_COUNT]; 35 | uint32_t forward_pair[FLOW_KEY_PAIR_COUNT][2]; 36 | uint32_t reverse_pair[FLOW_KEY_PAIR_COUNT][2]; 37 | } flow_key_t; 38 | 39 | /** 40 | * Based on the first part of the key, it sets the second part of the key 41 | * using reversed direction values for each pair. flow_key_t->pair[2] is a 42 | * multi-dimensional array that has 2 sets of key pairs. [0] for forward keys 43 | * and [1] for reverse direction keys. 44 | */ 45 | void flow_key_init(flow_key_t *key, int id); 46 | 47 | void process_flow_key(scan_t *scan); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /jni/util_in_cksum.h: -------------------------------------------------------------------------------- 1 | /* in_cksum.h 2 | * Declaration of Internet checksum routine. 3 | * 4 | * $Id: in_cksum.h 12117 2004-09-28 00:06:32Z guy $ 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif /* __cplusplus */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct { 16 | const uint8_t *ptr; 17 | int len; 18 | } vec_t; 19 | 20 | extern uint16_t in_cksum(const vec_t *vec, int veclen); 21 | extern uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum); 22 | 23 | typedef union { 24 | uint8_t c[2]; 25 | uint16_t s; 26 | } pad_t; 27 | 28 | extern int in_checksum_pad_to_even( 29 | vec_t *vec, 30 | int veclen, 31 | pad_t *pad); 32 | 33 | extern int in_checksum_skip_crc16_field( 34 | const uint8_t *buf, // Buffer ptr 35 | vec_t *vec, 36 | int len, 37 | int crc_offset); 38 | 39 | extern int in_checksum_add_ip_pseudo_header( 40 | const uint8_t *buf, 41 | vec_t *vec, 42 | int type, 43 | int len, 44 | uint32_t phdr[2]); 45 | 46 | extern uint16_t psuedo_ip4_tcp( 47 | JNIEnv *env, 48 | const uint8_t *mem, 49 | size_t size, 50 | jint ip4, 51 | jint tcp); 52 | 53 | uint16_t psuedo_ip6_tcp( 54 | JNIEnv *env, 55 | const uint8_t *mem, 56 | size_t size, 57 | jint ip6, 58 | jint tcp); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif /* __cplusplus */ 64 | -------------------------------------------------------------------------------- /jni/winpcap_ext.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinPcapExtensions 5 | #define _Included_org_jnetpcap_WinPcapExtensions 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winPcapClass; 12 | 13 | // Prototypes 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /jni/winpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_winpcap_ids_h 4 | #define _Included_winpcap_ids_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | // WinPcapSamp 15 | extern jclass winPcapSampClass; 16 | extern jfieldID winPcapSampPhysicalFID; 17 | extern jmethodID winPcapSampConstructorMID; 18 | 19 | // WinPcapStat 20 | extern jclass WinPcapStatClass; 21 | extern jmethodID WinPcapStatConstructorMID; 22 | 23 | // WinPcapRmtAuth 24 | extern jclass winPcapRmtAuthClass; 25 | extern jfieldID winPcapRmtAuthTypeFID; 26 | extern jfieldID winPcapRmtAuthUsernameFID; 27 | extern jfieldID winPcapRmtAuthPasswordFID; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /jni/winpcap_stat_ex.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (C) 2007, Sly Technologies, Inc * 3 | * Distributed under the Lesser GNU Public License (LGPL) * 4 | ***************************************************************************/ 5 | 6 | /* 7 | * Main WinPcap extensions file for jNetPcap. 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #ifndef WIN32 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #else 26 | #include 27 | #endif /*WIN32*/ 28 | 29 | #include "winpcap_ext.h" 30 | #include "jnetpcap_utils.h" 31 | #include "jnetpcap_ids.h" 32 | #include "winpcap_ids.h" 33 | #include "export.h" 34 | 35 | 36 | 37 | /* 38 | * Function: new newWinPcapStat() 39 | * Description: allocates a new WinPcapStat object 40 | */ 41 | EXTERN jobject newWinPcapStat(JNIEnv *env) { 42 | if (WinPcapStatClass == NULL) { 43 | throwException(env, NULL_PTR_EXCEPTION, "Class ID not initialized"); 44 | return NULL; 45 | } 46 | 47 | jobject jstats = env->NewObject(WinPcapStatClass, WinPcapStatConstructorMID); 48 | return jstats; 49 | } 50 | 51 | /* 52 | * Function: setWinPcapStat 53 | * Description: copies from pcap_stat structure all the members into a WinPcapStat 54 | * object. Under MSDOS there are 21 fields within the structure. 55 | */ 56 | EXTERN void setWinPcapStat(JNIEnv *env, jobject jstats, 57 | struct pcap_stat *stats, int size) { 58 | 59 | #ifdef WIN32 60 | if (WinPcapStatClass == NULL) { 61 | throwException(env, NULL_PTR_EXCEPTION, "Class ID not initialized"); 62 | return; 63 | } 64 | 65 | setPcapStat(env, jstats, stats); // Sets 1st 3 66 | 67 | if (size <= 12) { 68 | return; 69 | } 70 | env->SetLongField(jstats, pcapStatCaptFID, (jlong) stats->ps_capt); 71 | 72 | if (size <= 16) { 73 | return; 74 | } 75 | env->SetLongField(jstats, pcapStatSentFID, (jlong) stats->ps_sent); 76 | 77 | if (size <= 20) { 78 | return; 79 | } 80 | env->SetLongField(jstats, pcapStatNetdropFID, (jlong) stats->ps_netdrop); 81 | #else 82 | throwException(env, (const char*)PCAP_EXTENSION_NOT_AVAILABLE_EXCEPTION, ""); 83 | return; 84 | #endif 85 | } 86 | 87 | 88 | -------------------------------------------------------------------------------- /jni/winpcap_stat_ex.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinWinPcapStat 5 | #define _Included_org_jnetpcap_WinWinPcapStat 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winWinPcapStatClass; 12 | 13 | // Prototypes 14 | jobject newWinPcapStat(JNIEnv *env); 15 | void setWinPcapStat(JNIEnv *env, jobject jstats, struct pcap_stat *stats, 16 | int size); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/libs/android-support-v4.jar -------------------------------------------------------------------------------- /libs/armeabi/libjnetpcap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/libs/armeabi/libjnetpcap.so -------------------------------------------------------------------------------- /lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /obj/convert-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # AUTO-GENERATED FILE, DO NOT EDIT! 3 | if [ -f $1.org ]; then 4 | sed -e 's!^C:/cygwin/lib!/usr/lib!ig;s! C:/cygwin/lib! /usr/lib!ig;s!^C:/cygwin/bin!/usr/bin!ig;s! C:/cygwin/bin! /usr/bin!ig;s!^C:/cygwin/!/!ig;s! C:/cygwin/! /!ig;s!^U:!/cygdrive/u!ig;s! U:! /cygdrive/u!ig;s!^T:!/cygdrive/t!ig;s! T:! /cygdrive/t!ig;s!^N:!/cygdrive/n!ig;s! N:! /cygdrive/n!ig;s!^M:!/cygdrive/m!ig;s! M:! /cygdrive/m!ig;s!^L:!/cygdrive/l!ig;s! L:! /cygdrive/l!ig;s!^K:!/cygdrive/k!ig;s! K:! /cygdrive/k!ig;s!^J:!/cygdrive/j!ig;s! J:! /cygdrive/j!ig;s!^E:!/cygdrive/e!ig;s! E:! /cygdrive/e!ig;s!^C:!/cygdrive/c!ig;s! C:! /cygdrive/c!ig;' $1.org > $1 && rm -f $1.org 5 | fi 6 | -------------------------------------------------------------------------------- /obj/local/armeabi/libjnetpcap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/libjnetpcap.so -------------------------------------------------------------------------------- /obj/local/armeabi/libpcap.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/libpcap.a -------------------------------------------------------------------------------- /obj/local/armeabi/libstdc++.a: -------------------------------------------------------------------------------- 1 | ! 2 | -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_beta.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_beta.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_bpf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_bpf.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_dumper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_dumper.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_ids.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_ids.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_pcap_header.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_pcap_header.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/jnetpcap_utils.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/jnetpcap_utils.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/nio_jbuffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/nio_jbuffer.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/nio_jmemory.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/nio_jmemory.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/nio_jnumber.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/nio_jnumber.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_flow.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_flow.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_jheader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_jheader.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_jheader_scanner.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_jheader_scanner.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_jpacket.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_jpacket.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_jscan.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_jscan.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_jsmall_scanner.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_jsmall_scanner.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/packet_protocol.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/packet_protocol.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_checksum.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/util_checksum.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_crc16.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/util_crc16.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_crc16.o.d: -------------------------------------------------------------------------------- 1 | obj/local/armeabi/objs/jnetpcap/util_crc16.o: jni/util_crc16.c \ 2 | jni/util_crc16.h \ 3 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/stdint.h \ 4 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_types.h \ 5 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/machine/_types.h \ 6 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h \ 7 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/android/api-level.h 8 | 9 | jni/util_crc16.h: 10 | 11 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/stdint.h: 12 | 13 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_types.h: 14 | 15 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/machine/_types.h: 16 | 17 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h: 18 | 19 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/android/api-level.h: 20 | -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_crc32.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/util_crc32.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_crc32.o.d: -------------------------------------------------------------------------------- 1 | obj/local/armeabi/objs/jnetpcap/util_crc32.o: jni/util_crc32.c \ 2 | jni/util_crc32.h \ 3 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/stdint.h \ 4 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_types.h \ 5 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/machine/_types.h \ 6 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h \ 7 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/android/api-level.h 8 | 9 | jni/util_crc32.h: 10 | 11 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/stdint.h: 12 | 13 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_types.h: 14 | 15 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/machine/_types.h: 16 | 17 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h: 18 | 19 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/platforms/android-8/arch-arm/usr/include/android/api-level.h: 20 | -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_debug.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/util_debug.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/util_in_cksum.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/util_in_cksum.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/winpcap_ext.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/winpcap_ext.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/winpcap_ids.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/winpcap_ids.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/winpcap_send_queue.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/winpcap_send_queue.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/jnetpcap/winpcap_stat_ex.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/jnetpcap/winpcap_stat_ex.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/bpf/net/bpf_filter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/bpf/net/bpf_filter.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/bpf_dump.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/bpf_dump.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/bpf_image.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/bpf_image.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/etherent.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/etherent.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/fad-gifc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/fad-gifc.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/gencode.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/gencode.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/grammar.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/grammar.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/inet.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/inet.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/nametoaddr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/nametoaddr.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/optimize.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/optimize.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/pcap-linux.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/pcap-linux.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/pcap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/pcap.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/savefile.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/savefile.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/scanner.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/scanner.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/version.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/obj/local/armeabi/objs/pcap/version.o -------------------------------------------------------------------------------- /obj/local/armeabi/objs/pcap/version.o.d: -------------------------------------------------------------------------------- 1 | obj/local/armeabi/objs/pcap/version.o: jni/libpcap/version.c 2 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library.reference.1=../../Downloads/tree-view-list-android-master/tree-view-list-android-master 16 | android.library.reference.2=../appcompat_v7_2 17 | -------------------------------------------------------------------------------- /rec.txt: -------------------------------------------------------------------------------- 1 | Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 11 in ./AndroidManifest.xml 2 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap.cpp 3 | [armeabi] Compile++ thumb: jnetpcap <= packet_flow.cpp 4 | [armeabi] Compile++ thumb: jnetpcap <= packet_jheader.cpp 5 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_pcap_header.cpp 6 | [armeabi] Compile++ thumb: jnetpcap <= nio_jbuffer.cpp 7 | [armeabi] Compile++ thumb: jnetpcap <= winpcap_stat_ex.cpp 8 | [armeabi] Compile++ thumb: jnetpcap <= winpcap_send_queue.cpp 9 | [armeabi] Compile++ thumb: jnetpcap <= winpcap_ext.cpp 10 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_ids.cpp 11 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_dumper.cpp 12 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_utils.cpp 13 | [armeabi] Compile++ thumb: jnetpcap <= util_in_cksum.cpp 14 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_beta.cpp 15 | [armeabi] Compile++ thumb: jnetpcap <= nio_jmemory.cpp 16 | [armeabi] Compile++ thumb: jnetpcap <= packet_jsmall_scanner.cpp 17 | [armeabi] Compile++ thumb: jnetpcap <= packet_protocol.cpp 18 | [armeabi] Compile++ thumb: jnetpcap <= nio_jnumber.cpp 19 | [armeabi] Compile++ thumb: jnetpcap <= packet_jheader_scanner.cpp 20 | [armeabi] Compile++ thumb: jnetpcap <= library.cpp 21 | [armeabi] Compile++ thumb: jnetpcap <= packet_jscan.cpp 22 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_pcap100.cpp 23 | [armeabi] Compile++ thumb: jnetpcap <= util_checksum.cpp 24 | [armeabi] Compile++ thumb: jnetpcap <= packet_jpacket.cpp 25 | [armeabi] Compile++ thumb: jnetpcap <= winpcap_ids.cpp 26 | [armeabi] Compile++ thumb: jnetpcap <= util_debug.cpp 27 | [armeabi] Compile++ thumb: jnetpcap <= jnetpcap_bpf.cpp 28 | [armeabi] SharedLibrary : libjnetpcap.so 29 | /cygdrive/n/Downloads/android-ndk-r9d-windows-x86/android-ndk-r9d/build/core/build-binary.mk:588: recipe for target `obj/local/armeabi/libjnetpcap.so' failed 30 | -------------------------------------------------------------------------------- /res/drawable-hdpi/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-hdpi/collapsed.png -------------------------------------------------------------------------------- /res/drawable-hdpi/expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-hdpi/expanded.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-hdpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable-ldpi/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-ldpi/collapsed.png -------------------------------------------------------------------------------- /res/drawable-ldpi/expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-ldpi/expanded.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-ldpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable-mdpi/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-mdpi/collapsed.png -------------------------------------------------------------------------------- /res/drawable-mdpi/expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-mdpi/expanded.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-mdpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-xhdpi/collapsed.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-xhdpi/expanded.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-xhdpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-xxhdpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_launcher_pcap_reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable-xxxhdpi/ic_launcher_pcap_reader.png -------------------------------------------------------------------------------- /res/drawable/directory_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable/directory_icon.png -------------------------------------------------------------------------------- /res/drawable/directory_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable/directory_up.png -------------------------------------------------------------------------------- /res/drawable/file_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GlacialSoftware/PCAPReader/e7b94083cc92b6312ab99de5a7c4e2a770e7fb4e/res/drawable/file_icon.png -------------------------------------------------------------------------------- /res/drawable/item_packet_tree_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 15 | 16 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/layout/activity_pcap_display.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/layout/activity_pcap_open.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/layout/fragment_license.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /res/layout/fragment_packet_details.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /res/layout/fragment_packet_list.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /res/layout/fragment_pcap_open.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 |