Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
b416061f
Commit
b416061f
authored
Apr 15, 2022
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup request and response messages
parent
faca4b97
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
340 additions
and
9 deletions
+340
-9
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+222
-9
openair2/E1AP/e1ap_common.c
openair2/E1AP/e1ap_common.c
+68
-0
openair2/E1AP/e1ap_common.h
openair2/E1AP/e1ap_common.h
+50
-0
No files found.
openair2/E1AP/e1ap.c
View file @
b416061f
This diff is collapsed.
Click to expand it.
openair2/E1AP/e1ap_common.c
0 → 100644
View file @
b416061f
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <time.h>
#include <stdlib.h>
#include "e1ap_common.h"
static
e1ap_upcp_inst_t
*
e1_cp_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
static
e1ap_upcp_inst_t
*
e1_up_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
e1ap_upcp_inst_t
*
getCxt
(
E1_t
type
,
instance_t
instance
)
{
AssertFatal
(
instance
<
sizeofArray
(
e1_cp_inst
),
"instance exceeds limit
\n
"
);
return
type
?
e1_up_inst
[
instance
]
:
e1_cp_inst
[
instance
];
}
E1AP_TransactionID_t
transacID
[
MAX_NUM_TRANSAC_IDS
]
=
{
0
};
srand
(
time
(
NULL
));
bool
check_transac_id
(
E1AP_TransactionID_t
id
,
int
*
freeIdx
)
{
bool
isFreeIdxSet
=
false
;
for
(
int
i
=
0
;
i
<
MAX_NUM_TRANSAC_IDS
;
i
++
)
{
if
(
id
==
transacID
[
i
])
return
false
;
else
if
(
!
isFreeIdxSet
&&
(
transacID
[
i
]
==
0
))
{
*
freeIdx
=
i
;
isFreeIdxSet
=
true
;
}
}
return
true
;
}
E1AP_TransactionID_t
E1AP_get_next_transaction_identifier
()
{
E1AP_TransactionID_t
genTransacId
;
bool
isTransacIdValid
=
false
;
int
freeIdx
;
while
(
!
isTransacIdValid
)
{
genTransacId
=
rand
();
isTransacIdValid
=
check_transac_Id
(
genTransacId
,
&
freeIdx
);
}
AssertFatal
(
freeIdx
<
MAX_NUM_TRANSAC_IDS
,
"Free Index exceeds array length
\n
"
);
transacID
[
freeIdx
]
=
genTransacId
;
return
genTransacId
;
}
openair2/E1AP/e1ap_common.h
0 → 100644
View file @
b416061f
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "E1AP_TransactionID.h"
#define MAX_NUM_TRANSAC_IDS 8
#define E1AP_MAX_NUM_PLMNS
typedef
struct
PLMN_ID_s
{
int
id
;
}
PLMN_ID_t
;
typedef
struct
e1ap_setup_req_s
{
uint64_t
gNB_cu_up_id
;
char
*
gNB_cu_up_name
;
uint64_t
transac_id
;
uint64_t
cn_support
;
int
supported_plmns
;
PLMN_ID_t
plmns
[
E1AP_MAX_NUM_PLMNS
];
}
e1ap_setup_req_t
;
typedef
struct
e1ap_upcp_inst_s
{
e1ap_setup_req_t
setupReq
;
uint32_t
assoc_id
;
}
e1ap_upcp_inst_t
;
typedef
enum
{
CPtype
=
0
,
UPtype
}
E1_t
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment