Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1e82b87
CI: build and test DCE with the Linux/FreeBSD kernel stacks
Gabrielcarvfer Oct 7, 2026
10a1249
Port to ns-3.49 and drop Ubuntu 22.04 from CI
Gabrielcarvfer Oct 7, 2026
72994be
DCE: core fixes found while porting the kernel stack to LKL
Gabrielcarvfer Oct 8, 2026
5efde39
LKL: build script and kernel configuration
Gabrielcarvfer Oct 8, 2026
534901d
LKL: patches for kernels on simulated time (TOUPSTREAM)
Gabrielcarvfer Oct 8, 2026
deb2380
LKL: Linux 6.12 network stack for DCE
Gabrielcarvfer Oct 8, 2026
bc7f2f0
Examples and tests: forwarding, Linux MPTCP (v1), iproute2 6.12
Gabrielcarvfer Oct 8, 2026
a10ab76
CI: LKL is the Linux stack; one libos job keeps libos and FreeBSD cov…
Gabrielcarvfer Oct 8, 2026
9b1744c
Remove libos (Linux 4.4) and FreeBSD
Gabrielcarvfer Oct 9, 2026
a067272
Fail the process tests whose program does not end
Gabrielcarvfer Oct 10, 2026
3af2f35
Wake sigwait for pthread_kill, and consume one pending signal
Gabrielcarvfer Oct 10, 2026
f3fc259
LKL: schedule kernel timers from the simulator's thread
Gabrielcarvfer Oct 10, 2026
2f0b9bd
LKL: do not block in the kernel, so that DCE can stop processes
Gabrielcarvfer Oct 10, 2026
8a125a1
LKL: receive from LTE devices, and from devices without Mac48 addresses
Gabrielcarvfer Oct 10, 2026
01a0367
LKL: enable IPv4 forwarding by default with LinuxSocketFdFactory
Gabrielcarvfer Oct 10, 2026
4bd06d3
Fix the MPTCP LTE+WiFi examples, and check that every path carries data
Gabrielcarvfer Oct 10, 2026
272cb23
Use NetDevice index + 1 for interface indexes with the ns-3 stack
Gabrielcarvfer Oct 10, 2026
bf097fd
waf: keep the module header task generator's name
Gabrielcarvfer Oct 10, 2026
ca50cc8
build_kernel_deps.sh: verify downloads, and stop on patches that fail
Gabrielcarvfer Oct 10, 2026
50f3f13
build_lkl.sh: require the LKL tree to be at the pinned revision
Gabrielcarvfer Oct 10, 2026
4640a17
LKL patch: give up on a stuck clock only after 1024 stuck measurements
Gabrielcarvfer Oct 10, 2026
53f2e90
Tighten the checks of dce-lkl-boot and dce-lkl-p2p
Gabrielcarvfer Oct 10, 2026
bb91d0a
MPTCP examples: count TCP payload, and fit the subflow limits to nRtrs
Gabrielcarvfer Oct 10, 2026
99117d7
dce-mptcp-handoff-v6: open the subflows over the second access point
Gabrielcarvfer Oct 10, 2026
658ed06
Ipv4DceRouting: deliver multicast locally when it is also forwarded
Gabrielcarvfer Oct 10, 2026
ed1ce26
Release the socket that socket() cannot return for lack of descriptors
Gabrielcarvfer Oct 10, 2026
4fefd5a
ns-3 stack: apply IPV6_PKTINFO on connected sockets, and reject bad ones
Gabrielcarvfer Oct 10, 2026
8774b3d
ns-3 stack: apply ICMP6_FILTER to raw ICMPv6 sockets
Gabrielcarvfer Oct 10, 2026
44edf32
LinuxSocketImpl: retry a blocked send even if the socket does not wake
Gabrielcarvfer Oct 10, 2026
78e6d78
LKL: let gdb find the kernel's debug information in elf-cache
Gabrielcarvfer Oct 10, 2026
87239b5
doc: build and install the kernel examples' programs and the quagga m…
Gabrielcarvfer Oct 10, 2026
eccc806
Minor: LKL header and diagnostic fixes
Gabrielcarvfer Oct 10, 2026
87c5aed
Do not lose a wake-up that comes before the waiting thread waits
Gabrielcarvfer Oct 10, 2026
ff10885
dce-sctp-simple: let the client receive, and check that it does
Gabrielcarvfer Oct 10, 2026
c013fd0
dce-mptcp-handoff-v4v6: let the traffic flow, over both access points
Gabrielcarvfer Oct 10, 2026
013835d
dce-cradle-simple: send bulk IPv6 traffic to the sink, and fail witho…
Gabrielcarvfer Oct 10, 2026
7425f47
LKL patch: update jiffies on interrupts while the tick is stopped
Gabrielcarvfer Oct 13, 2026
1cd4428
LKL: remove a re-armed timer's event instead of cancelling it
Gabrielcarvfer Oct 23, 2026
d81a47b
Fix lost wake-ups in pthread_cond_wait; index mutexes and conditions
Gabrielcarvfer Oct 23, 2026
e85ca76
Local sockets: socketpair, SOCK_SEQPACKET, SCM_RIGHTS, shutdown, ioctl
Gabrielcarvfer Oct 23, 2026
05ebef1
fork() fails when it cannot clone; no fortified longjmp() between fibers
Gabrielcarvfer Oct 23, 2026
aaa22b8
A program which crashes ends, not the simulation
Gabrielcarvfer Oct 23, 2026
18582b3
eventfd, epoll and pipe2 for event loops; fortified helpers for Dillo
Gabrielcarvfer Oct 7, 2026
ba400e1
GLib, GIO and GTK 4 inside DCE: futex, aligned malloc, GIO calls
Gabrielcarvfer Oct 7, 2026
a15e772
Faster libc forwarding and heap; sound, D-Bus and traffic checks
Gabrielcarvfer Oct 9, 2026
ebf7934
LKL: deliver frames larger than 1500 bytes
Gabrielcarvfer Oct 9, 2026
3a261d9
TaskManager: PerFiberTls, thread local storage of its own for every task
Gabrielcarvfer Oct 23, 2026
811c4b8
Run programs built as executables (PIE), such as a prebuilt Chromium
Gabrielcarvfer Oct 23, 2026
16475bf
libc: /proc/self/exe, openat, F_DUPFD_CLOEXEC, dlerror and other fixes
Gabrielcarvfer Oct 23, 2026
a48752a
Host socket passthrough and DceX11Helper: talk to the host's X server
Gabrielcarvfer Oct 7, 2026
6d56428
libc: new functions for ffmpeg and Chromium
Gabrielcarvfer Oct 23, 2026
47b28c1
New example dce-wifi-video: real ffmpeg streaming video over Wi-Fi
Gabrielcarvfer Oct 23, 2026
520c0a8
New examples x11-hello, gtk4-hello and dce-x11-hello: windows from DCE
Gabrielcarvfer Oct 23, 2026
ea42bcf
New example dce-browser: Dillo, Northstar, Chromium and Brave over Wi-Fi
Gabrielcarvfer Oct 23, 2026
e6bee58
build-and-run.sh, CI for the new examples, and smaller build fixes
Gabrielcarvfer Oct 23, 2026
da408de
Documentation and release notes for the new examples and DCE features
Gabrielcarvfer Oct 23, 2026
235eaa1
libc: Support glibc 2.43
Gabrielcarvfer Nov 5, 2026
9817cd6
KernelSocketFdFactory: Register NR devices as non-promiscuous
Gabrielcarvfer Nov 5, 2026
3f83ee3
New example dce-browser-nr: Chromium over NR with handover
Gabrielcarvfer Nov 5, 2026
ca4853f
build_kernel_deps.sh: build the latest Northstar
Gabrielcarvfer Nov 9, 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
116 changes: 107 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Build and Test DCE

