Compare commits
14 Commits
Author | SHA1 | Date |
---|---|---|
Jack Yu | 4e3942eb31 | |
Jack Yu | 24096b896d | |
Jack Yu | 86a52a6f52 | |
Jack Yu | c1b65d744e | |
Jack Yu | 8f1a608c66 | |
Jack Yu | 37c4bad792 | |
Jack Yu | 7300236791 | |
Jack Yu | 8943eceb93 | |
Jack Yu | cdd99b3280 | |
Jack Yu | 8b4c305300 | |
Jack Yu | 27b7683be9 | |
Jack Yu | 424d294997 | |
Jack Yu | d10e3c1b73 | |
Jack Yu | fee3beac4f |
|
@ -1,5 +1,2 @@
|
||||||
*.tar.gz
|
|
||||||
*.sif
|
*.sif
|
||||||
.docker_build
|
|
||||||
overlay/
|
overlay/
|
||||||
shared/
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- epan.h.old 2024-04-20 00:34:15.534364916 -0700
|
--- a/epan/epan.h 2024-04-20 00:34:15.534364916 -0700
|
||||||
+++ epan.h 2024-04-20 00:34:25.094467480 -0700
|
+++ b/epan/epan.h 2024-04-20 00:34:25.094467480 -0700
|
||||||
@@ -10,9 +10,6 @@
|
@@ -10,9 +10,6 @@
|
||||||
#ifndef __EPAN_H__
|
#ifndef __EPAN_H__
|
||||||
#define __EPAN_H__
|
#define __EPAN_H__
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
|
||||||
|
index fd478d8969..b3b89250e0 100644
|
||||||
|
--- a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
|
||||||
|
+++ b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf
|
||||||
|
@@ -145,7 +145,7 @@ PH-TypeListMCG
|
||||||
|
PH-TypeListSCG
|
||||||
|
RA-ReportList-r16
|
||||||
|
RACH-ConfigCommon
|
||||||
|
-RadioBearerConfig
|
||||||
|
+RadioBearerConfig @radio_bearer_conf
|
||||||
|
ReferenceTime-r16
|
||||||
|
RRCReconfiguration @rrc_reconf
|
||||||
|
RRCReconfigurationComplete
|
||||||
|
diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c
|
||||||
|
index 75977474c0..cfa8602711 100644
|
||||||
|
--- a/epan/dissectors/packet-nr-rrc.c
|
||||||
|
+++ b/epan/dissectors/packet-nr-rrc.c
|
||||||
|
@@ -112214,6 +112214,7 @@ proto_register_nr_rrc(void) {
|
||||||
|
register_dissector("nr-rrc.ue_nr_cap", dissect_nr_rrc_UE_NR_Capability_PDU, proto_nr_rrc);
|
||||||
|
register_dissector("nr-rrc.sbcch.sl.bch", dissect_SBCCH_SL_BCH_Message_PDU, proto_nr_rrc);
|
||||||
|
register_dissector("nr-rrc.scch", dissect_SCCH_Message_PDU, proto_nr_rrc);
|
||||||
|
+ register_dissector("nr-rrc.radio_bearer_conf", dissect_nr_rrc_RadioBearerConfig_PDU, proto_nr_rrc);
|
||||||
|
|
||||||
|
|
||||||
|
/*--- End of included file: packet-nr-rrc-dis-reg.c ---*/
|
97
Dockerfile
97
Dockerfile
|
@ -1,97 +0,0 @@
|
||||||
FROM ubuntu:22.04
|
|
||||||
|
|
||||||
ARG MAX_THREADS=1
|
|
||||||
ARG WS_VER=3.4.0
|
|
||||||
ARG MI_BRANCH=ubuntu22-py310
|
|
||||||
ARG WIRESHARK_URL=http://www.mobileinsight.net/wireshark-${WS_VER}-rbc-dissector.tar.xz
|
|
||||||
ADD 00-cpp_compat.patch /build/00-cpp_compat.patch
|
|
||||||
|
|
||||||
# Run apt update
|
|
||||||
RUN set -ex; \
|
|
||||||
export DEBIAN_FRONTEND=noninteractive; \
|
|
||||||
apt-get update; \
|
|
||||||
apt-get upgrade -y; \
|
|
||||||
apt-get install -y \
|
|
||||||
git \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
python3-wxgtk4.0 \
|
|
||||||
python3-matplotlib \
|
|
||||||
cmake \
|
|
||||||
pkg-config \
|
|
||||||
wget \
|
|
||||||
libglib2.0-dev \
|
|
||||||
bison \
|
|
||||||
flex \
|
|
||||||
libpcap-dev \
|
|
||||||
libgcrypt-dev \
|
|
||||||
qtbase5-dev \
|
|
||||||
qtchooser \
|
|
||||||
qt5-qmake \
|
|
||||||
qtbase5-dev-tools \
|
|
||||||
qttools5-dev \
|
|
||||||
qtmultimedia5-dev \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
libc-ares-dev \
|
|
||||||
libsdl2-mixer-2.0-0 \
|
|
||||||
libsdl2-image-2.0-0 \
|
|
||||||
libsdl2-2.0-0;
|
|
||||||
|
|
||||||
# Download resources
|
|
||||||
RUN set -ex; \
|
|
||||||
mkdir -p /build; \
|
|
||||||
cd /build; \
|
|
||||||
wget "$WIRESHARK_URL" -nv -O "wireshark-$WS_VER.tar.xz"; \
|
|
||||||
tar -xf "wireshark-$WS_VER.tar.xz"; \
|
|
||||||
git clone "https://github.com/mobile-insight/mobileinsight-core.git"; \
|
|
||||||
git -C mobileinsight-core checkout "$MI_BRANCH";
|
|
||||||
|
|
||||||
# Compile and install wireshark
|
|
||||||
RUN set -ex; \
|
|
||||||
cd "/build/wireshark-$WS_VER"; \
|
|
||||||
patch epan/epan.h < /build/00-cpp_compat.patch; \
|
|
||||||
cmake -DBUILD_wireshark=OFF .; \
|
|
||||||
make -j "$MAX_THREADS"; \
|
|
||||||
make install; \
|
|
||||||
ldconfig;
|
|
||||||
|
|
||||||
# Compile and install Wireshark dissector
|
|
||||||
Run set -ex; \
|
|
||||||
cd /build/mobileinsight-core/ws_dissector; \
|
|
||||||
g++ ws_dissector.cpp packet-aww.cpp -o ws_dissector \
|
|
||||||
$(pkg-config --libs --cflags glib-2.0) \
|
|
||||||
-I"/build/wireshark-$WS_VER" \
|
|
||||||
-L"/usr/local/lib" \
|
|
||||||
-lwireshark \
|
|
||||||
-lwsutil \
|
|
||||||
-lwiretap; \
|
|
||||||
strip ws_dissector; \
|
|
||||||
install -Dm 755 ws_dissector /usr/local/bin/ws_dissector;
|
|
||||||
|
|
||||||
# Compile and install MobileInsight
|
|
||||||
Run set -ex; \
|
|
||||||
cd /build/mobileinsight-core; \
|
|
||||||
pip3 install pyserial; \
|
|
||||||
python3 setup.py install;
|
|
||||||
|
|
||||||
# Install MobileInsight GUI
|
|
||||||
Run set -ex; \
|
|
||||||
cd /build/mobileinsight-core; \
|
|
||||||
mkdir -p /usr/local/share/mobileinsight; \
|
|
||||||
cp -r gui/* /usr/local/share/mobileinsight;\
|
|
||||||
ln -s /usr/local/share/mobileinsight/mi-gui /usr/local/bin/mi-gui;
|
|
||||||
|
|
||||||
# Install examples
|
|
||||||
Run set -ex; \
|
|
||||||
cd /build/mobileinsight-core; \
|
|
||||||
cp -r examples /opt/mobileinsight-examples;
|
|
||||||
|
|
||||||
# Link python3 to python
|
|
||||||
Run set -ex; \
|
|
||||||
cd /usr/bin; \
|
|
||||||
ln -s python3 python;
|
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
Run set -ex; \
|
|
||||||
apt-get autoclean -y; \
|
|
||||||
rm -rf /build;
|
|
44
Makefile
44
Makefile
|
@ -1,44 +1,30 @@
|
||||||
DOCKER ?= docker
|
APPTAINER ?= singularity
|
||||||
APPTAINER ?= apptainer
|
|
||||||
OVERLAY_DIR ?= ./overlay
|
OVERLAY_DIR ?= ./overlay
|
||||||
SHARED_DIR ?= ./shared
|
NUM_THREADS ?= $(shell grep -c processor /proc/cpuinfo)
|
||||||
MAX_THREADS ?= $(shell grep -c processor /proc/cpuinfo)
|
|
||||||
|
|
||||||
UID := $(shell id -u)
|
UID := $(shell id -u)
|
||||||
GID := $(shell id -g)
|
|
||||||
|
|
||||||
.DEFAULT_GOAL := .docker_build
|
.DEFAULT_GOAL := mobileinsight.sif
|
||||||
|
|
||||||
.docker_build: Dockerfile
|
mobileinsight.sif: mobileinsight.def
|
||||||
"$(DOCKER)" build --build-arg "MAX_THREADS=$(MAX_THREADS)" -t mobileinsight .
|
"$(APPTAINER)" build --build-arg="NUM_THREADS=$(NUM_THREADS)" "$@" "$<"
|
||||||
touch "$@"
|
|
||||||
|
|
||||||
mobileinsight.tar.gz: .docker_build
|
mobileinsight-spark.sif: with-spark.def mobileinsight.sif
|
||||||
"$(DOCKER)" save mobileinsight:latest | gzip > "$@"
|
|
||||||
|
|
||||||
mobileinsight.sif: mobileinsight.def .docker_build
|
|
||||||
"$(APPTAINER)" build "$@" "$<"
|
"$(APPTAINER)" build "$@" "$<"
|
||||||
|
|
||||||
run: .docker_build
|
prepare:
|
||||||
@mkdir -p "$(SHARED_DIR)"
|
|
||||||
@test -n "$(shell docker image ls -q mobileinsight)" \
|
|
||||||
|| (echo Cannot find image mobileinsight:latest, has it been built yet? 1>&2 \
|
|
||||||
&& false)
|
|
||||||
@"$(DOCKER)" run --rm -it --privileged -v "$(SHARED_DIR):/mnt" \
|
|
||||||
-e TERM -u root --entrypoint bash mobileinsight:latest
|
|
||||||
|
|
||||||
app-run: mobileinsight.sif
|
|
||||||
@mkdir -p "$(OVERLAY_DIR)"
|
@mkdir -p "$(OVERLAY_DIR)"
|
||||||
@lsmod | grep overlay > /dev/null || sudo modprobe overlay
|
@lsmod | grep overlay > /dev/null || sudo modprobe overlay
|
||||||
|
|
||||||
|
run: mobileinsight.sif prepare
|
||||||
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
||||||
-B "/run/user/$(UID)" mobileinsight.sif
|
-B "/run/user/$(UID)" mobileinsight.sif
|
||||||
|
|
||||||
|
run-spark: mobileinsight-spark.sif prepare
|
||||||
|
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
||||||
|
-B "/run/user/$(UID)" mobileinsight-spark.sif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
"$(DOCKER)" container prune
|
rm -rf *.sif $(OVERLAY_DIR)
|
||||||
"$(DOCKER)" image prune -a
|
|
||||||
rm -f .docker_build mobileinsight.tar.gz mobileinsight.sif
|
|
||||||
|
|
||||||
clean-data:
|
.PHONY: prepare run run-spark clean
|
||||||
rm -rf $(OVERLAY_DIR) $(SHARED_DIR)
|
|
||||||
|
|
||||||
.PHONY: sc-run run clean clean-data
|
|
||||||
|
|
33
README.md
33
README.md
|
@ -1,13 +1,21 @@
|
||||||
MobileInsight Apptainer
|
MobileInsight Apptainer
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
Single launch binary for MobileInsight in a Ubuntu 22.04 portable container.
|
Single launch binary for
|
||||||
|
[MobileInsight](https://github.com/mobile-insight/mobileinsight-core) in an
|
||||||
|
Ubuntu 22.04 SIF portable container.
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The host side only needs `apptainer` or `singularity` to function. A gui is
|
Either one of the following dependencies is needed to run or build SIF images:
|
||||||
needed to launch the log viewer.
|
|
||||||
|
- [Apptainer](https://apptainer.org/)
|
||||||
|
- [Singularity](https://sylabs.io/singularity/)
|
||||||
|
|
||||||
|
To use the `make run` command, the overlay Linux kernel module must also be
|
||||||
|
available on the system. This allows you to make changes to the SIF file using
|
||||||
|
an overlay filesystem.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
@ -21,17 +29,18 @@ $ ./mobileinsight.sif python3 "$PYTHON_ARGS"
|
||||||
|
|
||||||
# Start a bash shell inside the container
|
# Start a bash shell inside the container
|
||||||
$ ./mobileinsight.sif bash
|
$ ./mobileinsight.sif bash
|
||||||
|
|
||||||
|
# Only available in spark version
|
||||||
|
#
|
||||||
|
# Start a pyspark interpreter
|
||||||
|
$ ./mobileinsight-spark.sif pyspark
|
||||||
```
|
```
|
||||||
|
|
||||||
Examples are stored in /opt/mobileinsight-examples.
|
Examples are stored in /opt/mobileinsight-examples.
|
||||||
|
|
||||||
Building
|
Build
|
||||||
--------
|
-----
|
||||||
|
|
||||||
To build the apptainer, the following dependencies are needed on the host
|
Run `make mobileinsight.sif` or `make mobileinsight-spark.sif` to build the
|
||||||
machine:
|
corresponding apptainer image. The spark version includes both `mobileinsight`
|
||||||
|
along with `pyspark` for distributed log processing.
|
||||||
1. Apptainer or Singularity
|
|
||||||
2. Docker
|
|
||||||
|
|
||||||
Run `make mobileinsight.sif` to build the apptainer image.
|
|
||||||
|
|
|
@ -1,5 +1,94 @@
|
||||||
BootStrap: docker-daemon
|
BootStrap: docker
|
||||||
From: mobileinsight:latest
|
From: ubuntu:22.04
|
||||||
|
|
||||||
|
%arguments
|
||||||
|
NUM_THREADS=1
|
||||||
|
WS_VER=3.4.0
|
||||||
|
MI_COMMIT=4b204e0
|
||||||
|
|
||||||
|
%files
|
||||||
|
00-cpp_compat.patch /build/00-cpp_compat.patch
|
||||||
|
01-radio_bearer_config.patch /build/01-radio_bearer_config.patch
|
||||||
|
|
||||||
|
%post
|
||||||
|
# Update and install dependencies
|
||||||
|
mkdir -p /build
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade -y
|
||||||
|
apt-get install -y \
|
||||||
|
git \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
python3-wxgtk4.0 \
|
||||||
|
python3-matplotlib \
|
||||||
|
cmake \
|
||||||
|
pkg-config \
|
||||||
|
wget \
|
||||||
|
libglib2.0-dev \
|
||||||
|
bison \
|
||||||
|
flex \
|
||||||
|
libpcap-dev \
|
||||||
|
libgcrypt-dev \
|
||||||
|
qtbase5-dev \
|
||||||
|
qtchooser \
|
||||||
|
qt5-qmake \
|
||||||
|
qtbase5-dev-tools \
|
||||||
|
qttools5-dev \
|
||||||
|
qtmultimedia5-dev \
|
||||||
|
libqt5svg5-dev \
|
||||||
|
libc-ares-dev \
|
||||||
|
libsdl2-mixer-2.0-0 \
|
||||||
|
libsdl2-image-2.0-0 \
|
||||||
|
libsdl2-2.0-0
|
||||||
|
pip3 install pyserial
|
||||||
|
|
||||||
|
# Download resources
|
||||||
|
cd /build
|
||||||
|
wget "https://github.com/wireshark/wireshark/archive/refs/tags/v{{ WS_VER }}.tar.gz" \
|
||||||
|
-nv -O "wireshark-{{ WS_VER }}.tar.xz"
|
||||||
|
tar -xf "wireshark-{{ WS_VER }}.tar.xz"
|
||||||
|
git clone "https://github.com/mobile-insight/mobileinsight-core.git"
|
||||||
|
git -C mobileinsight-core checkout "{{ MI_COMMIT }}"
|
||||||
|
|
||||||
|
# Compile and install wireshark
|
||||||
|
cd "/build/wireshark-{{ WS_VER }}"
|
||||||
|
for patch in /build/*.patch; do
|
||||||
|
patch -p1 < "$patch"
|
||||||
|
done
|
||||||
|
cmake -DBUILD_wireshark=OFF .
|
||||||
|
make -j "{{ NUM_THREADS }}"
|
||||||
|
make install
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
# Compile and install Wireshark dissector
|
||||||
|
cd /build/mobileinsight-core/ws_dissector
|
||||||
|
g++ ws_dissector.cpp packet-aww.cpp -o ws_dissector \
|
||||||
|
$(pkg-config --libs --cflags glib-2.0) \
|
||||||
|
-I"/build/wireshark-{{ WS_VER }}" \
|
||||||
|
-L"/usr/local/lib" \
|
||||||
|
-lwireshark \
|
||||||
|
-lwsutil \
|
||||||
|
-lwiretap
|
||||||
|
strip ws_dissector
|
||||||
|
install -Dm 755 ws_dissector /usr/local/bin/ws_dissector
|
||||||
|
|
||||||
|
# Compile and install MobileInsight
|
||||||
|
cd /build/mobileinsight-core
|
||||||
|
python3 setup.py install
|
||||||
|
mkdir -p /usr/local/share/mobileinsight
|
||||||
|
cp -r gui/* /usr/local/share/mobileinsight
|
||||||
|
ln -s /usr/local/share/mobileinsight/mi-gui /usr/local/bin/mi-gui
|
||||||
|
cp -r examples /opt/mobileinsight-examples
|
||||||
|
|
||||||
|
# Link python3 to python
|
||||||
|
cd /usr/bin
|
||||||
|
ln -s python3 python
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
apt-get autoclean -y
|
||||||
|
rm -rf /build
|
||||||
|
|
||||||
%runscript
|
%runscript
|
||||||
set -e
|
set -e
|
||||||
|
@ -9,3 +98,4 @@ From: mobileinsight:latest
|
||||||
else
|
else
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
Bootstrap: localimage
|
||||||
|
From: mobileinsight.sif
|
||||||
|
|
||||||
|
%post
|
||||||
|
# Update and install dependencies
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade -y
|
||||||
|
apt-get install -y \
|
||||||
|
python3-pandas \
|
||||||
|
openjdk-8-jre-headless \
|
||||||
|
scala
|
||||||
|
pip3 install pyspark[sql]==3.5.1 dill==0.3.8
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
apt-get autoclean -y
|
Loading…
Reference in New Issue