Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1) Restructured the source code #56

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@
*.mod
*.mod.c
Module.symvers
modules.order
modules.order

# Ctags
tags

# VSCode
.vscode

48 changes: 39 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ ifneq (,$(findstring 1, $(RHEL8)))
RHEL8FLAG := -DRHEL8
endif

PWD := $(shell pwd)

CONFIG_MODULE_SIG=n
MODULE_NAME = gtp5g
MOD_KERNEL_PATH := kernel/drivers/net
Expand Down Expand Up @@ -36,13 +34,45 @@ MY_CFLAGS += -g -DDEBUG $(RHEL8FLAG)
EXTRA_CFLAGS += -Wno-misleading-indentation -Wuninitialized
CC += ${MY_CFLAGS}

obj-m := $(MODULE_NAME).o
gtp5g-y += main.o
gtp5g-y += api_version.o
gtp5g-y += log.o util.o
gtp5g-y += dev.o genl.o net.o link.o proc.o
gtp5g-y += gtp.o pktinfo.o hash.o seid.o encap.o
gtp5g-y += pdr.o far.o qer.o bar.o urr.o genl.o genl_pdr.o genl_far.o genl_qer.o genl_bar.o genl_urr.o genl_version.o genl_report.o
EXTRA_CFLAGS += -I $(PWD)/include

5G_MOD := src/gtp5g.o

5G_LOG := src/log.o

5G_UTIL := src/util.o

5G_GTPU := src/gtpu/dev.o \
src/gtpu/encap.o \
src/gtpu/gtp.o \
src/gtpu/hash.o \
src/gtpu/link.o \
src/gtpu/net.o \
src/gtpu/pktinfo.o

5G_GENL := src/genl/genl.o \
src/genl/genl_version.o \
src/genl/genl_pdr.o \
src/genl/genl_far.o \
src/genl/genl_qer.o \
src/genl/genl_urr.o \
src/genl/genl_report.o \
src/genl/genl_bar.o

5G_PFCP := src/pfcp/api_version.o \
src/pfcp/pdr.o \
src/pfcp/far.o \
src/pfcp/qer.o \
src/pfcp/urr.o \
src/pfcp/bar.o \
src/pfcp/seid.o

5G_PROC := src/proc.o

# Build files
obj-m += $(MODULE_NAME).o
$(MODULE_NAME)-objs := $(5G_MOD) $(5G_LOG) $(5G_UTIL) $(5G_GTPU) \
$(5G_GENL) $(5G_PFCP) $(5G_PROC)

default: module

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions proc.c → src/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ int create_proc(void)

void remove_proc()
{
remove_proc_entry("urr", proc_gtp5g);
remove_proc_entry("qer", proc_gtp5g);
remove_proc_entry("far", proc_gtp5g);
remove_proc_entry("pdr", proc_gtp5g);
Expand Down
File renamed without changes.