on:
push:
branches: [ sikabo_master ]
branches: [ master ]
# Run for every pull request (merge-request pipeline), whatever the target branch
pull_request:
branches: [ sikabo_master ]
workflow_dispatch:

# Cancel superseded runs of the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
NS3_VER: "3.46"
NS3_VER: "3.49"

jobs:
build:
Expand All @@ -18,8 +23,6 @@ jobs:
fail-fast: false
matrix:
include:
- distro: ubuntu-22.04
image: ubuntu:22.04
- distro: ubuntu-24.04
image: ubuntu:24.04
- distro: debian-trixie
Expand All @@ -44,7 +47,44 @@ jobs:
libsqlite3-dev \
libxml2-dev \
wget \
make
make \
bc \
flex \
bison \
byacc \
gawk \
file \
xz-utils \
libssl-dev \
libdb-dev \
libsctp-dev \
libx11-dev \
libxext-dev \
libxv-dev \
libpulse-dev \
libsdl2-dev \
libfltk1.3-dev \
libpng-dev \
libjpeg-dev \
autoconf \
automake \
libtool \
meson \
libgtk-4-dev \
libuchardet-dev \
libpsl-dev \
libseccomp-dev \
libharfbuzz-dev \
libfribidi-dev \
libcairo2-dev \
libfontconfig-dev \
libfreetype-dev \
xvfb \
dbus \
libdav1d-dev \
libvpx-dev \
libopenh264-dev \
libopus-dev

