210 Commits

Author SHA1 Message Date
Rakesh BB
e33ffd5e8c refactor: harmonize AS key BIT_STRING macro
Replace duplicated KENB_STAR_TO_BIT_STRING and
KGNB_STAR_TO_BIT_STRING macros with the unified
AS_KEY_STAR_TO_BIT_STRING helper across X2AP,
XNAP, M2AP, and M3AP code paths.

Also switch allocation to calloc_or_fail for
safer memory handling.

No functional change intended.

Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:35 +05:30
Robert Schmidt
8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00
Robert Schmidt
6ae4ec37ca Remove most doxygen file-level commands, copyrights, and authors
Remove the \file directive, as it is always superfluous  because the
current file is implicit [1]:

> If the file name is omitted (i.e. the line after \file is left blank)
> then the documentation block that contains the \file command will belong
> to the file it is located in.

Author names and e-mails are not relevant for us: it can always be
inferred from git blame, and is often outdated.

Eurecom code has been contributed and was under OAI PL v1.0/v1.1.

For the cpack package contact: put generic email address that is
independent of an individual and that will remain reachable.

[1] https://www.doxygen.nl/manual/commands.html#cmdfile
2026-03-27 14:52:47 +01:00
Laurent THOMAS
4a3ebb3033 remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag 2025-08-20 09:36:48 +02:00
Cedric Roux
7cbedb1575 time management module
This commit introduces a time management module.

See doc/time_management.md for details.
2025-04-18 09:02:54 +02:00
Robert Schmidt
05d393a399 Encapsulate cmake asn1c call, suppress useless output
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.

Use the new run_asn1c() in all occasions for code generation.

