From 533dd40c122254be5828e2b2a22d9496fca3f660 Mon Sep 17 00:00:00 2001 From: Ardika Rommy Sanjaya Date: Mon, 4 Dec 2023 12:03:06 +0700 Subject: [PATCH] Bump version --- CHANGES.md | 10 + codec/pom.xml | 2 +- .../java/pcap/codec/AbstractPacketTest.java | 25 +- .../pcap/codec/ethernet/EthernetTest.java | 11 +- .../src/test/java/pcap/codec/ip/Ip4Test.java | 22 +- .../src/test/java/pcap/codec/ip/Ip6Test.java | 11 +- .../pcap/codec/loopback/LoopbackTest.java | 11 +- .../src/test/java/pcap/codec/sll/SllTest.java | 11 +- .../src/test/java/pcap/codec/tcp/TcpTest.java | 22 +- .../src/test/java/pcap/codec/udp/UdpTest.java | 11 +- common/pom.xml | 2 +- .../main/java/pcap/common/net/MacAddress.java | 1 + jdk7/pom.xml | 2 +- .../jdk7/internal/DefaultPollSelector.java | 8 +- .../pcap/jdk7/internal/DefaultService.java | 18 +- ...DefaultWaitForMultipleObjectsSelector.java | 8 +- .../pcap/jdk7/internal/NativeMappings.java | 1 - .../jdk7/internal/DefaultPcapDumperTest.java | 22 +- .../pcap/jdk7/internal/DefaultPcapTest.java | 350 +++++++++++++----- .../jdk7/internal/DefaultServiceTest.java | 22 +- pom.xml | 54 +-- spi/pom.xml | 2 +- spi/src/main/java/pcap/spi/Interface.java | 1 + spi/src/main/java/pcap/spi/PacketBuffer.java | 1 + spi/src/main/java/pcap/spi/Selector.java | 8 +- spi/src/main/java/pcap/spi/Service.java | 11 +- spi/src/test/java/pcap/spi/ServiceTest.java | 11 +- tests/pom.xml | 2 +- 28 files changed, 468 insertions(+), 192 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bb63decd..5863d45e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,16 @@ SPDX-License-Identifier: MIT OR Apache-2.0 All notable changes to this project will be documented in this file. +## [1.5.1] - 2023-12-04 + +## Added + +* Adding dll search path for Npcap. [#295](https://github.com/ardikars/pcap/pull/295) + +## Fixed + +* Fix typo [#293](https://github.com/ardikars/pcap/discussions/293) + ## [1.5.0] - 2023-01-01 ### Added diff --git a/codec/pom.xml b/codec/pom.xml index d24d17f8..54c1d960 100644 --- a/codec/pom.xml +++ b/codec/pom.xml @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 pcap com.ardikars.pcap - 1.5.0 + 1.5.1 4.0.0 diff --git a/codec/src/test/java/pcap/codec/AbstractPacketTest.java b/codec/src/test/java/pcap/codec/AbstractPacketTest.java index 2fa56d78..ac98f770 100644 --- a/codec/src/test/java/pcap/codec/AbstractPacketTest.java +++ b/codec/src/test/java/pcap/codec/AbstractPacketTest.java @@ -34,9 +34,14 @@ class AbstractPacketTest { @Test void equalsAndHasCodeTest() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { @@ -70,10 +75,16 @@ void equalsAndHasCodeTest() @Test void calculate() - throws UnknownHostException, ErrorException, PermissionDeniedException, - PromiscuousModePermissionDeniedException, TimestampPrecisionNotSupportedException, - RadioFrequencyModeNotSupportedException, NoSuchDeviceException, ActivatedException, - InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { + throws UnknownHostException, + ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException { InetAddress dstIp4 = Inet4Address.getByName("127.0.0.1"); InetAddress srcIp4 = Inet4Address.getByName("127.0.0.1"); InetAddress dstIp6 = Inet4Address.getByName("::1"); diff --git a/codec/src/test/java/pcap/codec/ethernet/EthernetTest.java b/codec/src/test/java/pcap/codec/ethernet/EthernetTest.java index a516b262..ab790a6b 100644 --- a/codec/src/test/java/pcap/codec/ethernet/EthernetTest.java +++ b/codec/src/test/java/pcap/codec/ethernet/EthernetTest.java @@ -29,9 +29,14 @@ class EthernetTest { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/codec/src/test/java/pcap/codec/ip/Ip4Test.java b/codec/src/test/java/pcap/codec/ip/Ip4Test.java index 6236f16c..297e5864 100644 --- a/codec/src/test/java/pcap/codec/ip/Ip4Test.java +++ b/codec/src/test/java/pcap/codec/ip/Ip4Test.java @@ -29,9 +29,14 @@ class Ip4Test { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { @@ -214,9 +219,14 @@ public void execute() throws Throwable { // see: https://github.com/ardikars/pcap/issues/149 @Test void issue149() - throws ErrorException, RadioFrequencyModeNotSupportedException, ActivatedException, - InterfaceNotSupportTimestampTypeException, PromiscuousModePermissionDeniedException, - InterfaceNotUpException, PermissionDeniedException, NoSuchDeviceException, + throws ErrorException, + RadioFrequencyModeNotSupportedException, + ActivatedException, + InterfaceNotSupportTimestampTypeException, + PromiscuousModePermissionDeniedException, + InterfaceNotUpException, + PermissionDeniedException, + NoSuchDeviceException, TimestampPrecisionNotSupportedException { final byte[] bytes = Hexs.parseHex( diff --git a/codec/src/test/java/pcap/codec/ip/Ip6Test.java b/codec/src/test/java/pcap/codec/ip/Ip6Test.java index 75e64f3f..212b832e 100644 --- a/codec/src/test/java/pcap/codec/ip/Ip6Test.java +++ b/codec/src/test/java/pcap/codec/ip/Ip6Test.java @@ -31,9 +31,14 @@ class Ip6Test { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/codec/src/test/java/pcap/codec/loopback/LoopbackTest.java b/codec/src/test/java/pcap/codec/loopback/LoopbackTest.java index ceac6ca9..6bab5533 100644 --- a/codec/src/test/java/pcap/codec/loopback/LoopbackTest.java +++ b/codec/src/test/java/pcap/codec/loopback/LoopbackTest.java @@ -30,9 +30,14 @@ class LoopbackTest { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/codec/src/test/java/pcap/codec/sll/SllTest.java b/codec/src/test/java/pcap/codec/sll/SllTest.java index 58ae9bbf..ccf76f88 100644 --- a/codec/src/test/java/pcap/codec/sll/SllTest.java +++ b/codec/src/test/java/pcap/codec/sll/SllTest.java @@ -32,9 +32,14 @@ class SllTest { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/codec/src/test/java/pcap/codec/tcp/TcpTest.java b/codec/src/test/java/pcap/codec/tcp/TcpTest.java index 37ddfe75..cd58abf2 100644 --- a/codec/src/test/java/pcap/codec/tcp/TcpTest.java +++ b/codec/src/test/java/pcap/codec/tcp/TcpTest.java @@ -33,9 +33,14 @@ class TcpTest { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { @@ -178,9 +183,14 @@ public void execute() throws Throwable { @Test void flags() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/codec/src/test/java/pcap/codec/udp/UdpTest.java b/codec/src/test/java/pcap/codec/udp/UdpTest.java index bd7e23c7..d4eb4d8f 100644 --- a/codec/src/test/java/pcap/codec/udp/UdpTest.java +++ b/codec/src/test/java/pcap/codec/udp/UdpTest.java @@ -32,9 +32,14 @@ class UdpTest { @Test void readWrite() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Service service = Service.Creator.create("PcapService"); try (final Pcap pcap = service.live(service.interfaces(), new DefaultLiveOptions())) { diff --git a/common/pom.xml b/common/pom.xml index 8477129c..21ab3fc9 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 pcap com.ardikars.pcap - 1.5.0 + 1.5.1 4.0.0 diff --git a/common/src/main/java/pcap/common/net/MacAddress.java b/common/src/main/java/pcap/common/net/MacAddress.java index b9399d35..7ba3fab7 100644 --- a/common/src/main/java/pcap/common/net/MacAddress.java +++ b/common/src/main/java/pcap/common/net/MacAddress.java @@ -22,6 +22,7 @@ public final class MacAddress implements Serializable { public static final int MAC_ADDRESS_LENGTH = 6; private static final Pattern REGEX = Pattern.compile("[:-]"); + /** Zero MAC Address (00:00:00:00:00:00). */ public static final MacAddress ZERO = valueOf("00:00:00:00:00:00"); diff --git a/jdk7/pom.xml b/jdk7/pom.xml index 49cbfc41..50d62d2e 100644 --- a/jdk7/pom.xml +++ b/jdk7/pom.xml @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 pcap com.ardikars.pcap - 1.5.0 + 1.5.1 4.0.0 diff --git a/jdk7/src/main/java/pcap/jdk7/internal/DefaultPollSelector.java b/jdk7/src/main/java/pcap/jdk7/internal/DefaultPollSelector.java index b194bf45..2d3a437a 100644 --- a/jdk7/src/main/java/pcap/jdk7/internal/DefaultPollSelector.java +++ b/jdk7/src/main/java/pcap/jdk7/internal/DefaultPollSelector.java @@ -136,7 +136,9 @@ void interestOperations(DefaultSelection selection, int interestOperations) { @Override public Iterable select(Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { checkOpenState(); validateSelect(timeout); @@ -150,7 +152,9 @@ public Iterable select(Timeout timeout) @Override public int select(Consumer consumer, Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { checkOpenState(); validateSelect(timeout); diff --git a/jdk7/src/main/java/pcap/jdk7/internal/DefaultService.java b/jdk7/src/main/java/pcap/jdk7/internal/DefaultService.java index 608d3fef..4ea8f31a 100644 --- a/jdk7/src/main/java/pcap/jdk7/internal/DefaultService.java +++ b/jdk7/src/main/java/pcap/jdk7/internal/DefaultService.java @@ -70,9 +70,14 @@ public Pcap offline(String source, OfflineOptions options) throws ErrorException @Override public Pcap live(Interface source, LiveOptions options) - throws InterfaceNotSupportTimestampTypeException, InterfaceNotUpException, - RadioFrequencyModeNotSupportedException, ActivatedException, PermissionDeniedException, - NoSuchDeviceException, PromiscuousModePermissionDeniedException, ErrorException, + throws InterfaceNotSupportTimestampTypeException, + InterfaceNotUpException, + RadioFrequencyModeNotSupportedException, + ActivatedException, + PermissionDeniedException, + NoSuchDeviceException, + PromiscuousModePermissionDeniedException, + ErrorException, TimestampPrecisionNotSupportedException { Utils.requireNonNull(source, "source: null (expected: source != null)."); Pointer pointer = NativeMappings.PLATFORM_DEPENDENT.pcap_create(source.name(), errbuf(true)); @@ -258,8 +263,11 @@ void checkSetTimestampPrecision(int result) } void checkActivate(Pointer pointer, int result) - throws PromiscuousModePermissionDeniedException, RadioFrequencyModeNotSupportedException, - InterfaceNotUpException, NoSuchDeviceException, ActivatedException, + throws PromiscuousModePermissionDeniedException, + RadioFrequencyModeNotSupportedException, + InterfaceNotUpException, + NoSuchDeviceException, + ActivatedException, PermissionDeniedException { String message = "Error occurred when activate a handle"; if (result == 2) { diff --git a/jdk7/src/main/java/pcap/jdk7/internal/DefaultWaitForMultipleObjectsSelector.java b/jdk7/src/main/java/pcap/jdk7/internal/DefaultWaitForMultipleObjectsSelector.java index 3205cbbe..c83127ca 100644 --- a/jdk7/src/main/java/pcap/jdk7/internal/DefaultWaitForMultipleObjectsSelector.java +++ b/jdk7/src/main/java/pcap/jdk7/internal/DefaultWaitForMultipleObjectsSelector.java @@ -81,7 +81,9 @@ void interestOperations(DefaultSelection selection, int interestOperations) { @Override public Iterable select(Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { checkOpenState(); validateSelect(timeout); @@ -95,7 +97,9 @@ public Iterable select(Timeout timeout) @Override public int select(Consumer consumer, Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { checkOpenState(); validateSelect(timeout); diff --git a/jdk7/src/main/java/pcap/jdk7/internal/NativeMappings.java b/jdk7/src/main/java/pcap/jdk7/internal/NativeMappings.java index 543b47fe..7419aa25 100644 --- a/jdk7/src/main/java/pcap/jdk7/internal/NativeMappings.java +++ b/jdk7/src/main/java/pcap/jdk7/internal/NativeMappings.java @@ -16,7 +16,6 @@ import com.sun.jna.PointerType; import com.sun.jna.Structure; import com.sun.jna.ptr.PointerByReference; - import java.io.File; import java.lang.reflect.Method; import java.net.InetAddress; diff --git a/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapDumperTest.java b/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapDumperTest.java index 4b14acbf..7831a652 100644 --- a/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapDumperTest.java +++ b/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapDumperTest.java @@ -50,9 +50,14 @@ void setUp() throws ErrorException { @Test void dump() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface source = loopbackInterface(service); try (Pcap live = service.live(source, new DefaultLiveOptions())) { @@ -134,9 +139,14 @@ public void execute() throws Throwable { @Test void equalsAndHashCode() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface source = loopbackInterface(service); try (Pcap live = service.live(source, new DefaultLiveOptions())) { diff --git a/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapTest.java b/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapTest.java index c3eac1f6..c89d2846 100644 --- a/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapTest.java +++ b/jdk7/src/test/java/pcap/jdk7/internal/DefaultPcapTest.java @@ -69,9 +69,14 @@ void setUp() throws ErrorException { @Test void dumpOpen() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); String newFile; @@ -111,9 +116,14 @@ public void execute() throws Throwable { @Test void dumpOpenAppend() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); Assertions.assertTrue(Files.exists(Paths.get(SAMPLE_NANOSECOND_PCAP))); @@ -170,9 +180,14 @@ public void execute() throws Throwable { @Test void setFilter() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -203,9 +218,14 @@ public void execute() throws Throwable { @Test void loop() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -262,9 +282,14 @@ public void execute() throws Throwable { @Test void dispatch() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -321,9 +346,14 @@ public void execute() throws Throwable { @Test void next() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = @@ -357,9 +387,14 @@ public void execute() throws Throwable { @Test void nextEx() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -469,9 +504,14 @@ public void execute() throws Throwable { @Test void stats() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -505,10 +545,16 @@ public void execute() throws Throwable { @Test void breakLoop() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, - InterfaceNotSupportTimestampTypeException, InterruptedException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException, + InterruptedException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { Assertions.assertThrows( @@ -598,9 +644,14 @@ public void gotPacket(String args, PacketHeader header, PacketBuffer buffer) { @Test void injectAndSendPacket() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -674,9 +725,14 @@ public void execute() throws Throwable { @Test void setDirection() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -726,10 +782,16 @@ public void execute() throws Throwable { @Test void isSwapped() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, - InterfaceNotSupportTimestampTypeException, NotActivatedException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException, + NotActivatedException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { Assertions.assertFalse(live.isSwapped()); @@ -741,10 +803,16 @@ void isSwapped() @Test void majorVersion() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, - InterfaceNotSupportTimestampTypeException, NotActivatedException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException, + NotActivatedException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { Assertions.assertTrue(live.majorVersion() >= 0 || live.majorVersion() <= 0); @@ -756,10 +824,16 @@ void majorVersion() @Test void minorVersion() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, - InterfaceNotSupportTimestampTypeException, NotActivatedException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException, + NotActivatedException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { Assertions.assertTrue(live.minorVersion() >= 0 || live.majorVersion() <= 0); @@ -771,9 +845,14 @@ void minorVersion() @Test void snapshot() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -786,9 +865,14 @@ void snapshot() @Test void getNonBlock() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -805,9 +889,14 @@ void getNonBlock() @Test void setNonBlock() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -841,9 +930,14 @@ public void execute() throws Throwable { @Test void datalink() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -856,9 +950,14 @@ void datalink() @Test void allocate() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -911,9 +1010,14 @@ public void execute() throws Throwable { @Test void nullCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); final DefaultService defaultService = (DefaultService) this.service; @@ -944,9 +1048,14 @@ public void execute() throws Throwable { @Test void compileCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -969,9 +1078,14 @@ public void execute() throws Throwable { @Test void filterCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -992,9 +1106,14 @@ public void execute() throws Throwable { @Test void loopCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { try (Pcap offline = service.offline(SAMPLE_MICROSECOND_PCAP, new DefaultOfflineOptions())) { final DefaultPcap pcap = (DefaultPcap) offline; @@ -1099,9 +1218,14 @@ public void execute() throws Throwable { @Test void statsCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1120,9 +1244,14 @@ public void execute() throws Throwable { @Test void injectCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1141,9 +1270,14 @@ public void execute() throws Throwable { @Test void directionCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1163,9 +1297,14 @@ public void execute() throws Throwable { @Test void getNonBlockCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1184,9 +1323,14 @@ public void execute() throws Throwable { @Test void setNonBlockCheck() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1224,9 +1368,14 @@ public void execute() throws Throwable { @Test void getTimestampPrecision() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - RadioFrequencyModeNotSupportedException, NoSuchDeviceException, ActivatedException, - InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions().timestampPrecision(Timestamp.Precision.MICRO))) { @@ -1249,9 +1398,14 @@ void timestampPrecision() { @Test void checkBuffer() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, InterfaceNotSupportTimestampTypeException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions())) { @@ -1963,14 +2117,18 @@ static final class BadSelector implements Selector { @Override public Iterable select(Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { return null; } @Override public int select(Consumer consumer, Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException { return 0; } diff --git a/jdk7/src/test/java/pcap/jdk7/internal/DefaultServiceTest.java b/jdk7/src/test/java/pcap/jdk7/internal/DefaultServiceTest.java index 76e11d71..754ae1a2 100644 --- a/jdk7/src/test/java/pcap/jdk7/internal/DefaultServiceTest.java +++ b/jdk7/src/test/java/pcap/jdk7/internal/DefaultServiceTest.java @@ -69,10 +69,16 @@ void interfaces() throws ErrorException { @Test void live() - throws ErrorException, PermissionDeniedException, PromiscuousModePermissionDeniedException, - TimestampPrecisionNotSupportedException, RadioFrequencyModeNotSupportedException, - NoSuchDeviceException, ActivatedException, InterfaceNotUpException, - InterfaceNotSupportTimestampTypeException, BreakException { + throws ErrorException, + PermissionDeniedException, + PromiscuousModePermissionDeniedException, + TimestampPrecisionNotSupportedException, + RadioFrequencyModeNotSupportedException, + NoSuchDeviceException, + ActivatedException, + InterfaceNotUpException, + InterfaceNotSupportTimestampTypeException, + BreakException { Interface lo = loopbackInterface(service); try (Pcap live = service.live(lo, new DefaultLiveOptions().snapshotLength(-1))) { Assertions.assertNotNull(live); @@ -399,8 +405,12 @@ public void execute() throws Throwable { @Test void checkActivate() - throws ErrorException, PromiscuousModePermissionDeniedException, PermissionDeniedException, - RadioFrequencyModeNotSupportedException, ActivatedException, InterfaceNotUpException, + throws ErrorException, + PromiscuousModePermissionDeniedException, + PermissionDeniedException, + RadioFrequencyModeNotSupportedException, + ActivatedException, + InterfaceNotUpException, NoSuchDeviceException { final DefaultService defaultService = (DefaultService) service; Interface lo = loopbackInterface(defaultService); diff --git a/pom.xml b/pom.xml index 338ac0ce..1fc55593 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 com.ardikars.pcap pcap pom - 1.5.0 + 1.5.1 spi @@ -57,44 +57,44 @@ SPDX-License-Identifier: MIT OR Apache-2.0 UTF-8 UTF-8 17 - 1.7 + 17 ${java.version} - 2.0.0 - 1.4.5 - 2.19.0 + 2.0.9 + 1.4.14 + 2.22.0 - 5.12.1 - 1.36 + 5.13.0 + 1.37 - 4.9.0 - 5.9.1 - 1.9.1 + 5.2.0 + 5.10.1 + 1.10.1 - 2.19 - 0.8.8 + 2.21.1 + 0.8.11 1.6.13 - 3.9.1.2184 + 3.10.0.2594 1.9 - 9.4 + 9.6 - 3.4.2 - 3.2.1 + 3.6.0 + 3.3.0 3.3.0 - 3.4.1 + 3.6.2 3.1.0 - 3.10.1 - 3.2.0 - 3.3.0 - 3.1.0 - 3.0.0 + 3.11.0 + 3.3.2 + 3.3.1 + 3.1.1 + 3.1.1 3.12.1 3.3.1 - 3.0.1 - 3.1.0 - 2.22.2 - 3.0.0-M7 - 3.4.1 + 3.1.0 + 3.4.1 + 3.2.2 + 3.2.2 + 3.5.0 tests/target/site/jacoco-aggregate/jacoco.xml **/src/test/java/**/*.java diff --git a/spi/pom.xml b/spi/pom.xml index d25183f6..f0ef4ed1 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 pcap com.ardikars.pcap - 1.5.0 + 1.5.1 4.0.0 diff --git a/spi/src/main/java/pcap/spi/Interface.java b/spi/src/main/java/pcap/spi/Interface.java index b9e01f62..fa8a9b78 100644 --- a/spi/src/main/java/pcap/spi/Interface.java +++ b/spi/src/main/java/pcap/spi/Interface.java @@ -45,6 +45,7 @@ public interface Interface extends Iterable { * @since 1.4.0 */ int PCAP_IF_CONNECTION_STATUS = 0x00000030; + /** * Unknown. * diff --git a/spi/src/main/java/pcap/spi/PacketBuffer.java b/spi/src/main/java/pcap/spi/PacketBuffer.java index 66421113..71bfbee8 100644 --- a/spi/src/main/java/pcap/spi/PacketBuffer.java +++ b/spi/src/main/java/pcap/spi/PacketBuffer.java @@ -1382,6 +1382,7 @@ enum ByteOrder { * @since 1.0.0 */ LITTLE_ENDIAN; + /** * Get native byte order. * diff --git a/spi/src/main/java/pcap/spi/Selector.java b/spi/src/main/java/pcap/spi/Selector.java index cf2dff91..c610add6 100644 --- a/spi/src/main/java/pcap/spi/Selector.java +++ b/spi/src/main/java/pcap/spi/Selector.java @@ -31,7 +31,9 @@ public interface Selector extends AutoCloseable { * @since 1.1.0 */ Iterable select(Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException; /** @@ -51,7 +53,9 @@ Iterable select(Timeout timeout) * @since 1.4.0 */ int select(Consumer consumer, Timeout timeout) - throws TimeoutException, NoSuchSelectableException, IllegalStateException, + throws TimeoutException, + NoSuchSelectableException, + IllegalStateException, IllegalArgumentException; /** diff --git a/spi/src/main/java/pcap/spi/Service.java b/spi/src/main/java/pcap/spi/Service.java index c094f5d1..4a05aec9 100644 --- a/spi/src/main/java/pcap/spi/Service.java +++ b/spi/src/main/java/pcap/spi/Service.java @@ -80,9 +80,14 @@ public interface Service { * @since 1.0.0 */ Pcap live(Interface source, LiveOptions options) - throws InterfaceNotSupportTimestampTypeException, InterfaceNotUpException, - RadioFrequencyModeNotSupportedException, ActivatedException, PermissionDeniedException, - NoSuchDeviceException, PromiscuousModePermissionDeniedException, ErrorException, + throws InterfaceNotSupportTimestampTypeException, + InterfaceNotUpException, + RadioFrequencyModeNotSupportedException, + ActivatedException, + PermissionDeniedException, + NoSuchDeviceException, + PromiscuousModePermissionDeniedException, + ErrorException, TimestampPrecisionNotSupportedException; /** diff --git a/spi/src/test/java/pcap/spi/ServiceTest.java b/spi/src/test/java/pcap/spi/ServiceTest.java index d19e330b..c7f2c14d 100644 --- a/spi/src/test/java/pcap/spi/ServiceTest.java +++ b/spi/src/test/java/pcap/spi/ServiceTest.java @@ -97,9 +97,14 @@ public Pcap offline(String source, OfflineOptions options) throws ErrorException /** {@inheritDoc} */ @Override public Pcap live(Interface source, LiveOptions options) - throws InterfaceNotSupportTimestampTypeException, InterfaceNotUpException, - RadioFrequencyModeNotSupportedException, ActivatedException, PermissionDeniedException, - NoSuchDeviceException, PromiscuousModePermissionDeniedException, ErrorException, + throws InterfaceNotSupportTimestampTypeException, + InterfaceNotUpException, + RadioFrequencyModeNotSupportedException, + ActivatedException, + PermissionDeniedException, + NoSuchDeviceException, + PromiscuousModePermissionDeniedException, + ErrorException, TimestampPrecisionNotSupportedException { throw new ErrorException("No API implementation."); } diff --git a/tests/pom.xml b/tests/pom.xml index c4e089c3..0b12b0f1 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0 pcap com.ardikars.pcap - 1.5.0 + 1.5.1 4.0.0