- name: Configure git safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE/ns-3-dce"
Expand Down Expand Up @@ -88,24 +128,82 @@ jobs:
working-directory: ns-${{ env.NS3_VER }}
run: ./ns3 install

# DCE builds of ip, iperf, thttpd, wget, ping and quagga, and the
# ns-3-dce-quagga module.
- name: Cache kernel stack dependencies
id: cache-kernel-deps
uses: actions/cache@v4
with:
path: |
deps/bin_dce
deps/ns-3-dce-quagga
key: kernel-deps-${{ matrix.distro }}-${{ hashFiles('ns-3-dce/utils/build_kernel_deps.sh', 'ns-3-dce/utils/*.patch') }}

- name: Build kernel stack dependencies
if: steps.cache-kernel-deps.outputs.cache-hit != 'true'
working-directory: ns-3-dce
run: |
./utils/build_kernel_deps.sh "$GITHUB_WORKSPACE/deps"
rm -rf "$GITHUB_WORKSPACE/deps/src"

# Linux 6.12 kernel library (LKL) and its headers.
- name: Cache LKL
id: cache-lkl
uses: actions/cache@v4
with:
path: deps/lkl
key: lkl-${{ matrix.distro }}-${{ hashFiles('ns-3-dce/utils/build_lkl.sh', 'ns-3-dce/utils/lkl-patches/*.patch', 'ns-3-dce/utils/lkl-dce.config') }}

- name: Build LKL
if: steps.cache-lkl.outputs.cache-hit != 'true'
working-directory: ns-3-dce
run: |
./utils/build_lkl.sh "$GITHUB_WORKSPACE/lkl-src" "$GITHUB_WORKSPACE/deps/lkl"
rm -rf "$GITHUB_WORKSPACE/lkl-src" "$GITHUB_WORKSPACE/deps/lkl/liblkl.so.debug"

- name: Add Quagga module
run: cp -a deps/ns-3-dce-quagga ns-3-dce/myscripts/

- name: Configure DCE
working-directory: ns-3-dce
run: |
./waf configure \
--with-ns3="$GITHUB_WORKSPACE/build" \
--prefix="$GITHUB_WORKSPACE/build" \
--with-lkl="$GITHUB_WORKSPACE/deps/lkl" \
--enable-opt

- name: Build DCE
working-directory: ns-3-dce
run: ./waf build

- name: Build bash for DCE
- name: Install DCE binaries
working-directory: ns-3-dce
run: ./utils/build_bash.sh build/bin_dce
run: |
cp -a "$GITHUB_WORKSPACE/deps/bin_dce/." build/bin_dce/
cp "$GITHUB_WORKSPACE/deps/lkl/liblkl.so" build/bin_dce/
./utils/build_bash.sh build/bin_dce

- name: Run DCE tests
working-directory: ns-3-dce
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib:${{ github.workspace }}/build/lib64
run: python3 test.py
# xvfb-run provides the X server used by dce-x11-hello and the
# browsers; dbus-run-session the session bus GApplication (Northstar)
# registers on.
run: xvfb-run -a dbus-run-session -- python3 test.py -r

# Sockets cannot be uploaded; symlinks would be followed (dce-browser
# links its browser's /usr and /etc to the host's).
- name: Remove sockets and symlinks from test output
if: always()
working-directory: ns-3-dce
run: if [ -d testpy-output ]; then find testpy-output \( -type s -o -type l \) -delete; fi

