-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add epf2go example inspecting L3 IP header to acquire the protocol type.
Signed-off-by: David-VTUK <[email protected]> revert README.org to README.md to retain formatting Signed-off-by: David-VTUK <[email protected]> Resize diagram image Signed-off-by: David-VTUK <[email protected]>
- Loading branch information
1 parent
ed35685
commit 09ecce3
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Devcontainer Examples | ||
|
||
The following directory includes examples of [Visual Studio Code Devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) configurations for developing ebpf applications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM mcr.microsoft.com/devcontainers/go:1.23-bookworm | ||
|
||
RUN apt update | ||
|
||
RUN apt install -y build-essential | ||
RUN apt install -y pkg-config | ||
RUN apt install -y clang | ||
RUN apt install -y llvm | ||
RUN apt install -y git | ||
RUN apt install -y libelf-dev | ||
RUN apt install -y libpcap-dev | ||
RUN apt install -y iproute2 | ||
RUN apt install -y iputils-ping | ||
RUN apt install -y linux-headers-generic | ||
RUN apt install -y libbpf-dev | ||
RUN apt install -y linux-libc-dev | ||
RUN apt install -y cmake | ||
RUN apt install -y libpcap-dev | ||
RUN apt install -y libcap-ng-dev | ||
RUN apt install -y libbfd-dev | ||
RUN apt install -y gcc-multilib | ||
RUN apt install -y m4 | ||
RUN ln -sf /usr/include/asm-generic/ /usr/include/asm | ||
RUN apt install -y libcap-dev | ||
RUN ln -sf /usr/local/go/bin/go /bin/go | ||
RUN ln -sf /usr/include/asm-generic/ /usr/include/asm | ||
|
||
RUN mkdir /sources/ | ||
WORKDIR /sources/ | ||
RUN git clone --recurse-submodules https://github.com/libbpf/bpftool.git | ||
RUN make -C bpftool/src/ install | ||
RUN git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git | ||
RUN make -C xdp-tools/ install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "Go-ebpf-env", | ||
"build": {"dockerfile": "Dockerfile"}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.cpptools", | ||
"nicknickolaev.ebpf-assembly", | ||
"golang.Go" | ||
] | ||
} | ||
}, | ||
|
||
"runArgs": ["--network=host"], | ||
"privileged": true | ||
} |