[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
2025-04-09 14:35:29 +00:00
francescomani
cea4412b3b do not include LTE defs_common into 5G code 2025-04-01 18:53:09 +02:00
Laurent THOMAS
279d49415f remove un-necessary global variables 2024-12-04 12:26:36 +01:00
Robert Schmidt
0a997ee08e Do not print all XnAP logs
NSA is quite verbose, some messages are large and it is not very
"interesting" for the average user. The logs can be enabled on demand,
or directly seen in Wireshark instead.
2024-07-16 11:24:57 +02:00
Robert Schmidt
dfa012162b Rewrite sctp_create_new_listener() to handle DNS, IPv6
Rewrite sctp_create_new_listener() to use getaddrinfo() to look up
IPv4/IPv6 addresses via a common interface. This allows to use e.g. DNS,
and enables the SCTP library to listen on IPv6 ports.

To support the above, the corresponding message is changed to not take
an IPv4 address on 4 bytes (and separate IPv6), but a single name that
will be resolved via getaddrinfo()

The previous init message used to allow multiple IPv4/IPv6 addresses;
since this is not used anywhere, remove the corresponding functionality.

Modify all uses of this ITTI message to copy te SCTP init bind addr into
ITTI message.
2024-04-13 05:15:11 +02:00
Laurent THOMAS
63b64d4fce move common code file in common directory
remove several unused files
remove mem_block_t that is never used in a different way than a simple heap buffer
move up IP address type and remove duplications of the same struct declaration
2023-12-19 10:37:10 +01:00
Laurent THOMAS
f50d5f5a9b make multiple config instead of one implicit global 2023-11-10 10:23:11 +01:00
Laurent THOMAS
bba9aac079 fix most of doxygen warnings and errors 2023-10-26 16:47:19 +02:00
Robert Schmidt
3f46a71157 SCTP assoc_id: Make it sctp_assoc_t, project-wide 2023-09-22 08:22:15 +02:00
Robert Schmidt
7ebdaf35c5 Remove cmake ENB_MODE option
ENB_MODE is a cmake option to swap the order of include directories.
This has historical reasons; before OAI used cmake, it was very
sensitive to the order of includes. Nowadays, the order does not matter.
Remove this option, and fix the compilation issues that arise while
doing so.
2023-07-07 08:35:28 +02:00
Robert Schmidt
fdb2abebd0 Add cmake option to select asn1c, and test asn1c parameters
CMake now takes the option ASN1C_EXEC to select an asn1c to use for
compilation. For instance, run with
cmake .. -GNinja -DASN1C_EXEC=/opt/asn1c/bin/asn1c
or
./build_oai --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c
to select the alternative asn1c. For instance, this is important for the
CI to allow to build multiple versions of OAI in parallel that might use
different commits of OAI.

Further, this patch introduces functionality to check for the support of
asn1c options that we require, and alerts the user if they are missing,
alongside a message of how to resolve the problem.
2023-06-02 10:42:02 +02:00
Cedric Roux
c0c3a737ed asn1c: use better version of asn1c
We don't work much on asn1c. The version we use has several bugs.
There is an active community out there that fixes bugs and improves
asn1c. Let's use their version.
2023-06-01 18:26:00 +02:00
Robert Schmidt
87c82e8a85 Don't send subframe process tick to RRC, to X2AP directly if necessary 2023-05-25 22:16:19 +02:00
laurent
b339460666 cleanup only 2023-04-28 16:25:24 +02:00
laurent
03d3e1a5db code review comments 2023-03-14 14:48:09 +01:00
laurent
474f662337 merge develop 2023-03-13 12:45:32 +01:00
laurent
a853a0873e free memory to reduce the memory leaks 2023-03-13 11:59:31 +01:00
francescomani
2385bc364a fixing most warning when compiling nr-softmodem 2023-03-09 19:01:46 +01:00
Robert Schmidt
8a15fb7c63 RC: forward declarations and link physims better
The simulators have been changed: due to linker errors that would arise
otherwise, a lot of functions are defined in them to avoid such errors.
Some functions are also defined in header files; in this commit, we
define most functoins in nr_dummy_functions.c, which is compiled in, not
by including the C file, but by adding it to the target in
CMakeLists.txt

- nr_dlsim+nr_ulsim need NR_IF_Module_init(), so it cannot be in
  nr_dummy_functions, but the others need it
- Link correcr NR_IF_Module_init() into these simulators, and reduce
  overall link list
- Correctly link remaining simulators
2023-03-06 20:04:38 +01:00
laurent
9a789dbb8a ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls, existing errors not detected by sanitize address 2023-01-11 09:59:39 +01:00
Robert Schmidt
cf6ff96b21 Generate and build X2AP ASN.1 during build time 2022-12-02 15:42:35 +01:00
laurent
eba7dc5c76 Print asn1c encoding logs using OAI logging system 2022-08-11 14:00:43 +02:00
Robert Schmidt
0b91791f67 Use (std) bool instead of custom bool types
OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as
there is a standard bool type, and could lead to nasty bugs if a
definition of a bool is non-standard (0 == false, true == !false). This
commit removes all non-standard bools in the whole project.
2022-06-27 10:07:48 +02:00
Laurent Thomas
85eb5926dd x2 nsa bug 2022-04-28 14:36:03 +02:00
francescomani
33663e68b0 rename frame_type 2022-04-19 18:37:14 +02:00
Robert Schmidt
f19ea82f8e Drop an sgNB release request if no SCTP endpoint available 2022-02-24 12:54:04 +01:00
Robert Schmidt
00e058537d Remove MSC library, it is not used anywhere 2022-01-27 10:53:07 +01:00
Melissa Elkadi
118bd8b36f Merge branch 'eurecom-develop' into eurecom-episys-merge-nsa 2021-12-06 13:23:21 -08:00
Melissa Elkadi
4f9c2bd869 Merge branch 'eurecom-develop' into eurecom-episys-merge-nsa 2021-11-29 14:33:23 -08:00
rmagueta
b26fc6e1d6 Fix build warning 2021-11-25 14:06:21 +00:00
Melissa Elkadi
70be674227 Code clean up part 2.
This commit continues to clean up the reminader
of the changed files in the merge req 1274.
The changes include log updates, comment removals,
etc.
2021-09-23 14:19:55 -07:00
Melissa Elkadi
9b16c1d860 Merge branch 'eurecom-develop' into episys/merge_nsa_w_develop
At this point we are successfully able to build.
Additionally, we can run the scenario,
however, it does not pass. It seems that the gNB
is not connecting to the proxy correctly. Just
wanted to push the progress so far. FYI, the items
that had to be changed to correct the linking issues
were the following:

 - mac_rrc_data_ind_ue vs. nr_mac_rrc_data_ind_ue
 - rrc_data_req vs. nr_rrc_data_req
 - mac_rrc_data_req_ue vs. nr_mac_rrc_data_req_ue
 - rrc_data_req_ue vs. rrc_data_req_nr_ue
 - rrc_data_req vs. nr_rrc_data_req

The listed functions should be declard in the LTE/NR
UE directory depending on the functionality. Several
were mixed. i.e.: LTE functions being called in NR UE.

Also, removing siWindowLength, siWindowLength_int,
SIBType, SIBPeriod, and siPeriod_int from the NR UE RRC.
These variable were not used in the NR UE and are defined
for LTE only.

Lastly, in the NR_IF_Module.c of the NR UE, the global
variable def_dci_pdu_rel15 is not accessible. Need to
revisit this. For not it is commented out.
2021-08-11 10:23:42 -07:00
Raymond Knopp
72751870cf Merge remote-tracking branch 'origin/develop' into develop-aw2sori 2021-07-14 12:02:29 +02:00
Raymond Knopp
0aaee3f031 added X2 Reset procedure (partially). Still to be added to top-level when gNB or eNB are stopped or crash (Assert) 2021-07-14 12:01:09 +02:00
Laurent THOMAS
ee0e7c97a3 merge develop 2021-07-02 12:22:42 +02:00
matzakos
5bce383cc9 Remove X2 data RB tree entry at eNB after receiving sctp shutdown event from gNB
-If the gNB crashes when the X2 connection is established with the eNB, an sctp shutdown event is received from the eNB. However the x2 data related with
the connection were not removed from the RB tree. Then if the gNB tried to reconnect, it made the eNB exit because the eNB had kept the previous data.
Now we remove the x2 data as soon as the sctp shutdown event is received so that the eNB does not exit anymore at the next connection attempts.
2021-06-16 22:44:02 +02:00
Melissa Elkadi
bfa5d486e3 Added comments to show MRDC and free() hacks 2021-05-13 13:45:47 -07:00
Melissa Elkadi
bc5677f4c4 Triggering works, not using OAI mechanism
gNB is crashing when setting up the tunnel interface
between the NR UE and itself.
2021-05-13 09:30:30 -07:00
Cedric Roux
c63abcd0f2 nsa: x2ap: hack: exit gNB if connection to eNB failed
Exit gNB if connection to eNB failed - to be modified if needed.

We may want to try to connect over and over again until we succeed
but the modifications to the code to get this behavior are complex.

Exit on error is a simple solution.
2021-04-16 12:36:44 +02:00
Cedric Roux
6c6b46985b x2: exit if connection between eNB and gNB breaks
Before this commit, when the gNB crashes, the eNB keeps running.
Same, if the eNB crashes, the gNB keeps running.

In a far past when this happened, the other program (the one not
crashing) was forced to exit.

Then this behavior was changed, for some reason.
But the code was not finished, so now we have a system in an inconsistent
state.

So either we accept that the connection between eNB and gNB can break,
that is one of the programs crashes, and we clean the state of the
program that keeps running. But this is a complex work and it will
surely not survive very long, because someone will change something
in the code later that will break this complex behavior.

Or, simpler, we go back to initial behavior, which is: the program that
did not crash does actually exit when the other crashes.

This commit provides the second solution.

It can easily be reverted whenever someone wants to implement the complex
solution.
2021-03-31 16:39:30 +02:00
Thomas Schlichter
b7ef903cb4 Merge remote-tracking branch 'develop' into NR_10MHz 2021-03-16 16:13:17 +01:00
masayuki.harada
ff994453a4 Merge remote-tracking branch 'remotes/oai/develop' into HEAD
# Conflicts:
#	openair3/S1AP/s1ap_eNB.c
#	openair3/S1AP/s1ap_eNB_handlers.c
2021-03-08 14:51:11 +09:00
francescomani
eef684d91a adding 24 PRB to X2AP function 2021-02-15 16:25:30 +01:00
Cedric Roux
94dad700c4 lte/nr x2ap: fix content of SgNBAdditionRequest
Wireshark (version 3.3.2) was not happy.
https://asn1.io/asn1playground/ was not happy.

Let's make them happy.

So then everyone is happy.
2021-02-01 11:48:44 +01:00
masayuki.harada
27413fc4fc Fix merge miss. 2021-01-06 20:13:02 +09:00