- name: Upload test output
if: always()
uses: actions/upload-artifact@v4
with:
name: testpy-output-${{ matrix.distro }}
path: ns-3-dce/testpy-output
if-no-files-found: ignore
69 changes: 0 additions & 69 deletions .github/workflows/dce-gaction-test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ GRTAGS
GTAGS
myscripts/ns-3-dce-quagga/
myscripts/ns-3-dce-umip/
testpy-output/
72 changes: 72 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,78 @@ This file contains Direct Code Execution release notes (most recent releases fir

Please refer the page https://www.nsnam.org/projects/direct-code-execution/ for detailed instructions

Changes since dce-1.12 (development, ns-3.49)
==============================================

New examples
------------
- dce-wifi-video: real ffmpeg streaming video over simulated 802.11n
(station - access point - station) on the Linux kernel stack or the ns-3
stack, watched live with a host player or in a window drawn from inside
the simulation; as a test, the received streams must be identical to the
sent ones. utils/build_kernel_deps.sh builds the DCE version of ffmpeg.
- x11-hello, gtk4-hello and dce-x11-hello: X11 and GTK4 clients built for
DCE draw their windows on the host display.
- dce-browser: a web browser on a Wi-Fi station browses a site served by
thttpd on another station, or the Internet through a host tap device
(utils/dce-tap-setup.sh): Dillo and Northstar (GTK4, JavaScript, sound)
built for DCE by utils/build_kernel_deps.sh, or unmodified prebuilt
Chromium and Brave, which play YouTube with sound. The Wi-Fi capture and
the browser's TLS key log let Wireshark decrypt the traffic. See
doc/source/dce-x11.rst.
- build-and-run.sh builds everything in a container and runs the demos.

New DCE features
----------------
- Host socket passthrough: the DceHostUnixSocketPaths global value lists
AF_UNIX path prefixes for which connect() reaches a real host socket.
DceX11Helper uses it for the host's X server, D-Bus session bus and
PulseAudio server.
- eventfd(2), epoll(7), pipe2(2), futex(2) (through syscall(2)), SOCK_SEQPACKET,
connected socketpair(), descriptor passing (SCM_RIGHTS), FIONREAD/FIONBIO,
memfd_create, shm_open, gettid, /proc/self/exe, and several hundred more
libc entry points for ffmpeg, the X11 libraries, GLib/GIO/GTK4, Dillo,
Northstar and Chromium.
- Programs built as executables (PIE), such as a prebuilt Chromium, run
unmodified: main() is found from the entry point, their thread local
variables get their own room (DCE_RESERVE_EXECUTABLE_TLS), their own
allocator is used by their libraries, and their references to old glibc
symbol versions bind to DCE.
- TaskManager::PerFiberTls gives every task thread local storage of its
own (UcontextFiberManager, x86_64).
- A program which crashes (SIGSEGV, SIGBUS, SIGILL, SIGFPE) ends its
process, as the kernel would, instead of the simulation.
- DcePcapCheck reads ns-3 captures back (802.11 with A-MPDU, Ethernet, raw
IP) for examples that check their traffic.
- Performance: libc functions are forwarded with a tail jump, the heap no
longer walks all its chunks, mutexes and condition variables are found
by id, and a zero-timeout poll() or epoll_wait() lets the simulated clock
catch up with the wall clock instead of spinning.
- malloc() and friends return 16 byte aligned memory, like glibc.

Bugs fixed
----------
- LKL: the kernel's re-armed timer events piled up in the simulator's
queue (gigabytes per minute with a busy kernel), and frames larger than
1500 bytes were truncated (every full-size Wi-Fi TCP segment).
- pthread_cond_wait() could miss a wake-up, and a timed-out waiter could
take the wake-up of another thread: programs froze.
- socketpair() did not connect its two ends; shutdown() did not wake a
blocked reader; a write to a closed peer returned 0 instead of EPIPE; a
blocking read waited for the whole buffer; sendmsg()/recvmsg() mishandled
their control data and errors.
- fork() returned 0 in the parent with UcontextFiberManager; it now fails
with ENOSYS. PthreadFiberManager's switches aborted under _FORTIFY_SOURCE.
- openat() relative to a directory ran a shell; F_DUPFD_CLOEXEC returned a
host descriptor; dlerror() was the host's; SIG_DFL and SIG_IGN were
called as handlers; exit() ran thread specific data destructors.
- open64() passed garbage as the file creation mode; socket() with
SOCK_NONBLOCK/SOCK_CLOEXEC and setsockopt(SO_SNDBUF) on ns-3 UDP failed;
closing a pipe end whose peer was closed failed; realpath() leaked host
paths; the fortified __sprintf_chk() took the buffer size as the format
string, and wrote one character into a buffer of unknown size; a task
could be woken up after its process had exited.

Release dce-1.12
================
In order to use DCE, please use the bake tool to install DCE. DCE 1.12
Expand Down
14 changes: 6 additions & 8 deletions bindings/python/ns3modulegen_core_customizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,18 +449,16 @@ def add_ipv4_address_tp_hash(module):

def post_register_types(root_module):
remove_classes = [
# These are classes which get introduced when KERNEL_STACK is enabled , so should be removed for non-linux DCE builds
# The Linux stack (LKL) is not part of the Python bindings
'KernelSocketFdFactory',
'LinuxSocketImpl',
'KernelSocketFd',
'LinuxSocketFdFactory',
'FreeBSDSocketFdFactory'
]

if "KERNEL_STACK" not in os.environ:
for classname in remove_classes:
try:
root_module.classes.remove(root_module['ns3::%s' % classname])
except:
pass
for classname in remove_classes:
try:
root_module.classes.remove(root_module['ns3::%s' % classname])
except:
pass

3 changes: 0 additions & 3 deletions bindings/python/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,6 @@ def build(bld):
if not env['ENABLE_PYTHON_BINDINGS']:
return

if bld.env['KERNEL_STACK']:
os.environ['KERNEL_STACK'] = bld.env['KERNEL_STACK']


dce_generate_python_bindings(bld)

Expand Down
Loading