From e7c4eb85f6161eb1ccda5c1e5f3e89a9bf55391f Mon Sep 17 00:00:00 2001 From: Ayoub Kaanich Date: Fri, 5 Jan 2024 02:03:32 +0100 Subject: [PATCH] Change license to MIT (#494) --- .appveyor.yml | 3 + .circleci/config.yml | 3 + .gitattributes | 3 + .github/workflows/dotnet-core.yml | 15 ++ .gitignore | 7 +- .reuse/dep5 | 31 ++++ .semaphore/semaphore.yml | 3 + Directory.Build.props | 4 + Examples/CreatingCaptureFile/Program.cs | 2 + Examples/Example1.IfList/Example1.IfList.cs | 2 + .../Example10.SendQueues.cs | 2 + .../Example11.Statistics.cs | 2 + .../Example12.PacketManipulation/Program.cs | 2 + Examples/Example2.ArpResolve/Program.cs | 30 +--- Examples/Example3.BasicCap/Program.cs | 2 + .../Example4.BasicCapNoCallback.cs | 2 + Examples/Example5.PcapFilter/Program.cs | 2 + Examples/Example6.DumpTCP/Program.cs | 2 + .../Example9.SendPacket.cs | 2 + Examples/MultipleFiltersOnDevice/Program.cs | 2 + Examples/NpcapRemoteCapture/Program.cs | 2 + .../Program.cs | 2 + Examples/ReadingCaptureFile/Program.cs | 2 + Examples/WakeOnLan/Program.cs | 22 +-- .../WinformsExample/CaptureForm.Designer.cs | 2 + Examples/WinformsExample/CaptureForm.cs | 2 + .../DeviceListForm.Designer.cs | 2 + Examples/WinformsExample/DeviceListForm.cs | 2 + Examples/WinformsExample/Program.cs | 2 + Examples/WinpkFilterExample/Program.cs | 2 + LICENSE | 165 ------------------ LICENSES/MIT.txt | 9 + SharpPcap/ARP.cs | 24 +-- SharpPcap/AuthenticationTypes.cs | 22 +-- SharpPcap/BaseLiveDevice.cs | 22 +-- SharpPcap/CaptureDeviceExtensions.cs | 6 +- SharpPcap/CaptureDeviceList.cs | 22 +-- SharpPcap/CaptureStoppedEventHandler.cs | 24 +-- SharpPcap/CaptureStoppedEventStatus.cs | 22 +-- SharpPcap/DeviceConfiguration.cs | 22 +-- SharpPcap/DeviceModes.cs | 22 +-- SharpPcap/DeviceNotReadyException.cs | 24 +-- SharpPcap/GetPacketStatus.cs | 5 +- SharpPcap/ICaptureDevice.cs | 22 +-- SharpPcap/ICaptureHeader.cs | 5 +- SharpPcap/ICaptureStatistics.cs | 23 +-- SharpPcap/IInjectionDevice.cs | 22 +-- SharpPcap/ILiveDevice.cs | 22 +-- SharpPcap/IPcapDevice.cs | 22 +-- ...erationDuringBackgroundCaptureException.cs | 22 +-- SharpPcap/LibPcap/BpfProgram.cs | 24 +-- SharpPcap/LibPcap/CaptureFileReaderDevice.cs | 22 +-- SharpPcap/LibPcap/CaptureFileWriterDevice.cs | 22 +-- .../LibPcap/CaptureHandleReaderDevice.cs | 18 +- SharpPcap/LibPcap/CaptureReaderDevice.cs | 3 + SharpPcap/LibPcap/LibPcapLiveDevice.cs | 26 +-- SharpPcap/LibPcap/LibPcapLiveDeviceList.cs | 24 +-- .../LibPcapSafeNativeMethods.Encoding.cs | 28 +-- .../LibPcapSafeNativeMethods.Interop.cs | 26 +-- .../LibPcapSafeNativeMethods.Resolver.cs | 22 +-- SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs | 26 +-- SharpPcap/LibPcap/NativeLibraryHelper.cs | 5 +- SharpPcap/LibPcap/PcapAddress.cs | 24 +-- SharpPcap/LibPcap/PcapDevice.cs | 22 +-- SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs | 26 +-- SharpPcap/LibPcap/PcapHandle.cs | 24 +-- SharpPcap/LibPcap/PcapHeader.cs | 24 +-- SharpPcap/LibPcap/PcapInterface.cs | 24 +-- SharpPcap/LibPcap/PcapStatistics.cs | 23 +-- SharpPcap/LibPcap/PcapUnmanagedStructures.cs | 24 +-- SharpPcap/LibPcap/SendQueue.cs | 26 +-- SharpPcap/LibPcap/SendQueueTransmitModes.cs | 23 +-- SharpPcap/LibPcap/Sockaddr.cs | 24 +-- SharpPcap/LibPcap/WindowsNativeMethods.cs | 5 +- SharpPcap/MonitorMode.cs | 23 +-- SharpPcap/PacketArrivalEventHandler.cs | 25 +-- SharpPcap/PacketCapture.cs | 25 +-- SharpPcap/Pcap.cs | 26 +-- SharpPcap/PcapClock.cs | 6 +- SharpPcap/PcapError.cs | 22 +-- SharpPcap/PcapException.cs | 26 +-- SharpPcap/Posix.cs | 22 +-- SharpPcap/PosixTimeval.cs | 22 +-- SharpPcap/RawCapture.cs | 22 +-- SharpPcap/RemoteAuthentication.cs | 3 + SharpPcap/SharpPcap.csproj | 13 +- SharpPcap/Statistics/CaptureMode.cs | 23 +-- SharpPcap/Statistics/StatisticsDevice.cs | 22 +-- SharpPcap/Statistics/StatisticsEventArgs.cs | 24 +-- SharpPcap/StatisticsException.cs | 22 +-- SharpPcap/TimestampResolution.cs | 5 +- SharpPcap/TimestampSourceResolution.cs | 5 +- SharpPcap/TimestampType.cs | 5 +- SharpPcap/Tunneling/IPAddressConfiguration.cs | 6 +- SharpPcap/Tunneling/ITunnelDriver.cs | 6 +- SharpPcap/Tunneling/TunnelDevice.cs | 6 +- SharpPcap/Tunneling/TunnelHeader.cs | 6 +- SharpPcap/Tunneling/Unix/IffFlags.cs | 6 +- SharpPcap/Tunneling/Unix/Ifreq.cs | 6 +- SharpPcap/Tunneling/Unix/IocDir.cs | 6 +- SharpPcap/Tunneling/Unix/NetDeviceFlags.cs | 6 +- SharpPcap/Tunneling/Unix/SocketIoctl.cs | 6 +- SharpPcap/Tunneling/Unix/TuntapDriver.cs | 6 +- SharpPcap/Tunneling/WinTap/TapIoControl.cs | 6 +- SharpPcap/Tunneling/WinTap/WinFileAccess.cs | 6 +- .../Tunneling/WinTap/WinFileAttributes.cs | 6 +- SharpPcap/Tunneling/WinTap/WinFileCreation.cs | 6 +- SharpPcap/Tunneling/WinTap/WinTapDriver.cs | 6 +- SharpPcap/WinDivert/IpHelper.cs | 6 +- SharpPcap/WinDivert/WinDivertAddress.cs | 6 +- SharpPcap/WinDivert/WinDivertDevice.cs | 6 +- SharpPcap/WinDivert/WinDivertHeader.cs | 6 +- SharpPcap/WinDivert/WinDivertLayer.cs | 36 +--- SharpPcap/WinDivert/WinDivertNative.cs | 6 +- SharpPcap/WinDivert/WinDivertPacketFlags.cs | 6 +- SharpPcap/WinDivert/WinDivertParam.cs | 6 +- SharpPcap/WinpkFilter/AdapterMode.cs | 6 +- SharpPcap/WinpkFilter/AdapterModes.cs | 6 +- SharpPcap/WinpkFilter/DriverHandle.cs | 6 +- SharpPcap/WinpkFilter/EthRequest.cs | 6 +- .../WinpkFilter/HardwarePacketFilters.cs | 6 +- SharpPcap/WinpkFilter/IntermediateBuffer.cs | 6 +- SharpPcap/WinpkFilter/Kernel32.cs | 6 +- SharpPcap/WinpkFilter/NativeMethods.cs | 6 +- SharpPcap/WinpkFilter/PacketSource.cs | 6 +- SharpPcap/WinpkFilter/TcpAdapterList.cs | 6 +- SharpPcap/WinpkFilter/WinpkFilterDevice.cs | 6 +- SharpPcap/WinpkFilter/WinpkFilterDriver.cs | 6 +- SharpPcap/WinpkFilter/WinpkFilterHeader.cs | 6 +- TODO-CI.md | 16 -- Test/App.ico | Bin 1078 -> 0 bytes Test/ArpTest.cs | 5 +- Test/CaptureDeviceListTest.cs | 5 +- Test/CaptureFileReaderDeviceTest.cs | 5 +- Test/CaptureFileWriterDeviceTest.cs | 3 + Test/CaptureHandleReaderDeviceTest.cs | 3 + Test/CheckFilterTest.cs | 3 + Test/DeviceFixture.cs | 22 +-- Test/Exceptions.cs | 5 +- Test/LibPcapLiveDeviceTest.cs | 5 +- Test/LibpcapVersionAttribute.cs | 5 +- Test/LivePcapDeviceListTest.cs | 3 + Test/LivePcapDeviceSetFilterTest.cs | 3 + Test/MemorySafetyTests.cs | 5 +- Test/PcapDeviceTest.cs | 22 +-- Test/PcapExceptionTest.cs | 5 +- Test/PcapStatisticsTest.cs | 22 +-- Test/PcapTest.cs | 4 + Test/Performance/PacketParsing.cs | 3 + Test/Performance/PacketReading.cs | 3 + Test/Performance/Rate.cs | 3 + Test/PosixTimevalTest.cs | 22 +-- Test/RemotePcapTests.cs | 3 + Test/SendPacketTest.cs | 6 +- Test/SendQueueTest.cs | 6 +- Test/Statistics/StatisticsDeviceTest.cs | 6 +- Test/Test.csproj | 9 +- Test/TestHelper.cs | 6 +- Test/TestUser.cs | 5 +- Test/ThreadSafeTests.cs | 5 +- Test/Tunneling/IpHelper.cs | 6 +- Test/Tunneling/TunnelDeviceTest.cs | 6 +- Test/Tunneling/UdpTester.cs | 6 +- Test/WebHelper.cs | 5 +- Test/WinDivert/IpHelperTest.cs | 6 +- Test/WinDivert/WinDivertDeviceTest.cs | 6 +- Test/WinpkFilter/WinpkFilterDeviceTest.cs | 6 +- azure-pipelines.yml | 6 +- codecov.yml | 5 +- requirements.txt | 3 + scripts/Install-npcap.ps1 | 5 +- scripts/codecov.sh | 2 + scripts/install-dotnet.sh | 3 + scripts/install-libpcap.sh | 3 + scripts/install-tap.sh | 3 + scripts/install-windows.ps1 | 3 + scripts/install-winpkfilter.ps1 | 3 + scripts/test.sh | 3 + 178 files changed, 716 insertions(+), 1372 deletions(-) create mode 100644 .reuse/dep5 delete mode 100644 LICENSE create mode 100644 LICENSES/MIT.txt delete mode 100644 TODO-CI.md delete mode 100644 Test/App.ico create mode 100644 requirements.txt diff --git a/.appveyor.yml b/.appveyor.yml index b08333c8..4cebcb0a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,6 @@ +# Copyright 2020-2021 Chris Morgan +# SPDX-License-Identifier: MIT + environment: # This key is encrypted using secdev's appveyor private key, # dissected only on master builds (not PRs) and is used during diff --git a/.circleci/config.yml b/.circleci/config.yml index 5504ab3c..12336a46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,6 @@ +# Copyright 2020-2021 Chris Morgan +# SPDX-License-Identifier: MIT + version: 2.1 orbs: diff --git a/.gitattributes b/.gitattributes index 8079ae23..9f7ab5c2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# Copyright 2018 Jan Pluskal +# SPDX-License-Identifier: MIT + # Auto detect text files and perform LF normalization * text=auto diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 5ecf432d..a5cc56b2 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -1,3 +1,6 @@ +# Copyright 2020 Chris Morgan +# SPDX-License-Identifier: MIT + name: .NET Core on: @@ -53,3 +56,15 @@ jobs: # Flag to toggle pushing symbols along with nuget package to the server, disabled by default INCLUDE_SYMBOLS: true + + license-check: + # We use https://github.com/fsfe/reuse-tool to ensure EVERY file has correct license and copyright info + # Either in the file itself, or in .reuse\dep5 for binary files and files that don't support comments + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - run: pip install -r requirements.txt + - run: reuse lint diff --git a/.gitignore b/.gitignore index 8183fa03..1be8c369 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Copyright 2018 Jan Pluskal +# SPDX-License-Identifier: MIT + # Created by https://www.gitignore.io/api/visualstudio ### VisualStudio ### @@ -299,5 +302,5 @@ __pycache__/ # End of https://www.gitignore.io/api/visualstudio -Scripts/htmldocs -Scripts/monodoc_output +Scripts/htmldocs +Scripts/monodoc_output diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 00000000..959f6d07 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,31 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: sharppcap +Upstream-Contact: Chris Morgan +Source: https://github.com/dotpcap/sharppcap + +Files: Examples/* + SharpPcap.sln + Test/capture_files/10k_packets.pcap + Test/capture_files/arp_request_response.pcap + Test/capture_files/ipv6_http.pcap + Test/capture_files/ipv6_icmpv6_packet.pcap + Test/capture_files/ip_packet_bogus_length.pcap + Test/capture_files/README + Test/capture_files/tcp.pcap + Test/capture_files/tcp_with_extra_bytes.pcap + Test/capture_files/test_stream.pcap + Test/capture_files/udp_dns_request_response.pcap +Copyright: Tamir Gal + Chris Morgan +License: MIT + +Files: Tutorial/* + History.md + README.md + renovate.json +Copyright: Chris Morgan +License: MIT + +Files: Test/capture_files/arp_with_vlan.pcap +Copyright: Houcem Benali +License: MIT diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index d0c6ace6..000ad730 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -1,3 +1,6 @@ +# Copyright 2021-2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + version: v1.0 name: Pipeline agent: diff --git a/Directory.Build.props b/Directory.Build.props index b32b9602..36935657 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,3 +1,7 @@ + true diff --git a/Examples/CreatingCaptureFile/Program.cs b/Examples/CreatingCaptureFile/Program.cs index c4a1ada5..078d2e8c 100644 --- a/Examples/CreatingCaptureFile/Program.cs +++ b/Examples/CreatingCaptureFile/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Examples/Example1.IfList/Example1.IfList.cs b/Examples/Example1.IfList/Example1.IfList.cs index f0d38366..59fe5e9c 100644 --- a/Examples/Example1.IfList/Example1.IfList.cs +++ b/Examples/Example1.IfList/Example1.IfList.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; diff --git a/Examples/Example10.SendQueue/Example10.SendQueues.cs b/Examples/Example10.SendQueue/Example10.SendQueues.cs index f6bff815..ddda8d67 100644 --- a/Examples/Example10.SendQueue/Example10.SendQueues.cs +++ b/Examples/Example10.SendQueue/Example10.SendQueues.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Examples/Example11.Statistics/Example11.Statistics.cs b/Examples/Example11.Statistics/Example11.Statistics.cs index d547e915..75bd89c7 100644 --- a/Examples/Example11.Statistics/Example11.Statistics.cs +++ b/Examples/Example11.Statistics/Example11.Statistics.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Examples/Example12.PacketManipulation/Program.cs b/Examples/Example12.PacketManipulation/Program.cs index 520078b6..6584c478 100644 --- a/Examples/Example12.PacketManipulation/Program.cs +++ b/Examples/Example12.PacketManipulation/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Net.NetworkInformation; using SharpPcap; diff --git a/Examples/Example2.ArpResolve/Program.cs b/Examples/Example2.ArpResolve/Program.cs index 459185ff..8ea90036 100644 --- a/Examples/Example2.ArpResolve/Program.cs +++ b/Examples/Example2.ArpResolve/Program.cs @@ -3,33 +3,9 @@ using SharpPcap; using SharpPcap.LibPcap; -/* -Copyright (c) 2006 Tamir Gal, http://www.tamirgal.com, All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR -OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ +// Copyright (c) 2006 Tamir Gal, http://www.tamirgal.com, All rights reserved. +// +// SPDX-License-Identifier: MIT namespace Example2 { diff --git a/Examples/Example3.BasicCap/Program.cs b/Examples/Example3.BasicCap/Program.cs index 2df985dd..40f3cf6f 100644 --- a/Examples/Example3.BasicCap/Program.cs +++ b/Examples/Example3.BasicCap/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Examples/Example4.BasicCapNoCallback/Example4.BasicCapNoCallback.cs b/Examples/Example4.BasicCapNoCallback/Example4.BasicCapNoCallback.cs index 14776035..17a3044b 100644 --- a/Examples/Example4.BasicCapNoCallback/Example4.BasicCapNoCallback.cs +++ b/Examples/Example4.BasicCapNoCallback/Example4.BasicCapNoCallback.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; diff --git a/Examples/Example5.PcapFilter/Program.cs b/Examples/Example5.PcapFilter/Program.cs index 2412a818..3ad7949e 100644 --- a/Examples/Example5.PcapFilter/Program.cs +++ b/Examples/Example5.PcapFilter/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; diff --git a/Examples/Example6.DumpTCP/Program.cs b/Examples/Example6.DumpTCP/Program.cs index 9bc7eb6a..e58130d4 100644 --- a/Examples/Example6.DumpTCP/Program.cs +++ b/Examples/Example6.DumpTCP/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; diff --git a/Examples/Example9.SendPacket/Example9.SendPacket.cs b/Examples/Example9.SendPacket/Example9.SendPacket.cs index 4320bcb6..49342129 100644 --- a/Examples/Example9.SendPacket/Example9.SendPacket.cs +++ b/Examples/Example9.SendPacket/Example9.SendPacket.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; diff --git a/Examples/MultipleFiltersOnDevice/Program.cs b/Examples/MultipleFiltersOnDevice/Program.cs index 90281c63..91c402b9 100644 --- a/Examples/MultipleFiltersOnDevice/Program.cs +++ b/Examples/MultipleFiltersOnDevice/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using PacketDotNet; diff --git a/Examples/NpcapRemoteCapture/Program.cs b/Examples/NpcapRemoteCapture/Program.cs index 1f11dbc1..7331adb5 100644 --- a/Examples/NpcapRemoteCapture/Program.cs +++ b/Examples/NpcapRemoteCapture/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Net; using SharpPcap; diff --git a/Examples/QueuingPacketsForBackgroundProcessing/Program.cs b/Examples/QueuingPacketsForBackgroundProcessing/Program.cs index 0583644b..8d67dabb 100644 --- a/Examples/QueuingPacketsForBackgroundProcessing/Program.cs +++ b/Examples/QueuingPacketsForBackgroundProcessing/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Collections.Generic; using SharpPcap; diff --git a/Examples/ReadingCaptureFile/Program.cs b/Examples/ReadingCaptureFile/Program.cs index 85928af6..c839c305 100644 --- a/Examples/ReadingCaptureFile/Program.cs +++ b/Examples/ReadingCaptureFile/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Examples/WakeOnLan/Program.cs b/Examples/WakeOnLan/Program.cs index ca60b286..db9060d7 100644 --- a/Examples/WakeOnLan/Program.cs +++ b/Examples/WakeOnLan/Program.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Evan Plaice - */ +// Copyright 2010 Evan Plaice +// +// SPDX-License-Identifier: MIT using System; using PacketDotNet; diff --git a/Examples/WinformsExample/CaptureForm.Designer.cs b/Examples/WinformsExample/CaptureForm.Designer.cs index 97df8eae..64642e4a 100755 --- a/Examples/WinformsExample/CaptureForm.Designer.cs +++ b/Examples/WinformsExample/CaptureForm.Designer.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + namespace WinformsExample { partial class CaptureForm diff --git a/Examples/WinformsExample/CaptureForm.cs b/Examples/WinformsExample/CaptureForm.cs index fa8d3da1..39dbae25 100644 --- a/Examples/WinformsExample/CaptureForm.cs +++ b/Examples/WinformsExample/CaptureForm.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Collections.Generic; using System.Linq; diff --git a/Examples/WinformsExample/DeviceListForm.Designer.cs b/Examples/WinformsExample/DeviceListForm.Designer.cs index c0749323..40f8d35c 100755 --- a/Examples/WinformsExample/DeviceListForm.Designer.cs +++ b/Examples/WinformsExample/DeviceListForm.Designer.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + namespace WinformsExample { partial class DeviceListForm diff --git a/Examples/WinformsExample/DeviceListForm.cs b/Examples/WinformsExample/DeviceListForm.cs index ffa32d1d..9f2e8176 100755 --- a/Examples/WinformsExample/DeviceListForm.cs +++ b/Examples/WinformsExample/DeviceListForm.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Windows.Forms; using SharpPcap; diff --git a/Examples/WinformsExample/Program.cs b/Examples/WinformsExample/Program.cs index ef3803ab..85b8b334 100755 --- a/Examples/WinformsExample/Program.cs +++ b/Examples/WinformsExample/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using System.Windows.Forms; diff --git a/Examples/WinpkFilterExample/Program.cs b/Examples/WinpkFilterExample/Program.cs index ab3c725e..1e65bf19 100644 --- a/Examples/WinpkFilterExample/Program.cs +++ b/Examples/WinpkFilterExample/Program.cs @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: MIT + using System; using PacketDotNet; using SharpPcap; diff --git a/LICENSE b/LICENSE deleted file mode 100644 index cca7fc27..00000000 --- a/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..f66c24d6 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Tamir Gal, Chris Morgan, Ayoub Kaanich, Noah Potash, Phillip Lemon, Evan Plaice + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/SharpPcap/ARP.cs b/SharpPcap/ARP.cs index 8d8a35c3..37f512a0 100644 --- a/SharpPcap/ARP.cs +++ b/SharpPcap/ARP.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using SharpPcap.LibPcap; using System; diff --git a/SharpPcap/AuthenticationTypes.cs b/SharpPcap/AuthenticationTypes.cs index ebf89a05..32cc1cb3 100644 --- a/SharpPcap/AuthenticationTypes.cs +++ b/SharpPcap/AuthenticationTypes.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010-2011 Chris Morgan - */ +// Copyright 2010-2011 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/BaseLiveDevice.cs b/SharpPcap/BaseLiveDevice.cs index e52ed6f4..bd6ed420 100644 --- a/SharpPcap/BaseLiveDevice.cs +++ b/SharpPcap/BaseLiveDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2021 Ayoub Kaanich - */ +// Copyright 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using PacketDotNet; using SharpPcap.LibPcap; diff --git a/SharpPcap/CaptureDeviceExtensions.cs b/SharpPcap/CaptureDeviceExtensions.cs index 12ffab64..d361db75 100644 --- a/SharpPcap/CaptureDeviceExtensions.cs +++ b/SharpPcap/CaptureDeviceExtensions.cs @@ -1,4 +1,8 @@ -using PacketDotNet; +// Copyright 2021 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using PacketDotNet; using SharpPcap.LibPcap; using System; diff --git a/SharpPcap/CaptureDeviceList.cs b/SharpPcap/CaptureDeviceList.cs index f6d24554..ccf3d748 100644 --- a/SharpPcap/CaptureDeviceList.cs +++ b/SharpPcap/CaptureDeviceList.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Collections.Generic; diff --git a/SharpPcap/CaptureStoppedEventHandler.cs b/SharpPcap/CaptureStoppedEventHandler.cs index 5e77ff51..4300e689 100644 --- a/SharpPcap/CaptureStoppedEventHandler.cs +++ b/SharpPcap/CaptureStoppedEventHandler.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2009-2010 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2009-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/CaptureStoppedEventStatus.cs b/SharpPcap/CaptureStoppedEventStatus.cs index 3fc3d9ad..5be7efb1 100644 --- a/SharpPcap/CaptureStoppedEventStatus.cs +++ b/SharpPcap/CaptureStoppedEventStatus.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2009-2010 Chris Morgan - */ +// Copyright 2009-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/DeviceConfiguration.cs b/SharpPcap/DeviceConfiguration.cs index d938fb05..5ceeac8d 100644 --- a/SharpPcap/DeviceConfiguration.cs +++ b/SharpPcap/DeviceConfiguration.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; diff --git a/SharpPcap/DeviceModes.cs b/SharpPcap/DeviceModes.cs index f3624407..4307d436 100644 --- a/SharpPcap/DeviceModes.cs +++ b/SharpPcap/DeviceModes.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; diff --git a/SharpPcap/DeviceNotReadyException.cs b/SharpPcap/DeviceNotReadyException.cs index d294e571..adff88da 100644 --- a/SharpPcap/DeviceNotReadyException.cs +++ b/SharpPcap/DeviceNotReadyException.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2010 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/GetPacketStatus.cs b/SharpPcap/GetPacketStatus.cs index 80681134..3c38e8eb 100644 --- a/SharpPcap/GetPacketStatus.cs +++ b/SharpPcap/GetPacketStatus.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap { /// diff --git a/SharpPcap/ICaptureDevice.cs b/SharpPcap/ICaptureDevice.cs index 5b461dc8..7c2a790e 100644 --- a/SharpPcap/ICaptureDevice.cs +++ b/SharpPcap/ICaptureDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; namespace SharpPcap diff --git a/SharpPcap/ICaptureHeader.cs b/SharpPcap/ICaptureHeader.cs index a4f774f3..deb9d2c2 100644 --- a/SharpPcap/ICaptureHeader.cs +++ b/SharpPcap/ICaptureHeader.cs @@ -1,4 +1,7 @@ -namespace SharpPcap +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +namespace SharpPcap { /// /// Information common to all captured packets diff --git a/SharpPcap/ICaptureStatistics.cs b/SharpPcap/ICaptureStatistics.cs index 264c1b19..872b67f5 100644 --- a/SharpPcap/ICaptureStatistics.cs +++ b/SharpPcap/ICaptureStatistics.cs @@ -1,23 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ - +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/IInjectionDevice.cs b/SharpPcap/IInjectionDevice.cs index 497f1f4b..c6165644 100644 --- a/SharpPcap/IInjectionDevice.cs +++ b/SharpPcap/IInjectionDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; namespace SharpPcap diff --git a/SharpPcap/ILiveDevice.cs b/SharpPcap/ILiveDevice.cs index 5ccc16f1..99990227 100644 --- a/SharpPcap/ILiveDevice.cs +++ b/SharpPcap/ILiveDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/IPcapDevice.cs b/SharpPcap/IPcapDevice.cs index 663d4d2a..1d89adf5 100644 --- a/SharpPcap/IPcapDevice.cs +++ b/SharpPcap/IPcapDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; namespace SharpPcap diff --git a/SharpPcap/InvalidOperationDuringBackgroundCaptureException.cs b/SharpPcap/InvalidOperationDuringBackgroundCaptureException.cs index 27d6b2e9..7d44f7a9 100644 --- a/SharpPcap/InvalidOperationDuringBackgroundCaptureException.cs +++ b/SharpPcap/InvalidOperationDuringBackgroundCaptureException.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/LibPcap/BpfProgram.cs b/SharpPcap/LibPcap/BpfProgram.cs index 77790df2..a017db47 100644 --- a/SharpPcap/LibPcap/BpfProgram.cs +++ b/SharpPcap/LibPcap/BpfProgram.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - * Copyright 2021 Ayoub Kaanich - */ +// Copyright 2010 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using Microsoft.Win32.SafeHandles; using PacketDotNet; diff --git a/SharpPcap/LibPcap/CaptureFileReaderDevice.cs b/SharpPcap/LibPcap/CaptureFileReaderDevice.cs index 97439198..1f6bfe3e 100644 --- a/SharpPcap/LibPcap/CaptureFileReaderDevice.cs +++ b/SharpPcap/LibPcap/CaptureFileReaderDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Text; diff --git a/SharpPcap/LibPcap/CaptureFileWriterDevice.cs b/SharpPcap/LibPcap/CaptureFileWriterDevice.cs index 0b204453..8ec53998 100644 --- a/SharpPcap/LibPcap/CaptureFileWriterDevice.cs +++ b/SharpPcap/LibPcap/CaptureFileWriterDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.IO; diff --git a/SharpPcap/LibPcap/CaptureHandleReaderDevice.cs b/SharpPcap/LibPcap/CaptureHandleReaderDevice.cs index 55962167..34993e72 100644 --- a/SharpPcap/LibPcap/CaptureHandleReaderDevice.cs +++ b/SharpPcap/LibPcap/CaptureHandleReaderDevice.cs @@ -1,19 +1,5 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ +// Copyright 2022 Hendrik Eckardt +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/CaptureReaderDevice.cs b/SharpPcap/LibPcap/CaptureReaderDevice.cs index f6940fb2..fcc66fd2 100644 --- a/SharpPcap/LibPcap/CaptureReaderDevice.cs +++ b/SharpPcap/LibPcap/CaptureReaderDevice.cs @@ -1,3 +1,6 @@ +// Copyright 2022 Hendrik Eckardt +// SPDX-License-Identifier: MIT + namespace SharpPcap.LibPcap { /// diff --git a/SharpPcap/LibPcap/LibPcapLiveDevice.cs b/SharpPcap/LibPcap/LibPcapLiveDevice.cs index 0c661876..2827dcd9 100644 --- a/SharpPcap/LibPcap/LibPcapLiveDevice.cs +++ b/SharpPcap/LibPcap/LibPcapLiveDevice.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2010 Phillip Lemon - * Copyright 2008-2021 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2010 Phillip Lemon +// Copyright 2008-2021 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Collections.ObjectModel; diff --git a/SharpPcap/LibPcap/LibPcapLiveDeviceList.cs b/SharpPcap/LibPcap/LibPcapLiveDeviceList.cs index f07e2ed3..acec80f9 100644 --- a/SharpPcap/LibPcap/LibPcapLiveDeviceList.cs +++ b/SharpPcap/LibPcap/LibPcapLiveDeviceList.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Text; diff --git a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Encoding.cs b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Encoding.cs index 829f1f78..693a396d 100644 --- a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Encoding.cs +++ b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Encoding.cs @@ -1,25 +1,9 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Phillip Lemon - * Copyright 2008-2011 Chris Morgan - * Copyright 2021 Ayoub Kaanich - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Phillip Lemon +// Copyright 2008-2011 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Interop.cs b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Interop.cs index 7e8308b7..bb77b61d 100644 --- a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Interop.cs +++ b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Interop.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Phillip Lemon - * Copyright 2008-2011 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Phillip Lemon +// Copyright 2008-2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.IO; diff --git a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Resolver.cs b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Resolver.cs index 5c5437bb..9b56f85c 100644 --- a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Resolver.cs +++ b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.Resolver.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2020-2021 Ayoub Kaanich - */ +// Copyright 2020-2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using System; using System.Collections.Generic; diff --git a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs index add75571..c31fd2eb 100644 --- a/SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs +++ b/SharpPcap/LibPcap/LibPcapSafeNativeMethods.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Phillip Lemon - * Copyright 2008-2011 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Phillip Lemon +// Copyright 2008-2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/NativeLibraryHelper.cs b/SharpPcap/LibPcap/NativeLibraryHelper.cs index 0b36e099..4ca4ceba 100644 --- a/SharpPcap/LibPcap/NativeLibraryHelper.cs +++ b/SharpPcap/LibPcap/NativeLibraryHelper.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/PcapAddress.cs b/SharpPcap/LibPcap/PcapAddress.cs index 6024ab4e..857a5b56 100755 --- a/SharpPcap/LibPcap/PcapAddress.cs +++ b/SharpPcap/LibPcap/PcapAddress.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Text; diff --git a/SharpPcap/LibPcap/PcapDevice.cs b/SharpPcap/LibPcap/PcapDevice.cs index 1e69ec7f..ac1149da 100644 --- a/SharpPcap/LibPcap/PcapDevice.cs +++ b/SharpPcap/LibPcap/PcapDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Collections.Generic; diff --git a/SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs b/SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs index f79a04da..8f395144 100644 --- a/SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs +++ b/SharpPcap/LibPcap/PcapDeviceCaptureLoop.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2010 Chris Morgan - * Copyright 2008-2009 Phillip Lemon - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Phillip Lemon +// Copyright 2008-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Diagnostics; diff --git a/SharpPcap/LibPcap/PcapHandle.cs b/SharpPcap/LibPcap/PcapHandle.cs index dff52313..ea9db47f 100644 --- a/SharpPcap/LibPcap/PcapHandle.cs +++ b/SharpPcap/LibPcap/PcapHandle.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - * Copyright 2021 Ayoub Kaanich - */ +// Copyright 2010 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using Microsoft.Win32.SafeHandles; using System; diff --git a/SharpPcap/LibPcap/PcapHeader.cs b/SharpPcap/LibPcap/PcapHeader.cs index baec2cf5..2b9eb621 100644 --- a/SharpPcap/LibPcap/PcapHeader.cs +++ b/SharpPcap/LibPcap/PcapHeader.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/PcapInterface.cs b/SharpPcap/LibPcap/PcapInterface.cs index 0fd19d7d..6f289835 100644 --- a/SharpPcap/LibPcap/PcapInterface.cs +++ b/SharpPcap/LibPcap/PcapInterface.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Collections.Generic; diff --git a/SharpPcap/LibPcap/PcapStatistics.cs b/SharpPcap/LibPcap/PcapStatistics.cs index 9c21f62f..5ea469f4 100644 --- a/SharpPcap/LibPcap/PcapStatistics.cs +++ b/SharpPcap/LibPcap/PcapStatistics.cs @@ -1,22 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2009-2010 Chris Morgan - */ +// Copyright 2009-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT + using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/PcapUnmanagedStructures.cs b/SharpPcap/LibPcap/PcapUnmanagedStructures.cs index 41bc7fd2..f6098d8b 100644 --- a/SharpPcap/LibPcap/PcapUnmanagedStructures.cs +++ b/SharpPcap/LibPcap/PcapUnmanagedStructures.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Net; diff --git a/SharpPcap/LibPcap/SendQueue.cs b/SharpPcap/LibPcap/SendQueue.cs index 0611f1b1..9d17bfab 100644 --- a/SharpPcap/LibPcap/SendQueue.cs +++ b/SharpPcap/LibPcap/SendQueue.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - * Copyright 2008-2009 Phillip Lemon - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// Copyright 2008-2009 Phillip Lemon +// +// SPDX-License-Identifier: MIT using PacketDotNet; using System; diff --git a/SharpPcap/LibPcap/SendQueueTransmitModes.cs b/SharpPcap/LibPcap/SendQueueTransmitModes.cs index 9b67fb04..b9d92168 100644 --- a/SharpPcap/LibPcap/SendQueueTransmitModes.cs +++ b/SharpPcap/LibPcap/SendQueueTransmitModes.cs @@ -1,23 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ - +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap.LibPcap { diff --git a/SharpPcap/LibPcap/Sockaddr.cs b/SharpPcap/LibPcap/Sockaddr.cs index 89229485..16ddd558 100755 --- a/SharpPcap/LibPcap/Sockaddr.cs +++ b/SharpPcap/LibPcap/Sockaddr.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/LibPcap/WindowsNativeMethods.cs b/SharpPcap/LibPcap/WindowsNativeMethods.cs index 7eb0bbe8..702ed783 100644 --- a/SharpPcap/LibPcap/WindowsNativeMethods.cs +++ b/SharpPcap/LibPcap/WindowsNativeMethods.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; using System.Security; using System.Text; diff --git a/SharpPcap/MonitorMode.cs b/SharpPcap/MonitorMode.cs index ca2d7335..daa4d69e 100644 --- a/SharpPcap/MonitorMode.cs +++ b/SharpPcap/MonitorMode.cs @@ -1,23 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2017 Noah Potash - */ - +// Copyright 2017 Noah Potash +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/PacketArrivalEventHandler.cs b/SharpPcap/PacketArrivalEventHandler.cs index ba3ea702..304dcaa1 100644 --- a/SharpPcap/PacketArrivalEventHandler.cs +++ b/SharpPcap/PacketArrivalEventHandler.cs @@ -1,24 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2010 Chris Morgan - */ - +// Copyright 2005 Tamir Gal +// Copyright 2008-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/PacketCapture.cs b/SharpPcap/PacketCapture.cs index 7273c7ba..46a76efe 100644 --- a/SharpPcap/PacketCapture.cs +++ b/SharpPcap/PacketCapture.cs @@ -1,24 +1,9 @@ -/* -This file is part of SharpPcap. +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// Copyright 2008-2009 Phillip Lemon +// +// SPDX-License-Identifier: MIT -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - * Copyright 2008-2009 Phillip Lemon - */ using System; namespace SharpPcap diff --git a/SharpPcap/Pcap.cs b/SharpPcap/Pcap.cs index f9988152..3c173bac 100644 --- a/SharpPcap/Pcap.cs +++ b/SharpPcap/Pcap.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - * Copyright 2008-2009 Phillip Lemon - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// Copyright 2008-2009 Phillip Lemon +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/PcapClock.cs b/SharpPcap/PcapClock.cs index 5a02f7a7..0e9bb9c1 100644 --- a/SharpPcap/PcapClock.cs +++ b/SharpPcap/PcapClock.cs @@ -1,4 +1,8 @@ -using SharpPcap.LibPcap; +// Copyright 2021 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using SharpPcap.LibPcap; using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/PcapError.cs b/SharpPcap/PcapError.cs index 9affd688..1357921d 100644 --- a/SharpPcap/PcapError.cs +++ b/SharpPcap/PcapError.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/PcapException.cs b/SharpPcap/PcapException.cs index b324d71e..4bb0b9ba 100644 --- a/SharpPcap/PcapException.cs +++ b/SharpPcap/PcapException.cs @@ -1,24 +1,8 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2008-2009 Chris Morgan - * Copyright 2008-2009 Phillip Lemon - */ +// Copyright 2005 Tamir Gal +// Copyright 2008-2009 Chris Morgan +// Copyright 2008-2009 Phillip Lemon +// +// SPDX-License-Identifier: MIT using System; diff --git a/SharpPcap/Posix.cs b/SharpPcap/Posix.cs index eee5bed0..e7ce13f7 100644 --- a/SharpPcap/Posix.cs +++ b/SharpPcap/Posix.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2020-2021 Ayoub Kaanich - */ +// Copyright 2020-2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using System; using System.Runtime.InteropServices; diff --git a/SharpPcap/PosixTimeval.cs b/SharpPcap/PosixTimeval.cs index 9fb407d2..1a5f98a4 100644 --- a/SharpPcap/PosixTimeval.cs +++ b/SharpPcap/PosixTimeval.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2009-2011 Chris Morgan - */ +// Copyright 2009-2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; namespace SharpPcap diff --git a/SharpPcap/RawCapture.cs b/SharpPcap/RawCapture.cs index c1e313ab..36030687 100644 --- a/SharpPcap/RawCapture.cs +++ b/SharpPcap/RawCapture.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2011 Chris Morgan - */ +// Copyright 2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using PacketDotNet; diff --git a/SharpPcap/RemoteAuthentication.cs b/SharpPcap/RemoteAuthentication.cs index 45d08473..3665ac66 100644 --- a/SharpPcap/RemoteAuthentication.cs +++ b/SharpPcap/RemoteAuthentication.cs @@ -1,3 +1,6 @@ +// Copyright 2011-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using System.Net; using System.Runtime.InteropServices; diff --git a/SharpPcap/SharpPcap.csproj b/SharpPcap/SharpPcap.csproj index bb7f3c98..ecdd59fc 100644 --- a/SharpPcap/SharpPcap.csproj +++ b/SharpPcap/SharpPcap.csproj @@ -1,4 +1,11 @@ - + + netstandard2.0 6.2.5 @@ -16,6 +23,8 @@ SharpPcap is a cross-platform(Windows, Mac, Linux) packet capture framework for the .NET environment. It provides an API for capturing, injecting, analyzing and building packets using any .NET language such as C# and VB.NET. + MIT + 7.3 LGPL-3.0-only true true @@ -23,6 +32,8 @@ + + diff --git a/SharpPcap/Statistics/CaptureMode.cs b/SharpPcap/Statistics/CaptureMode.cs index 33cec914..bf239e5f 100644 --- a/SharpPcap/Statistics/CaptureMode.cs +++ b/SharpPcap/Statistics/CaptureMode.cs @@ -1,23 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ - +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap.Statistics { diff --git a/SharpPcap/Statistics/StatisticsDevice.cs b/SharpPcap/Statistics/StatisticsDevice.cs index e278e9a9..dcd440f7 100644 --- a/SharpPcap/Statistics/StatisticsDevice.cs +++ b/SharpPcap/Statistics/StatisticsDevice.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010-2011 Chris Morgan - */ +// Copyright 2010-2011 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Net.NetworkInformation; diff --git a/SharpPcap/Statistics/StatisticsEventArgs.cs b/SharpPcap/Statistics/StatisticsEventArgs.cs index e483581b..568e2894 100644 --- a/SharpPcap/Statistics/StatisticsEventArgs.cs +++ b/SharpPcap/Statistics/StatisticsEventArgs.cs @@ -1,23 +1,7 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2005 Tamir Gal - * Copyright 2009-2010 Chris Morgan - */ +// Copyright 2005 Tamir Gal +// Copyright 2009-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using SharpPcap.LibPcap; using System; diff --git a/SharpPcap/StatisticsException.cs b/SharpPcap/StatisticsException.cs index bea6e966..7d44f0f0 100644 --- a/SharpPcap/StatisticsException.cs +++ b/SharpPcap/StatisticsException.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2009-2010 Chris Morgan - */ +// Copyright 2009-2010 Chris Morgan +// +// SPDX-License-Identifier: MIT namespace SharpPcap { diff --git a/SharpPcap/TimestampResolution.cs b/SharpPcap/TimestampResolution.cs index d5d61f98..019b4465 100644 --- a/SharpPcap/TimestampResolution.cs +++ b/SharpPcap/TimestampResolution.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap { /// diff --git a/SharpPcap/TimestampSourceResolution.cs b/SharpPcap/TimestampSourceResolution.cs index 512e54ba..8cddc649 100644 --- a/SharpPcap/TimestampSourceResolution.cs +++ b/SharpPcap/TimestampSourceResolution.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap { public enum TimestampSourceResolution diff --git a/SharpPcap/TimestampType.cs b/SharpPcap/TimestampType.cs index b1ccee87..746974ab 100644 --- a/SharpPcap/TimestampType.cs +++ b/SharpPcap/TimestampType.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap { /// diff --git a/SharpPcap/Tunneling/IPAddressConfiguration.cs b/SharpPcap/Tunneling/IPAddressConfiguration.cs index 1cf80c62..dbc33be4 100644 --- a/SharpPcap/Tunneling/IPAddressConfiguration.cs +++ b/SharpPcap/Tunneling/IPAddressConfiguration.cs @@ -1,4 +1,8 @@ -using System.Net; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System.Net; namespace SharpPcap.Tunneling { diff --git a/SharpPcap/Tunneling/ITunnelDriver.cs b/SharpPcap/Tunneling/ITunnelDriver.cs index 9a4a6934..45cb4f63 100644 --- a/SharpPcap/Tunneling/ITunnelDriver.cs +++ b/SharpPcap/Tunneling/ITunnelDriver.cs @@ -1,4 +1,8 @@ -using Microsoft.Win32.SafeHandles; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using Microsoft.Win32.SafeHandles; using System; using System.IO; using System.Net.NetworkInformation; diff --git a/SharpPcap/Tunneling/TunnelDevice.cs b/SharpPcap/Tunneling/TunnelDevice.cs index b22b95c4..041a20c4 100644 --- a/SharpPcap/Tunneling/TunnelDevice.cs +++ b/SharpPcap/Tunneling/TunnelDevice.cs @@ -1,4 +1,8 @@ -using SharpPcap.Tunneling.WinTap; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using SharpPcap.Tunneling.WinTap; using System; using System.IO; using System.Linq; diff --git a/SharpPcap/Tunneling/TunnelHeader.cs b/SharpPcap/Tunneling/TunnelHeader.cs index 8bc6836d..f92a9218 100644 --- a/SharpPcap/Tunneling/TunnelHeader.cs +++ b/SharpPcap/Tunneling/TunnelHeader.cs @@ -1,4 +1,8 @@ - +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + + namespace SharpPcap.Tunneling { public class TunnelHeader : ICaptureHeader diff --git a/SharpPcap/Tunneling/Unix/IffFlags.cs b/SharpPcap/Tunneling/Unix/IffFlags.cs index 3f73769d..c9682e57 100644 --- a/SharpPcap/Tunneling/Unix/IffFlags.cs +++ b/SharpPcap/Tunneling/Unix/IffFlags.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.Tunneling.Unix { diff --git a/SharpPcap/Tunneling/Unix/Ifreq.cs b/SharpPcap/Tunneling/Unix/Ifreq.cs index 601ad680..ec404756 100644 --- a/SharpPcap/Tunneling/Unix/Ifreq.cs +++ b/SharpPcap/Tunneling/Unix/Ifreq.cs @@ -1,4 +1,8 @@ -using SharpPcap.LibPcap; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using SharpPcap.LibPcap; using System; using System.Net; using System.Net.Sockets; diff --git a/SharpPcap/Tunneling/Unix/IocDir.cs b/SharpPcap/Tunneling/Unix/IocDir.cs index 1f0c8ff5..3ebca876 100644 --- a/SharpPcap/Tunneling/Unix/IocDir.cs +++ b/SharpPcap/Tunneling/Unix/IocDir.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.Tunneling.Unix { diff --git a/SharpPcap/Tunneling/Unix/NetDeviceFlags.cs b/SharpPcap/Tunneling/Unix/NetDeviceFlags.cs index 37cecdf6..2775efa4 100644 --- a/SharpPcap/Tunneling/Unix/NetDeviceFlags.cs +++ b/SharpPcap/Tunneling/Unix/NetDeviceFlags.cs @@ -1,4 +1,8 @@ -namespace SharpPcap.Tunneling.Unix +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +namespace SharpPcap.Tunneling.Unix { internal enum NetDeviceFlags : ushort { diff --git a/SharpPcap/Tunneling/Unix/SocketIoctl.cs b/SharpPcap/Tunneling/Unix/SocketIoctl.cs index c98e2017..a239d29e 100644 --- a/SharpPcap/Tunneling/Unix/SocketIoctl.cs +++ b/SharpPcap/Tunneling/Unix/SocketIoctl.cs @@ -1,4 +1,8 @@ -namespace SharpPcap.Tunneling.Unix +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +namespace SharpPcap.Tunneling.Unix { enum SocketIoctl { diff --git a/SharpPcap/Tunneling/Unix/TuntapDriver.cs b/SharpPcap/Tunneling/Unix/TuntapDriver.cs index 5c68e10a..a1974756 100644 --- a/SharpPcap/Tunneling/Unix/TuntapDriver.cs +++ b/SharpPcap/Tunneling/Unix/TuntapDriver.cs @@ -1,4 +1,8 @@ -using Microsoft.Win32.SafeHandles; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using Microsoft.Win32.SafeHandles; using System; using System.Buffers.Binary; using System.ComponentModel; diff --git a/SharpPcap/Tunneling/WinTap/TapIoControl.cs b/SharpPcap/Tunneling/WinTap/TapIoControl.cs index e687fbff..e2687b7f 100644 --- a/SharpPcap/Tunneling/WinTap/TapIoControl.cs +++ b/SharpPcap/Tunneling/WinTap/TapIoControl.cs @@ -1,4 +1,8 @@ -namespace SharpPcap.Tunneling.WinTap +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +namespace SharpPcap.Tunneling.WinTap { /// /// See https://github.com/OpenVPN/tap-windows6/blob/master/src/tap-windows.h diff --git a/SharpPcap/Tunneling/WinTap/WinFileAccess.cs b/SharpPcap/Tunneling/WinTap/WinFileAccess.cs index 6b622be7..d7b19309 100644 --- a/SharpPcap/Tunneling/WinTap/WinFileAccess.cs +++ b/SharpPcap/Tunneling/WinTap/WinFileAccess.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.Tunneling.WinTap { diff --git a/SharpPcap/Tunneling/WinTap/WinFileAttributes.cs b/SharpPcap/Tunneling/WinTap/WinFileAttributes.cs index 05c9088b..fb64ae16 100644 --- a/SharpPcap/Tunneling/WinTap/WinFileAttributes.cs +++ b/SharpPcap/Tunneling/WinTap/WinFileAttributes.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.Tunneling.WinTap { diff --git a/SharpPcap/Tunneling/WinTap/WinFileCreation.cs b/SharpPcap/Tunneling/WinTap/WinFileCreation.cs index b6bf1201..b2736799 100644 --- a/SharpPcap/Tunneling/WinTap/WinFileCreation.cs +++ b/SharpPcap/Tunneling/WinTap/WinFileCreation.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.Tunneling.WinTap { diff --git a/SharpPcap/Tunneling/WinTap/WinTapDriver.cs b/SharpPcap/Tunneling/WinTap/WinTapDriver.cs index bfe030a0..dc9a5777 100644 --- a/SharpPcap/Tunneling/WinTap/WinTapDriver.cs +++ b/SharpPcap/Tunneling/WinTap/WinTapDriver.cs @@ -1,4 +1,8 @@ -using Microsoft.Win32.SafeHandles; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using Microsoft.Win32.SafeHandles; using System; using System.ComponentModel; using System.IO; diff --git a/SharpPcap/WinDivert/IpHelper.cs b/SharpPcap/WinDivert/IpHelper.cs index 10529223..4ca2ea1c 100644 --- a/SharpPcap/WinDivert/IpHelper.cs +++ b/SharpPcap/WinDivert/IpHelper.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; diff --git a/SharpPcap/WinDivert/WinDivertAddress.cs b/SharpPcap/WinDivert/WinDivertAddress.cs index 53e0a51a..52bea20d 100644 --- a/SharpPcap/WinDivert/WinDivertAddress.cs +++ b/SharpPcap/WinDivert/WinDivertAddress.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; namespace SharpPcap.WinDivert diff --git a/SharpPcap/WinDivert/WinDivertDevice.cs b/SharpPcap/WinDivert/WinDivertDevice.cs index d03017c2..71e0465f 100644 --- a/SharpPcap/WinDivert/WinDivertDevice.cs +++ b/SharpPcap/WinDivert/WinDivertDevice.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; diff --git a/SharpPcap/WinDivert/WinDivertHeader.cs b/SharpPcap/WinDivert/WinDivertHeader.cs index b0551ae5..d5407fb1 100644 --- a/SharpPcap/WinDivert/WinDivertHeader.cs +++ b/SharpPcap/WinDivert/WinDivertHeader.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.WinDivert { public class WinDivertHeader : ICaptureHeader diff --git a/SharpPcap/WinDivert/WinDivertLayer.cs b/SharpPcap/WinDivert/WinDivertLayer.cs index 03d3901f..7c664018 100644 --- a/SharpPcap/WinDivert/WinDivertLayer.cs +++ b/SharpPcap/WinDivert/WinDivertLayer.cs @@ -1,36 +1,6 @@ -/* - * WinDivertLayer.cs - * (C) 2018, all rights reserved, - * - * This file is part of WinDivertSharp. - * - * WinDivertSharp is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * WinDivertSharp is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT namespace SharpPcap.WinDivert { diff --git a/SharpPcap/WinDivert/WinDivertNative.cs b/SharpPcap/WinDivert/WinDivertNative.cs index 6cf548fa..863ae28e 100644 --- a/SharpPcap/WinDivert/WinDivertNative.cs +++ b/SharpPcap/WinDivert/WinDivertNative.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; using System.Security; diff --git a/SharpPcap/WinDivert/WinDivertPacketFlags.cs b/SharpPcap/WinDivert/WinDivertPacketFlags.cs index 0949b322..b4edcd5a 100644 --- a/SharpPcap/WinDivert/WinDivertPacketFlags.cs +++ b/SharpPcap/WinDivert/WinDivertPacketFlags.cs @@ -1,4 +1,8 @@ -namespace SharpPcap.WinDivert +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +namespace SharpPcap.WinDivert { public enum WinDivertPacketFlags : byte { diff --git a/SharpPcap/WinDivert/WinDivertParam.cs b/SharpPcap/WinDivert/WinDivertParam.cs index e45e3b7d..097a323c 100644 --- a/SharpPcap/WinDivert/WinDivertParam.cs +++ b/SharpPcap/WinDivert/WinDivertParam.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.WinDivert { diff --git a/SharpPcap/WinpkFilter/AdapterMode.cs b/SharpPcap/WinpkFilter/AdapterMode.cs index e2e16b44..fcb67998 100644 --- a/SharpPcap/WinpkFilter/AdapterMode.cs +++ b/SharpPcap/WinpkFilter/AdapterMode.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; namespace SharpPcap.WinpkFilter diff --git a/SharpPcap/WinpkFilter/AdapterModes.cs b/SharpPcap/WinpkFilter/AdapterModes.cs index e9b2a380..6b327518 100644 --- a/SharpPcap/WinpkFilter/AdapterModes.cs +++ b/SharpPcap/WinpkFilter/AdapterModes.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.WinpkFilter { diff --git a/SharpPcap/WinpkFilter/DriverHandle.cs b/SharpPcap/WinpkFilter/DriverHandle.cs index 1bed0742..d4541a83 100644 --- a/SharpPcap/WinpkFilter/DriverHandle.cs +++ b/SharpPcap/WinpkFilter/DriverHandle.cs @@ -1,4 +1,8 @@ -using Microsoft.Win32.SafeHandles; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using Microsoft.Win32.SafeHandles; namespace SharpPcap.WinpkFilter { diff --git a/SharpPcap/WinpkFilter/EthRequest.cs b/SharpPcap/WinpkFilter/EthRequest.cs index dfdf7d5f..1db9671d 100644 --- a/SharpPcap/WinpkFilter/EthRequest.cs +++ b/SharpPcap/WinpkFilter/EthRequest.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; namespace SharpPcap.WinpkFilter diff --git a/SharpPcap/WinpkFilter/HardwarePacketFilters.cs b/SharpPcap/WinpkFilter/HardwarePacketFilters.cs index 87d3f28f..6965156f 100644 --- a/SharpPcap/WinpkFilter/HardwarePacketFilters.cs +++ b/SharpPcap/WinpkFilter/HardwarePacketFilters.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; namespace SharpPcap.WinpkFilter { diff --git a/SharpPcap/WinpkFilter/IntermediateBuffer.cs b/SharpPcap/WinpkFilter/IntermediateBuffer.cs index dbd4dce2..923d0350 100644 --- a/SharpPcap/WinpkFilter/IntermediateBuffer.cs +++ b/SharpPcap/WinpkFilter/IntermediateBuffer.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; namespace SharpPcap.WinpkFilter diff --git a/SharpPcap/WinpkFilter/Kernel32.cs b/SharpPcap/WinpkFilter/Kernel32.cs index a3310866..16741ea0 100644 --- a/SharpPcap/WinpkFilter/Kernel32.cs +++ b/SharpPcap/WinpkFilter/Kernel32.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; using System.Security; diff --git a/SharpPcap/WinpkFilter/NativeMethods.cs b/SharpPcap/WinpkFilter/NativeMethods.cs index efcef6b2..501e7918 100644 --- a/SharpPcap/WinpkFilter/NativeMethods.cs +++ b/SharpPcap/WinpkFilter/NativeMethods.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Runtime.InteropServices; using System.Security; using Microsoft.Win32.SafeHandles; diff --git a/SharpPcap/WinpkFilter/PacketSource.cs b/SharpPcap/WinpkFilter/PacketSource.cs index 84d2a95b..051a3900 100644 --- a/SharpPcap/WinpkFilter/PacketSource.cs +++ b/SharpPcap/WinpkFilter/PacketSource.cs @@ -1,4 +1,8 @@ - +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + + namespace SharpPcap.WinpkFilter { /// diff --git a/SharpPcap/WinpkFilter/TcpAdapterList.cs b/SharpPcap/WinpkFilter/TcpAdapterList.cs index 2905c28f..82b7e61d 100644 --- a/SharpPcap/WinpkFilter/TcpAdapterList.cs +++ b/SharpPcap/WinpkFilter/TcpAdapterList.cs @@ -1,4 +1,8 @@ - +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + + using System; using System.Runtime.InteropServices; using static SharpPcap.WinpkFilter.NativeMethods; diff --git a/SharpPcap/WinpkFilter/WinpkFilterDevice.cs b/SharpPcap/WinpkFilter/WinpkFilterDevice.cs index 8c92fd63..141a10b2 100644 --- a/SharpPcap/WinpkFilter/WinpkFilterDevice.cs +++ b/SharpPcap/WinpkFilter/WinpkFilterDevice.cs @@ -1,4 +1,8 @@ -using PacketDotNet; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using PacketDotNet; using System; using System.Net.NetworkInformation; using System.Runtime.InteropServices; diff --git a/SharpPcap/WinpkFilter/WinpkFilterDriver.cs b/SharpPcap/WinpkFilter/WinpkFilterDriver.cs index f5a6ee87..b775f742 100644 --- a/SharpPcap/WinpkFilter/WinpkFilterDriver.cs +++ b/SharpPcap/WinpkFilter/WinpkFilterDriver.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/SharpPcap/WinpkFilter/WinpkFilterHeader.cs b/SharpPcap/WinpkFilter/WinpkFilterHeader.cs index f6e76f9d..2efca3a2 100644 --- a/SharpPcap/WinpkFilter/WinpkFilterHeader.cs +++ b/SharpPcap/WinpkFilter/WinpkFilterHeader.cs @@ -1,4 +1,8 @@ - +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + + namespace SharpPcap.WinpkFilter { public class WinpkFilterHeader : ICaptureHeader diff --git a/TODO-CI.md b/TODO-CI.md deleted file mode 100644 index 3b5a6755..00000000 --- a/TODO-CI.md +++ /dev/null @@ -1,16 +0,0 @@ -# CI TODO list - -## Linux - -linux can't send packets -at least when you make StartCapture on the same adapter nothing is received -possibly related to https://github.com/the-tcpdump-group/libpcap/issues/400 - -tests for linux require different device instances for sending and capturing - -## Npcap & rpcapd - -rpcapd is broken in Npcap -See https://github.com/nmap/nmap/issues/1329 - -tests for Npcap have to run using `--filter TestCategory!=RemotePcap` diff --git a/Test/App.ico b/Test/App.ico deleted file mode 100644 index 3a5525fd794f7a7c5c8e6187f470ea3af38cd2b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmeHHJr05}7=1t!Hp3A*8IHkVf+j?-!eHY14Gtcw1Eb*_9>Bq^zETJ@GKj{_2j4$w zo9}xCh!8{T3=X##Skq>ikMjsvB|y%crWBM2iW(4pI}c%z6%lW!=~4v77#3{z!dmB1 z__&l)-{KUYR+|8|;wB^R|9ET$J@(@=#rd^=)qs85?vAy(PSF5CyNkus435LVkZ$rj zNw|JG-P7^hF<(;#o*Vk}5R#e|^13tBbQkeF?djULtvqyxd3<{9 diff --git a/Test/ArpTest.cs b/Test/ArpTest.cs index aab6a8c2..96e99ac2 100644 --- a/Test/ArpTest.cs +++ b/Test/ArpTest.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2009-2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; using NUnit.Framework; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/CaptureDeviceListTest.cs b/Test/CaptureDeviceListTest.cs index 44310ec7..fa2d1f57 100644 --- a/Test/CaptureDeviceListTest.cs +++ b/Test/CaptureDeviceListTest.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; using SharpPcap; using NUnit.Framework; diff --git a/Test/CaptureFileReaderDeviceTest.cs b/Test/CaptureFileReaderDeviceTest.cs index 6bd90ac2..55793ef8 100644 --- a/Test/CaptureFileReaderDeviceTest.cs +++ b/Test/CaptureFileReaderDeviceTest.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2010-2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; using NUnit.Framework; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/CaptureFileWriterDeviceTest.cs b/Test/CaptureFileWriterDeviceTest.cs index 3f836a42..a7ca8d19 100644 --- a/Test/CaptureFileWriterDeviceTest.cs +++ b/Test/CaptureFileWriterDeviceTest.cs @@ -1,3 +1,6 @@ +// Copyright 2012-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using System.IO; using NUnit.Framework; diff --git a/Test/CaptureHandleReaderDeviceTest.cs b/Test/CaptureHandleReaderDeviceTest.cs index 44bcde50..984645d2 100644 --- a/Test/CaptureHandleReaderDeviceTest.cs +++ b/Test/CaptureHandleReaderDeviceTest.cs @@ -1,3 +1,6 @@ +// Copyright 2022 Hendrik Eckardt +// SPDX-License-Identifier: MIT + using System; using NUnit.Framework; using SharpPcap; diff --git a/Test/CheckFilterTest.cs b/Test/CheckFilterTest.cs index 4a0e03da..e5ae3412 100644 --- a/Test/CheckFilterTest.cs +++ b/Test/CheckFilterTest.cs @@ -1,3 +1,6 @@ +// Copyright 2009-2017 Chris Morgan +// SPDX-License-Identifier: MIT + using NUnit.Framework; using PacketDotNet; using SharpPcap; diff --git a/Test/DeviceFixture.cs b/Test/DeviceFixture.cs index 69488c34..c65d75f1 100644 --- a/Test/DeviceFixture.cs +++ b/Test/DeviceFixture.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2020-2021 Ayoub Kaanich - */ +// Copyright 2020-2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT using System; using System.Collections; diff --git a/Test/Exceptions.cs b/Test/Exceptions.cs index a64dfc0d..2a29ff04 100644 --- a/Test/Exceptions.cs +++ b/Test/Exceptions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; using SharpPcap; using NUnit.Framework; diff --git a/Test/LibPcapLiveDeviceTest.cs b/Test/LibPcapLiveDeviceTest.cs index e59dc1d6..dc1073b2 100644 --- a/Test/LibPcapLiveDeviceTest.cs +++ b/Test/LibPcapLiveDeviceTest.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using System; using NUnit.Framework; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/LibpcapVersionAttribute.cs b/Test/LibpcapVersionAttribute.cs index 44f611b1..80ecdee0 100644 --- a/Test/LibpcapVersionAttribute.cs +++ b/Test/LibpcapVersionAttribute.cs @@ -1,4 +1,7 @@ -using NUnit.Framework; +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using NUnit.Framework.Interfaces; using NUnit.Framework.Internal; using System; diff --git a/Test/LivePcapDeviceListTest.cs b/Test/LivePcapDeviceListTest.cs index f22193a1..f80eeb79 100644 --- a/Test/LivePcapDeviceListTest.cs +++ b/Test/LivePcapDeviceListTest.cs @@ -1,3 +1,6 @@ +// Copyright 2009-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using NUnit.Framework; using SharpPcap.LibPcap; diff --git a/Test/LivePcapDeviceSetFilterTest.cs b/Test/LivePcapDeviceSetFilterTest.cs index 4a1f6554..d99fc357 100644 --- a/Test/LivePcapDeviceSetFilterTest.cs +++ b/Test/LivePcapDeviceSetFilterTest.cs @@ -1,3 +1,6 @@ +// Copyright 2009-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using System.Linq; using NUnit.Framework; diff --git a/Test/MemorySafetyTests.cs b/Test/MemorySafetyTests.cs index 608a1308..dca5a8a3 100644 --- a/Test/MemorySafetyTests.cs +++ b/Test/MemorySafetyTests.cs @@ -1,4 +1,7 @@ -using NUnit.Framework; +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/PcapDeviceTest.cs b/Test/PcapDeviceTest.cs index 164ec8f1..dfd66674 100644 --- a/Test/PcapDeviceTest.cs +++ b/Test/PcapDeviceTest.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using System.Collections.Generic; diff --git a/Test/PcapExceptionTest.cs b/Test/PcapExceptionTest.cs index b7decd67..c9ecdd9a 100644 --- a/Test/PcapExceptionTest.cs +++ b/Test/PcapExceptionTest.cs @@ -1,4 +1,7 @@ -using SharpPcap; +// Copyright 2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using SharpPcap; using NUnit.Framework; namespace Test diff --git a/Test/PcapStatisticsTest.cs b/Test/PcapStatisticsTest.cs index d6eeaeed..e7aad05c 100644 --- a/Test/PcapStatisticsTest.cs +++ b/Test/PcapStatisticsTest.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap. - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using NUnit.Framework; diff --git a/Test/PcapTest.cs b/Test/PcapTest.cs index a4cb0a1e..30f6ebc5 100644 --- a/Test/PcapTest.cs +++ b/Test/PcapTest.cs @@ -1,3 +1,7 @@ +// Copyright 2021 Ayoub Kaanich +// Copyright 2009 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using NUnit.Framework; using SharpPcap; diff --git a/Test/Performance/PacketParsing.cs b/Test/Performance/PacketParsing.cs index 88b18f6d..429171b0 100644 --- a/Test/Performance/PacketParsing.cs +++ b/Test/Performance/PacketParsing.cs @@ -1,3 +1,6 @@ +// Copyright 2011-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using PacketDotNet; diff --git a/Test/Performance/PacketReading.cs b/Test/Performance/PacketReading.cs index a7431b87..261cbe58 100644 --- a/Test/Performance/PacketReading.cs +++ b/Test/Performance/PacketReading.cs @@ -1,3 +1,6 @@ +// Copyright 2011-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; using SharpPcap; using NUnit.Framework; diff --git a/Test/Performance/Rate.cs b/Test/Performance/Rate.cs index 22f48698..b1d01533 100644 --- a/Test/Performance/Rate.cs +++ b/Test/Performance/Rate.cs @@ -1,3 +1,6 @@ +// Copyright 2011-2021 Chris Morgan +// SPDX-License-Identifier: MIT + using System; namespace Test.Performance diff --git a/Test/PosixTimevalTest.cs b/Test/PosixTimevalTest.cs index bbc05a36..415549d6 100644 --- a/Test/PosixTimevalTest.cs +++ b/Test/PosixTimevalTest.cs @@ -1,22 +1,6 @@ -/* -This file is part of SharpPcap - -SharpPcap is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -SharpPcap is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with SharpPcap. If not, see . -*/ -/* - * Copyright 2010 Chris Morgan - */ +// Copyright 2010 Chris Morgan +// +// SPDX-License-Identifier: MIT using System; using NUnit.Framework; diff --git a/Test/RemotePcapTests.cs b/Test/RemotePcapTests.cs index ae1ea008..ce257783 100644 --- a/Test/RemotePcapTests.cs +++ b/Test/RemotePcapTests.cs @@ -1,3 +1,6 @@ +// Copyright 2020 Ayoub Kaanich +// SPDX-License-Identifier: MIT + using System; using System.Diagnostics; using System.IO; diff --git a/Test/SendPacketTest.cs b/Test/SendPacketTest.cs index 46e1e90e..292b5904 100644 --- a/Test/SendPacketTest.cs +++ b/Test/SendPacketTest.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// Copyright 2020 Ayoub Kaanich +// Copyright 2020-2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/SendQueueTest.cs b/Test/SendQueueTest.cs index ef9f6eea..62fb297c 100644 --- a/Test/SendQueueTest.cs +++ b/Test/SendQueueTest.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// Copyright 2020 Ayoub Kaanich +// Copyright 2020-2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/Statistics/StatisticsDeviceTest.cs b/Test/Statistics/StatisticsDeviceTest.cs index 0bd4fbb2..af1bd5b8 100644 --- a/Test/Statistics/StatisticsDeviceTest.cs +++ b/Test/Statistics/StatisticsDeviceTest.cs @@ -1,4 +1,8 @@ -using System; +// Copyright 2021 Chris Morgan +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; diff --git a/Test/Test.csproj b/Test/Test.csproj index cbc8aa2d..417ac671 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -1,4 +1,11 @@ - + + true net8.0 diff --git a/Test/TestHelper.cs b/Test/TestHelper.cs index 559cd565..08bcbd26 100644 --- a/Test/TestHelper.cs +++ b/Test/TestHelper.cs @@ -1,4 +1,8 @@ -using PacketDotNet; +// Copyright 2020-2021 Ayoub Kaanich +// Copyright 2020-2021 Chris Morgan +// SPDX-License-Identifier: MIT + +using PacketDotNet; using SharpPcap; using SharpPcap.LibPcap; using System; diff --git a/Test/TestUser.cs b/Test/TestUser.cs index 78c5c2f3..09a3a372 100644 --- a/Test/TestUser.cs +++ b/Test/TestUser.cs @@ -1,4 +1,7 @@ -using System; +// Copyright 2020-2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using System; using System.DirectoryServices.AccountManagement; using System.Runtime.Versioning; diff --git a/Test/ThreadSafeTests.cs b/Test/ThreadSafeTests.cs index cd0fc2ba..c5b92dab 100644 --- a/Test/ThreadSafeTests.cs +++ b/Test/ThreadSafeTests.cs @@ -1,4 +1,7 @@ -using NUnit.Framework; +// Copyright 2022 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using SharpPcap; using SharpPcap.LibPcap; using System; diff --git a/Test/Tunneling/IpHelper.cs b/Test/Tunneling/IpHelper.cs index 88a3ebe7..6f361b90 100644 --- a/Test/Tunneling/IpHelper.cs +++ b/Test/Tunneling/IpHelper.cs @@ -1,4 +1,8 @@ -using System; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System; using System.Linq; using System.Net; using System.Net.NetworkInformation; diff --git a/Test/Tunneling/TunnelDeviceTest.cs b/Test/Tunneling/TunnelDeviceTest.cs index b1897086..e77125db 100644 --- a/Test/Tunneling/TunnelDeviceTest.cs +++ b/Test/Tunneling/TunnelDeviceTest.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.LibPcap; diff --git a/Test/Tunneling/UdpTester.cs b/Test/Tunneling/UdpTester.cs index 56a81f23..ef4dde83 100644 --- a/Test/Tunneling/UdpTester.cs +++ b/Test/Tunneling/UdpTester.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using System; using System.Net; diff --git a/Test/WebHelper.cs b/Test/WebHelper.cs index 1be85aca..130956e8 100644 --- a/Test/WebHelper.cs +++ b/Test/WebHelper.cs @@ -1,4 +1,7 @@ -using System.Net; +// Copyright 2021 Ayoub Kaanich +// SPDX-License-Identifier: MIT + +using System.Net; namespace Test { diff --git a/Test/WinDivert/IpHelperTest.cs b/Test/WinDivert/IpHelperTest.cs index f8feb37b..d01011f1 100644 --- a/Test/WinDivert/IpHelperTest.cs +++ b/Test/WinDivert/IpHelperTest.cs @@ -1,4 +1,8 @@ -using System.Net; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using System.Net; using NUnit.Framework; using SharpPcap.WinDivert; diff --git a/Test/WinDivert/WinDivertDeviceTest.cs b/Test/WinDivert/WinDivertDeviceTest.cs index f9fa4e70..3090e209 100644 --- a/Test/WinDivert/WinDivertDeviceTest.cs +++ b/Test/WinDivert/WinDivertDeviceTest.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// SPDX-FileCopyrightText: 2020 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.WinDivert; diff --git a/Test/WinpkFilter/WinpkFilterDeviceTest.cs b/Test/WinpkFilter/WinpkFilterDeviceTest.cs index 0d68a9af..b56866e5 100644 --- a/Test/WinpkFilter/WinpkFilterDeviceTest.cs +++ b/Test/WinpkFilter/WinpkFilterDeviceTest.cs @@ -1,4 +1,8 @@ -using NUnit.Framework; +// SPDX-FileCopyrightText: 2021 Ayoub Kaanich +// +// SPDX-License-Identifier: MIT + +using NUnit.Framework; using PacketDotNet; using SharpPcap; using SharpPcap.WinDivert; diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3e7e7836..5359fb35 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,8 @@ -# .NET Desktop +# Copyright 2019 Lex Li +# Copyright 2020-2021 Chris Morgan +# Copyright 2020-2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + # Build and run tests for .NET Desktop or Windows classic desktop solutions. # Add steps that publish symbols, save build artifacts, and more: # https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net diff --git a/codecov.yml b/codecov.yml index 763aae00..4c534dac 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,9 @@ +# Copyright 2020-2021 Ayoub Kaanich +# SPDX-License-Identifier: MIT + codecov: # Allow collecting coverage even if some CIs fail - require_ci_to_pass: no + require_ci_to_pass: false notify: # 4 for appveyor # 3 for azure pipelines diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..dc399de3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# Copyright 2023 Ayoub Kaanich +# SPDX-License-Identifier: MIT +reuse==2.1.0 diff --git a/scripts/Install-npcap.ps1 b/scripts/Install-npcap.ps1 index 26b1ff17..f407c6d4 100644 --- a/scripts/Install-npcap.ps1 +++ b/scripts/Install-npcap.ps1 @@ -1,5 +1,8 @@ +# Copyright 2021 Chris Morgan +# SPDX-License-Identifier: MIT + # Install Npcap on the machine. -# Copied from https://github.com/secdev/scapy/blob/master/.config/appveyor/InstallNpcap.ps1 +# Based on https://github.com/secdev/scapy/blob/master/.config/appveyor/InstallNpcap.ps1 # Config: $npcap_oem_file = "npcap-1.55-oem.exe" diff --git a/scripts/codecov.sh b/scripts/codecov.sh index 6b9fbe3b..846941c3 100644 --- a/scripts/codecov.sh +++ b/scripts/codecov.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# Copyright 2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT # Logic for OS detection from https://circleci.com/developer/orbs/orb/codecov/codecov diff --git a/scripts/install-dotnet.sh b/scripts/install-dotnet.sh index 75ae70bb..34f801b1 100644 --- a/scripts/install-dotnet.sh +++ b/scripts/install-dotnet.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Copyright 2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + set -e curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 "$@" diff --git a/scripts/install-libpcap.sh b/scripts/install-libpcap.sh index b4e86a25..8e9f1869 100644 --- a/scripts/install-libpcap.sh +++ b/scripts/install-libpcap.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright 2021 Ayoub Kaanich +# SPDX-License-Identifier: MIT + # the default installation of libpcap does not have remote pcap enabled # so we need to compile our own # see https://github.com/the-tcpdump-group/libpcap/issues/795 diff --git a/scripts/install-tap.sh b/scripts/install-tap.sh index 70fd6b28..ebc77b04 100644 --- a/scripts/install-tap.sh +++ b/scripts/install-tap.sh @@ -1,3 +1,6 @@ #!/bin/bash +# Copyright 2021 Ayoub Kaanich +# SPDX-License-Identifier: MIT + ip tuntap add mode tap diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index 24edb86b..696bff0a 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -1,4 +1,7 @@ +# Copyright 2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + choco install -y dotnet-sdk --version=6.0.300 choco install -y tapwindows choco install -y procdump diff --git a/scripts/install-winpkfilter.ps1 b/scripts/install-winpkfilter.ps1 index ffefdb14..620bd476 100644 --- a/scripts/install-winpkfilter.ps1 +++ b/scripts/install-winpkfilter.ps1 @@ -1,4 +1,7 @@ +# Copyright 2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + Push-Location $env:TEMP $arch = If ([Environment]::Is64BitOperatingSystem) {'x64'} Else {'x86'} diff --git a/scripts/test.sh b/scripts/test.sh index 0703f1a7..41f35708 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright 2022 Ayoub Kaanich +# SPDX-License-Identifier: MIT + set -e TEST_ARGS=("$@")