Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c98eaf7
wscript: Add missing CMP sources
yashi Jul 2, 2026
c5b2d6e
meson.build: Fix incorrect license identifier
yashi Jul 1, 2026
24486a1
build(deps): bump actions/checkout from 6 to 7
dependabot[bot] Jul 2, 2026
7a162a5
drivers: eth: eth_linux: Initialize SO_REUSEADDR option
yashi Jul 2, 2026
d559678
github: build-test: Add Ubuntu 26.04
yashi Jul 2, 2026
2fc1e75
fix: compilation error when CSP_ENABLE_CSP_PRINT=0
LewentalDigital Jun 22, 2026
0a80f9f
github: workflow: Add compile time options check
LewentalDigital Jul 8, 2026
e4000a2
fix(service): avoid use-after-free in the CSP_PS handler
gigioneggiando Jul 3, 2026
bf336e9
csp_service_handler: Refactor out 32-bit service reply handling
yashi Jul 10, 2026
c46591b
csp_service_handler: Remove redundant packet null check
yashi Jul 10, 2026
2e7d50d
csp_service_handler: Centralize discarded packet cleanup
yashi Jul 10, 2026
b5e2286
meson: Set Shared Library Version
yashi Jul 11, 2026
4b3c08d
waf: Set Shared Library Version
yashi Jul 11, 2026
bbbfd16
cmake: set proper SOVERSION
guillaume-jcb May 12, 2026
f2a2c1e
bindings: add missing python bindings
guillaume-jcb May 12, 2026
a47b4d7
csp_yaml: Copy UDP host string to fix use-after-free
Sammy-Dabbas Jul 10, 2026
d874cbb
gitlint: Ignore B1 for Dependabot commits
yashi Aug 10, 2026
651dca9
github: Avoid duplicate checks for pull requests
yashi Aug 10, 2026
c862620
build(deps): bump actions/setup-python from 6 to 7
dependabot[bot] Aug 10, 2026
4aed655
csp: Fix csp_hex_dump() stub signature mismatch
yashi Aug 10, 2026
c5207a6
csp_io: Fix doxygen comment for csp_send_direct()
yashi Aug 10, 2026
cd07298
csp_route: Extract csp_socket_is_conn_less() predicate
yashi Aug 10, 2026
c9efc26
csp_route: Extract delivery helpers from csp_route_work()
yashi Aug 10, 2026
addcf14
csp_route: Hoist endpoint resolution and security check
yashi Aug 10, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/abi-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo apt-get install abi-compliance-checker abi-dumper

- name: Checkout merged-base
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.base.ref }}

Expand All @@ -32,7 +32,7 @@ jobs:
abi-dumper build/libcsp.so -lver "merged-base" -o ../tmp/libcsp-merged-base.dump

- name: Checkout Current PR
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/build-test-freertos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: FreeRTOS Build and Test
on: [push, pull_request]
on:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
permissions:
contents: read
concurrency:
Expand All @@ -17,18 +22,18 @@ jobs:
sudo apt-get install ninja-build meson tree

- name: Checkout Test App
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: libcsp/libcsp-freertos

- name: Checkout FreeRTOS Kernel
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: FreeRTOS/FreeRTOS-Kernel
path: freertos

- name: Checkout libcsp under subprojects
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
path: subprojects/libcsp

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build-test-python.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Python Bindings
on: [push, pull_request]
on:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
permissions:
contents: read
concurrency:
Expand All @@ -25,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -39,7 +44,7 @@ jobs:
sudo apt-get install ninja-build ${{ matrix.buildsystem }}

- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Build libcsp examples
run: python3 examples/buildall.py --build-system=${{ matrix.buildsystem }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build-test-zephyr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Zephyr Build and Test
on:
push:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
schedule:
- cron: '0 10 * * 0' # Run it every Sunday 10am UTC

Expand All @@ -26,7 +29,7 @@ jobs:

steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -35,7 +38,7 @@ jobs:
python3 --version

- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
path: libcsp-zephyr
repository: yashi/libcsp-zephyr
Expand Down
92 changes: 58 additions & 34 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build and Test
on: [push, pull_request]
on:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
permissions:
contents: read
concurrency:
Expand All @@ -10,66 +15,85 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- ubuntu-22.04
buildsystem:
- meson
- cmake
- waf
compiler:
- CC: gcc-10
target:
# Ubuntu 22.04 only has GCC 10, 11, 12
- os: ubuntu-22.04
CC: gcc-10
CXX: g++-10
- CC: gcc-11
- os: ubuntu-22.04
CC: gcc-11
CXX: g++-11
- CC: gcc-12
- os: ubuntu-22.04
CC: gcc-12
CXX: g++-12
- CC: gcc-13
- os: ubuntu-22.04
CC: clang
CXX: clang++
# Ubuntu 24.04 only has GCC 12, 13, 14
- os: ubuntu-24.04
CC: gcc-12
CXX: g++-12
- os: ubuntu-24.04
CC: gcc-13
CXX: g++-13
- CC: gcc-14
- os: ubuntu-24.04
CC: gcc-14
CXX: g++-14
- CC: clang
- os: ubuntu-24.04
CC: clang
CXX: clang++
# Ubuntu 26.04 only has GCC 13, 14, 15
- os: ubuntu-26.04
CC: gcc-13
CXX: g++-13
- os: ubuntu-26.04
CC: gcc-14
CXX: g++-14
- os: ubuntu-26.04
CC: gcc-15
CXX: g++-15
- os: ubuntu-26.04
CC: clang
CXX: clang++
buildsystem:
- meson
- cmake
- waf
csp_version:
- 1
- 2
exclude:
# Ubuntu 22.04 only has GCC 10, 11, 12
- os: ubuntu-22.04
compiler:
CC: gcc-13
- os: ubuntu-22.04
compiler:
CC: gcc-14
# Ubuntu 24.04 only has GCC 12, 13, 14
- os: ubuntu-24.04
compiler:
CC: gcc-10
- os: ubuntu-24.04
compiler:
CC: gcc-11

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.target.os }}
steps:
- name: Setup packages on Linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libzmq3-dev libsocketcan-dev socat iproute2
sudo apt-cache search linux-modules

