Skip to content

Commit

Permalink
Make sure all core files have an SPDX (#4263)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Feb 5, 2024
1 parent 3affdba commit b27081c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 17 deletions.
5 changes: 3 additions & 2 deletions scapy/contrib/tcpros.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# See https://scapy.net/ for more information
# Copyright (C) Víctor Mayoral-Vilches <v.mayoralv@gmail.com>
# This program is published under a GPLv2 license

"""
TCPROS transport layer for ROS Melodic Morenia 1.14.5
"""

# scapy.contrib.description = TCPROS transport layer for ROS Melodic Morenia
# scapy.contrib.status = loads
# scapy.contrib.name = tcpros
Expand Down
5 changes: 5 additions & 0 deletions scapy/layers/msrpce/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
# This file is part of Scapy
# See https://scapy.net/ for more information
# Copyright (C) Gabriel Potter

"""
[MS-RPCE] Remote Procedure Call Protocol Extensions
Expand Down
7 changes: 7 additions & 0 deletions scapy/layers/msrpce/raw/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
# This file is part of Scapy
# See https://scapy.net/ for more information

"""
'Raw' definitions of DCE/RPC IDL interfaces
"""
17 changes: 3 additions & 14 deletions scapy/layers/ppi.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Scapy 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
# any later version.
#
# Scapy 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 Scapy. If not, see <http://www.gnu.org/licenses/>.

# See https://scapy.net/ for more information
# Original PPI author: <jellch@harris.com>

# scapy.contrib.description = CACE Per-Packet Information (PPI) header
# scapy.contrib.status = loads

Expand Down
5 changes: 4 additions & 1 deletion scapy/libs/ethertypes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: BSD-3-Clause
# This file is part of Scapy
# See https://scapy.net/ for more information

Expand Down Expand Up @@ -70,6 +71,7 @@
DCA 1234 # DCA - Multicast
VALID 1600 # VALID system protocol
RCL 1995 # Datapoint Corporation (RCL lan protocol)
NHRP 2001 # NBMA Next Hop Resolution Protocol (RFC2332)
NBPCC 3C04 # 3Com NBP Connect complete not registered
NBPDG 3C07 # 3Com NBP Datagram (like XNS IDP) not registered
PCS 4242 # PCS Basic Block Protocol
Expand Down Expand Up @@ -124,11 +126,12 @@
MPLS 8847 # MPLS Unicast
AXIS 8856 # Axis Communications AB proprietary bootstrap/config
PPPOE 8864 # PPP Over Ethernet Session Stage
PAE 888E # 802.1X Port Access Entity
EAPOL 888E # 802.1X EAP over LAN
AOE 88A2 # ATA over Ethernet
QINQ 88A8 # 802.1ad VLAN stacking
LLDP 88CC # Link Layer Discovery Protocol
PBB 88E7 # 802.1Q Provider Backbone Bridging
NSH 894F # Network Service Header (RFC8300)
XNSSM 9001 # 3Com (Formerly Bridge Communications), XNS Systems Management
TCPSM 9002 # 3Com (Formerly Bridge Communications), TCP/IP Systems Management
DEBNI AAAA # DECNET? Used by VAX 6220 DEBNI
Expand Down
19 changes: 19 additions & 0 deletions scapy/tools/check_spdx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0-only
# This file is part of Scapy
# See https://scapy.net/ for more information

# Check that all Scapy files have a SPDX

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ROOT_DIR=$SCRIPT_DIR/../..

function check_path() {
cd $ROOT_DIR
for ext in "${@:2}"; do
find $1 -name "*.$ext" -exec bash -c '[[ -z $(grep "SPDX" {}) ]] && echo "{}"' \;
done
}

check_path scapy py

0 comments on commit b27081c

Please sign in to comment.