Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e002f1e
Move source files do src/ directory
fabriciofx Aug 29, 2025
16fe9d7
Fix compile warnings and errors
fabriciofx Aug 29, 2025
c35cf6b
Fix an error and warning in gentables.c
fabriciofx Aug 29, 2025
63983d6
Configure autotools to build hping
fabriciofx Aug 29, 2025
25d1367
Configure autotools to detect endianess
fabriciofx Aug 29, 2025
d2a580e
Change configure to detect os type
fabriciofx Aug 29, 2025
a64ae80
Add necessary files to run configure
fabriciofx Aug 29, 2025
ae24fbe
Configure to build libars.a
fabriciofx Aug 29, 2025
5c6dd7f
Add more files to not track
fabriciofx Aug 29, 2025
60dfa0e
Fix missing configure files
fabriciofx Aug 30, 2025
2672c42
Add GitHub Actions to build
fabriciofx Aug 30, 2025
27f5b80
Add automake to build in GitHub Actions
fabriciofx Aug 30, 2025
0ba05ce
Fix package installation in GitHub Actions
fabriciofx Aug 30, 2025
f3ff2d2
Fix install package permission in Linux build using GH Actions
fabriciofx Aug 30, 2025
54c75eb
Fix linux build in GitHub Actions to install automake 1.18
fabriciofx Aug 30, 2025
11d1efc
Fix files install into configure and make
fabriciofx Aug 30, 2025
fe680ae
Add extra files to be add into final package
fabriciofx Aug 30, 2025
cfa15d0
Remove package file and dir from project when cleanup
fabriciofx Aug 30, 2025
d82bcec
Remove autotools generated files
fabriciofx Aug 30, 2025
9a41d07
Change GitHub Actions to build using autotools
fabriciofx Aug 30, 2025
ee833db
Remove && from end of line in yaml GitHub Actions files
fabriciofx Aug 30, 2025
e6a706b
Add linux-headers as dependency in GitHub Actions
fabriciofx Aug 30, 2025
3b739fe
Allow create a binary package
fabriciofx Aug 30, 2025
1c75611
Add make binary-dist to generate a binary package
fabriciofx Aug 30, 2025
0d07963
Only include net/bpf.h if not in Linux and not in Sun
fabriciofx Aug 30, 2025
6f49f13
Don't track generated files
fabriciofx Aug 30, 2025
93cd1fe
Remove linux-headers unnecessary installation from GitHub Actions
fabriciofx Aug 30, 2025
8842704
Fix build error because delaystable was been declared multiple times
fabriciofx Aug 30, 2025
a5194dc
Fix compile warnings because return values haven't been used
fabriciofx Aug 30, 2025
c55ef8d
Change to make source and binary packages another step
fabriciofx Aug 30, 2025
19ff0c9
Update GitHub actions build for Linux and macOS
fabriciofx Aug 30, 2025
dd487ec
Add GitHub actions to release artifacts after build
fabriciofx Aug 30, 2025
6666f79
Add workflow_dispatch to run on a self-hosted macOS
fabriciofx Aug 30, 2025
a68913c
Merge properties from configure.ac in GitHub Actions
fabriciofx Aug 30, 2025
d458dd2
Fix detect if running in act (vscode fails to recognize before)
fabriciofx Aug 30, 2025
fdd06fc
Configure GitHub actions to release after a sucessful build
fabriciofx Aug 31, 2025
5bdbf6d
Fix GitHub action artifact upload
fabriciofx Aug 31, 2025
88fd70f
Remove macOS self-host GitHub action execution
fabriciofx Aug 31, 2025
68a54e7
Change GitHub actions just Linux/macOS just do build and release to b…
fabriciofx Aug 31, 2025
645711f
Fix GitHub actions release to download/upload artifacts after build
fabriciofx Aug 31, 2025
935af9d
Add to GH action release to delete default source code archives
fabriciofx Aug 31, 2025
aeb9484
Revert "Add to GH action release to delete default source code archives"
fabriciofx Aug 31, 2025
80c3e12
Change configure.ac to set a flag USE_TCL if tcl has been detected
fabriciofx Aug 31, 2025
e43c91a
Fix net/bpf.h include only if os type isn't Linux or sun
fabriciofx Aug 31, 2025
e5e6741
Remove OSTYPE_* from config.h and set like a compiler flag
fabriciofx Aug 31, 2025
0e62603
Fix warnings when USE_TCL is defined
fabriciofx Aug 31, 2025
8c870fd
Fix warning according with TCL major version
fabriciofx Aug 31, 2025
05d0f51
Configure BREW_PKGCONFIG only makes senses in macOS
fabriciofx Aug 31, 2025
4dcc0a4
Bump to 3.0.0
fabriciofx Aug 31, 2025
98fe477
Add the homebrew pkg-config path to libcap and tcl-tk
fabriciofx Aug 31, 2025
dd5c03e
Simplify GitHub actions
fabriciofx Sep 1, 2025
fca1871
Update GitHub workflows
fabriciofx Sep 4, 2025
a244eaa
Fix shellcheck erros in c-cpp workflows
fabriciofx Sep 4, 2025
cd9067c
Add config file to action security
fabriciofx Sep 4, 2025
0338a89
Fix more shellcheck double quotes in c-cpp workflows
fabriciofx Sep 4, 2025
396ff31
Remove too many double quotes
fabriciofx Sep 4, 2025
ece6b94
Add dependencies to build
fabriciofx Sep 4, 2025
b1aa6f5
Fix bin package filename in c-cpp workflows
fabriciofx Sep 4, 2025
7560527
Fix upgrade command in chocolatey
fabriciofx Sep 4, 2025
59c0d45
Remove upgrade command from chocolatey
fabriciofx Sep 4, 2025
14c7235
Add packages lists do install
fabriciofx Sep 4, 2025
6acff78
Update GitHub workflows
fabriciofx Sep 4, 2025
a446484
Update brew and choco packages to install
fabriciofx Sep 4, 2025
5b4878f
Upgrade c-cpp build and release GitHub workflows
fabriciofx Sep 4, 2025
ba6376a
Fix action security error due cache configuration
fabriciofx Sep 4, 2025
288d287
Fix autogen.sh and configure execution in windows build
fabriciofx Sep 4, 2025
64cd10e
Add install autoconf, automake, libtool and m4 via pacman in Windows …
fabriciofx Sep 4, 2025
59b4633
Update GitHub workflows
fabriciofx Sep 5, 2025
2ba713e
Fix SC2015 'A && B || C is not if-then-else' in c-cpp build and relea…
fabriciofx Sep 5, 2025
b99f182
Fix refresh env when building c/cpp in windows
fabriciofx Sep 5, 2025
63fb32d
Install base-devel in c/cpp build GitHub workflow
fabriciofx Sep 5, 2025
9db0ec0
Update c/cpp build workflow
fabriciofx Sep 5, 2025
ab622f2
Remove refreshenv in c/cpp build workflow
fabriciofx Sep 5, 2025
3b9d11e
Fix path set on windows on c/cpp build workflow
fabriciofx Sep 5, 2025
6511c93
Executes mingw64 shell on windows in c/cpp build workflow
fabriciofx Sep 5, 2025
4695f19
Use msys2_shell.cmd to build c/cpp in windows workflow
fabriciofx Sep 5, 2025
01ae9ad
Find msys2_shell.cmd in c/cpp build workflow
fabriciofx Sep 5, 2025
06ec8cc
Remove pkgconf in brew-packages.txt because it has already installed
fabriciofx Sep 5, 2025
098097c
Use msys2 action instead of chocolatey install in c-cpp build workflow
fabriciofx Sep 5, 2025
c00d0c3
Use mingw64 instead of msys in c/cpp build workflow
fabriciofx Sep 6, 2025
d917063
Fix packages to install in mingw64 on c/cpp build workflow
fabriciofx Sep 6, 2025
efbae2d
Install autoconf, automake and libtool to msys in c-cpp build workflow
fabriciofx Sep 6, 2025
6d74303
Detect windows in autotools
fabriciofx Sep 6, 2025
e413a7f
Fix arch in darwin when configuring pkg-config path
fabriciofx Sep 6, 2025
32bb195
Convert tab to 4 spaces in all source code
fabriciofx Sep 6, 2025
c211601
Change inet_aton with inet_pton
fabriciofx Sep 6, 2025
3899a08
Update GitHub action update workflow
fabriciofx Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/action-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Fabrício Barros Cabral
# SPDX-License-Identifier: MIT
---
name: action-lint
'on':
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
defaults:
run:
shell: bash -xeuo pipefail {0}
permissions:
contents: read
jobs:
action-lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Download and installs actionlint
# yamllint disable rule:line-length
run: |
curl -sS -L --retry 3 -o /tmp/download-actionlint.bash \
https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash
bash /tmp/download-actionlint.bash latest /tmp
# yamllint enable rule:line-length
- name: Check workflow files
run: /tmp/actionlint -color
48 changes: 48 additions & 0 deletions .github/workflows/action-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Fabrício Barros Cabral
# SPDX-License-Identifier: MIT
---
name: action-security
'on':
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
defaults:
run:
shell: bash -xeuo pipefail {0}
jobs:
action-security:
runs-on: ubuntu-24.04
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Download and installs zizmor
run: |
site="https://github.com/zizmorcore/zizmor/releases/latest/download"
file="zizmor-x86_64-unknown-linux-gnu.tar.gz"
curl -sS -L --retry 3 -o /tmp/${file} ${site}/${file}
mkdir /tmp/as
tar xfz /tmp/${file} -C /tmp/as --no-same-owner --no-same-permissions
chmod +x /tmp/as/zizmor
- name: Check security in workflow files
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
/tmp/as/zizmor .github/workflows --config .github/zizmor.yml
- name: Stop pipeline if issues are found
run: |
if grep -q "error" zizmor.log; then
echo "Zizmor found some security issues:"
cat zizmor.log
exit 1
fi
29 changes: 29 additions & 0 deletions .github/workflows/action-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Fabrício Barros Cabral
# SPDX-License-Identifier: MIT
---
name: action-update
'on':
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
defaults:
run:
shell: bash -xeuo pipefail {0}
permissions:
contents: read
jobs:
action-update:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- name: Run renovate
uses: renovatebot/github-action@7876d7a812254599d262d62b6b2c2706018258a2
with:
token: ${{ secrets.GITHUB_TOKEN }}
204 changes: 204 additions & 0 deletions .github/workflows/c-cpp-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Fabrício Barros Cabral
# SPDX-License-Identifier: MIT
---
name: c-cpp-build
'on':
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
defaults:
run:
shell: bash -xeuo pipefail {0}
permissions:
contents: read
jobs:
c-cpp-linux-build:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Configure apt cache
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('**/apt-packages.txt') }}
restore-keys: ${{ runner.os }}-apt-
- name: Install dependencies
run: |
sudo apt-get update
if [ -s apt-packages.txt ]; then
xargs -a apt-packages.txt sudo apt-get install \
-y --no-install-recommends
fi
- name: Configure and build
run: |
[ -x ./autogen.sh ] && ./autogen.sh
[ -x ./configure ] && ./configure
[ -s Makefile ] || {
echo "I couldn't find an autogen.sh, configure, or Makefile."
echo "Please check your files."
exit 1
}
make
- name: Get properties from configure.ac
id: props
# yamllint disable rule:line-length
run: |
name="$(sed -n 's/AC_INIT(\[\([^]]*\)\],.*/\1/p' configure.ac)"
echo "name=${name}" >> "${GITHUB_OUTPUT}"
version="$(sed -n 's/AC_INIT(\[[^]]*\], \[\([^]]*\)\], \[[^]]*\])/\1/p' configure.ac)"
echo "version=${version}" >> "${GITHUB_OUTPUT}"
# yamllint enable rule:line-length
- name: Create source package
run: |
make dist
- name: Create Linux binary package
run: |
make binary-dist
- name: Prepare packages to distribution
env:
NAME: ${{ steps.props.outputs.name }}
VERSION: ${{ steps.props.outputs.version }}
run: |
# Sanitize variables for security purposes
safe_name="$(echo "${NAME}" | tr -cd '[:alnum:]._-' )"
safe_version="$(echo "${VERSION}" | tr -cd '[:alnum:]._-' )"

# Check if variables are empty
[ -z "$safe_name" ] && { echo "Invalid name"; exit 1; }
[ -z "$safe_version" ] && { echo "Invalid version"; exit 1; }

# Check if files exists
src="${safe_name}-${safe_version}.tar.gz"
bin="${safe_name}-${safe_version}-bin.tar.gz"
[ -f "$src" ] || { echo "File '${src}' not found"; exit 1; }
[ -f "$bin" ] || { echo "File '${bin}' not found"; exit 1; }

# Move files
mkdir -p dist
mv "${src}" dist/
mv "${bin}" "dist/${safe_name}-${safe_version}-linux.tar.gz"
c-cpp-macos-build:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install dependencies
run: |
brew update
if [ -s brew-packages.txt ]; then
xargs brew install < brew-packages.txt
fi
- name: Configure and build
run: |
[ -x ./autogen.sh ] && ./autogen.sh
[ -x ./configure ] && ./configure
[ -s Makefile ] || {
echo "I couldn't find an autogen.sh, configure, or Makefile."
echo "Please check your files."
exit 1
}
make
- name: Get properties from configure.ac
id: props
# yamllint disable rule:line-length
run: |
name="$(sed -n 's/AC_INIT(\[\([^]]*\)\],.*/\1/p' configure.ac)"
echo "name=${name}" >> "${GITHUB_OUTPUT}"
version="$(sed -n 's/AC_INIT(\[[^]]*\], \[\([^]]*\)\], \[[^]]*\])/\1/p' configure.ac)"
echo "version=${version}" >> "${GITHUB_OUTPUT}"
# yamllint enable rule:line-length
- name: Create macOS binary package
run: |
make binary-dist
- name: Prepare package to distribution
env:
NAME: ${{ steps.props.outputs.name }}
VERSION: ${{ steps.props.outputs.version }}
run: |
# Sanitize variables for security purposes
safe_name="$(echo "${NAME}" | tr -cd '[:alnum:]._-' )"
safe_version="$(echo "${VERSION}" | tr -cd '[:alnum:]._-' )"