- name: Setup packages on Ubuntu 22.04/24.04
if: ${{ runner.os == 'Linux' && (matrix.target.os == 'ubuntu-22.04' || matrix.target.os == 'ubuntu-24.04') }}
run: |
sudo apt-get install linux-modules-extra-$(uname -r)

- name: Setup packages on Linux 26.04
if: ${{ runner.os == 'Linux' && (matrix.target.os == 'ubuntu-26.04') }}
run: |
sudo apt-get install linux-modules-$(uname -r)

- name: Setup build system packages on Linux
if: ${{ runner.os == 'Linux' && matrix.buildsystem != 'waf' }}
run: |
sudo apt-get install ninja-build ${{ matrix.buildsystem }}

- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Build
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
CC: ${{ matrix.target.CC }}
CXX: ${{ matrix.target.CXX }}
run: python3 ./examples/buildall.py --build-system=${{ matrix.buildsystem }}

- name: Run Loopback Test
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/check-compile-options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check Compile Options
on:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check-compile-options:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
options:
- "-D enable_csp_print=false -D print_stdio=false"
- "-D enable_csp_print=false -D print_stdio=true"
- "-D enable_csp_print=true -D print_stdio=false"
- "-D enable_csp_print=true -D print_stdio=true"
runs-on: ${{ matrix.os }}
steps:
- name: Setup packages on Linux
run: |
sudo apt-get update
sudo apt-get install libzmq3-dev libsocketcan-dev ninja-build meson

- name: Checkout
uses: actions/checkout@v7

- name: Build with compile time options
run: |
meson setup ${{ matrix.options }} builddir
meson compile -C builddir/
2 changes: 1 addition & 1 deletion .github/workflows/check-merge-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:

- name: Checkout PR head
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Codespell Check

on:
on:
pull_request:
push:
branches:
- develop
- 'libcsp-*'
permissions:
contents: read

Expand All @@ -12,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install codespell
run: pip install codespell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/develop-build-sphinx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup packages on Linux
if: ${{ runner.os == 'Linux' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pip3 install gitlint

- name: Checkout the code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linelint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Linelint
uses: fernandrone/linelint@master
4 changes: 4 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ regex-style-search=true

[ignore-body-lines]
regex=^(?:(?:Signed-off|Acked|Co-Authored|Reported|Tested)-by: |\[\d+\]: https:\/\/)

[ignore-by-author-name]
regex=^dependabot\[bot\]$
ignore=B1
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ add_library(csp)
set_target_properties(csp PROPERTIES C_STANDARD 11)
set_target_properties(csp PROPERTIES C_EXTENSIONS ON)

set_target_properties(csp PROPERTIES
VERSION ${CSP_VERSION}
SOVERSION ${CSP_VERSION_MAJOR}
)

set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to MinSizeRel")
Expand Down
7 changes: 6 additions & 1 deletion include/csp/csp.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,12 @@ void csp_hex_dump(const char *desc, const void *addr, int len);
#else

inline void csp_conn_print_table(void) {}
inline void csp_hex_dump(const char *desc, void *addr, int len) {}
inline void csp_hex_dump(const char *desc, const void *addr, int len) {
/* Avoid compiler warnings about unused parameters when CSP_ENABLE_CSP_PRINT=0 */
(void)desc;
(void)addr;
(void)len;
}

#endif

Expand Down
2 changes: 1 addition & 1 deletion include/csp/csp_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void csp_print_func(const char * fmt, ...);
#if (CSP_ENABLE_CSP_PRINT)
#define csp_print(...) csp_print_func(__VA_ARGS__);
#else
#define csp_print(...) do {} while(0)
#define csp_print(...) do { if(0) csp_print_func(__VA_ARGS__); /* avoids unused-parameter compiler errors */ } while(0)
#endif

#define csp_rdp_error(format, ...) { if (csp_dbg_rdp_print >= 1) { csp_print("\033[31m" format "\033[0m", ##__VA_ARGS__); }}
Expand Down
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('csp', 'c', version: '2.2', license: 'LGPL', meson_version : '>=0.61.2', default_options : [
project('csp', 'c', version: '2.2', license: 'MIT', meson_version : '>=0.61.2', default_options : [
'c_std=gnu11',
'optimization=s',
'warning_level=3',
Expand Down Expand Up @@ -101,6 +101,7 @@ csp_lib = library('csp',
c_args : csp_c_args,
install : true,
pic:true,
version : meson.project_version(),
)

# The following dependency variable is for parent projects to link
Expand Down
Loading