# Check if variables are empty
[ -z "$safe_name" ] && { echo "Invalid name"; exit 1; }
[ -z "$safe_version" ] && { echo "Invalid version"; exit 1; }

# Check if file exist
bin="${safe_name}-${safe_version}-bin.tar.gz"
[ -f "$bin" ] || { echo "File '${bin}' not found"; exit 1; }

# Move file
mkdir -p dist
mv "${bin}" dist/"${safe_name}-${safe_version}-macos.tar.gz"
c-cpp-windows-build:
runs-on: windows-2025
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install and setup MSYS2 with MinGW64
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2
with:
msystem: MINGW64
update: true
install: >-
base-devel
autoconf
automake
libtool
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-make
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-libpcap
mingw-w64-x86_64-tcl
- name: Configure and build
shell: msys2 {0}
run: |
[ -x ./autogen.sh ] && ./autogen.sh
[ -x ./configure ] && ./configure --host=x86_64-w64-mingw64
[ -s Makefile ] || {
echo "I couldn't find an autogen.sh, configure, or Makefile."
echo "Please check your files."
exit 1
}
make
- name: Get properties from configure.ac
id: props
# yamllint disable rule:line-length
run: |
name="$(sed -n 's/AC_INIT(\[\([^]]*\)\],.*/\1/p' configure.ac)"
echo "name=${name}" >> "${GITHUB_OUTPUT}"
version="$(sed -n 's/AC_INIT(\[[^]]*\], \[\([^]]*\)\], \[[^]]*\])/\1/p' configure.ac)"
echo "version=${version}" >> "${GITHUB_OUTPUT}"
# yamllint enable rule:line-length
- name: Create source package
run: |
make dist
- name: Create Windows binary package
run: |
make binary-dist
- name: Prepare packages to distribution
env:
NAME: ${{ steps.props.outputs.name }}
VERSION: ${{ steps.props.outputs.version }}
# yamllint disable rule:line-length
run: |
md dist
move "${NAME}-${VERSION}-bin.zip" "dist/${NAME}-${VERSION}-windows.zip"
# yamllint enable rule:line-length
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-dist
path: dist/*.zip
Loading