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
spbro
OpenXG-RAN
Commits
875bdaf2
Commit
875bdaf2
authored
Jan 24, 2019
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cppcheck fixes (2)
parent
227a0640
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6514 additions
and
6415 deletions
+6514
-6415
openair2/LAYER2/openair2_proc.c
openair2/LAYER2/openair2_proc.c
+550
-550
openair3/NAS/UE/API/USER/at_response.c
openair3/NAS/UE/API/USER/at_response.c
+534
-531
openair3/NAS/UE/ESM/PdnConnectivity.c
openair3/NAS/UE/ESM/PdnConnectivity.c
+507
-507
openair3/S1AP/s1ap_common.h
openair3/S1AP/s1ap_common.h
+8
-5
openair3/S1AP/s1ap_eNB_handlers.c
openair3/S1AP/s1ap_eNB_handlers.c
+1188
-1112
openair3/S1AP/s1ap_eNB_nas_procedures.c
openair3/S1AP/s1ap_eNB_nas_procedures.c
+1390
-1378
openair3/S1AP/s1ap_eNB_overload.c
openair3/S1AP/s1ap_eNB_overload.c
+46
-46
openair3/S1AP/s1ap_eNB_trace.c
openair3/S1AP/s1ap_eNB_trace.c
+91
-90
openair3/SCTP/sctp_eNB_task.c
openair3/SCTP/sctp_eNB_task.c
+858
-855
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
+992
-991
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+350
-350
No files found.
openair2/LAYER2/openair2_proc.c
View file @
875bdaf2
This diff is collapsed.
Click to expand it.
openair3/NAS/UE/API/USER/at_response.c
View file @
875bdaf2
...
@@ -574,7 +574,7 @@ static int _at_response_encode_cnum(char* buffer, const at_response_t* data)
...
@@ -574,7 +574,7 @@ static int _at_response_encode_cnum(char* buffer, const at_response_t* data)
}
}
offset
+=
sprintf
(
buffer
+
offset
,
"+CNUM: ,%s,%u
\r\n
"
,
offset
+=
sprintf
(
buffer
+
offset
,
"+CNUM: ,%s,%u
\r\n
"
,
cnum
->
number
,
cnum
->
type
);
cnum
->
number
,
(
unsigned
int
)
cnum
->
type
);
}
}
LOG_FUNC_RETURN
(
offset
);
LOG_FUNC_RETURN
(
offset
);
...
@@ -939,7 +939,7 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
...
@@ -939,7 +939,7 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
/* Display the list of defined PDN contexts */
/* Display the list of defined PDN contexts */
for
(
i
=
0
;
i
<
cgdcont
->
n_pdns
;
i
++
)
{
for
(
i
=
0
;
i
<
cgdcont
->
n_pdns
;
i
++
)
{
offset
+=
sprintf
(
buffer
+
offset
,
"+CGDCONT: %u"
,
cgdcont
->
cid
[
i
]);
offset
+=
sprintf
(
buffer
+
offset
,
"+CGDCONT: %u"
,
(
unsigned
int
)
cgdcont
->
cid
[
i
]);
if
(
cgdcont
->
PDP_type
[
i
]
==
NET_PDN_TYPE_IPV4
)
{
if
(
cgdcont
->
PDP_type
[
i
]
==
NET_PDN_TYPE_IPV4
)
{
offset
+=
sprintf
(
buffer
+
offset
,
",IP"
);
offset
+=
sprintf
(
buffer
+
offset
,
",IP"
);
...
@@ -952,7 +952,7 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
...
@@ -952,7 +952,7 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
offset
+=
sprintf
(
buffer
+
offset
,
",%s"
,
cgdcont
->
APN
[
i
]);
offset
+=
sprintf
(
buffer
+
offset
,
",%s"
,
cgdcont
->
APN
[
i
]);
/* No data/header compression */
/* No data/header compression */
offset
+=
sprintf
(
buffer
+
offset
,
",%u,%u
\r\n
"
,
offset
+=
sprintf
(
buffer
+
offset
,
",%u,%u
\r\n
"
,
AT_CGDCONT_D_COMP_OFF
,
AT_CGDCONT_H_COMP_OFF
);
(
unsigned
int
)(
AT_CGDCONT_D_COMP_OFF
),
(
unsigned
int
)(
AT_CGDCONT_H_COMP_OFF
)
);
}
}
}
else
if
(
data
->
type
==
AT_COMMAND_TST
)
{
}
else
if
(
data
->
type
==
AT_COMMAND_TST
)
{
const
at_cgdcont_tst_t
*
cgdcont
=
&
(
data
->
response
.
cgdcont
.
tst
);
const
at_cgdcont_tst_t
*
cgdcont
=
&
(
data
->
response
.
cgdcont
.
tst
);
...
@@ -963,19 +963,19 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
...
@@ -963,19 +963,19 @@ static int _at_response_encode_cgdcont(char* buffer, const at_response_t* data)
/* IPv4 PDN type */
/* IPv4 PDN type */
offset
+=
sprintf
(
buffer
+
offset
,
"+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%u),IP,,,(%u-%u),(%u-%u
)"
,
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%d),IP,,,(%d-%d),(%d-%d
)"
,
cgdcont
->
n_cid
,
cgdcont
->
n_cid
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
/* IPv6 PDN type */
/* IPv6 PDN type */
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%u),IPV6,,,(%u-%u),(%u-%u
)"
,
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%d),IPV6,,,(%d-%d),(%d-%d
)"
,
cgdcont
->
n_cid
,
cgdcont
->
n_cid
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
/* IPv4v6 PDN type */
/* IPv4v6 PDN type */
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
+CGDCONT: "
);
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%u),IPV4V6,,,(%u-%u),(%u-%u
)"
,
offset
+=
sprintf
(
buffer
+
offset
,
"(1-%d),IPV4V6,,,(%d-%d),(%d-%d
)"
,
cgdcont
->
n_cid
,
cgdcont
->
n_cid
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_D_COMP_MIN
,
AT_CGDCONT_D_COMP_MAX
,
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
AT_CGDCONT_H_COMP_MIN
,
AT_CGDCONT_H_COMP_MAX
);
...
@@ -1018,7 +1018,7 @@ static int _at_response_encode_cgact(char* buffer, const at_response_t* data)
...
@@ -1018,7 +1018,7 @@ static int _at_response_encode_cgact(char* buffer, const at_response_t* data)
/* Display the list of defined PDN status */
/* Display the list of defined PDN status */
for
(
i
=
0
;
i
<
cgact
->
n_pdns
;
i
++
)
{
for
(
i
=
0
;
i
<
cgact
->
n_pdns
;
i
++
)
{
offset
+=
sprintf
(
buffer
+
offset
,
"+CGACT: %u,%u
\r\n
"
,
offset
+=
sprintf
(
buffer
+
offset
,
"+CGACT: %u,%u
\r\n
"
,
cgact
->
cid
[
i
],
cgact
->
state
[
i
]);
(
unsigned
int
)
cgact
->
cid
[
i
],
(
unsigned
int
)
cgact
->
state
[
i
]);
}
}
}
else
if
(
data
->
type
==
AT_COMMAND_TST
)
{
}
else
if
(
data
->
type
==
AT_COMMAND_TST
)
{
if
(
at_response_format_v1
)
{
if
(
at_response_format_v1
)
{
...
@@ -1063,33 +1063,36 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data)
...
@@ -1063,33 +1063,36 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data)
/* Display the list of IP addresses assigned to each defined PDN
/* Display the list of IP addresses assigned to each defined PDN
* connections */
* connections */
for
(
i
=
0
;
i
<
cgpaddr
->
n_pdns
;
i
++
)
{
for
(
i
=
0
;
i
<
cgpaddr
->
n_pdns
;
i
++
)
{
offset
+=
sprintf
(
buffer
+
offset
,
"+CGPADDR: %u"
,
cgpaddr
->
cid
[
i
]);
offset
+=
sprintf
(
buffer
+
offset
,
"+CGPADDR: %u"
,
(
unsigned
int
)
cgpaddr
->
cid
[
i
]);
if
(
cgpaddr
->
PDP_addr_1
[
i
]
!=
NULL
)
{
if
(
cgpaddr
->
PDP_addr_1
[
i
]
!=
NULL
)
{
/* IPv4 address */
/* IPv4 address */
offset
+=
sprintf
(
buffer
+
offset
,
",%hhu.%hhu.%hhu.%hhu"
,
offset
+=
sprintf
(
buffer
+
offset
,
",%hhu.%hhu.%hhu.%hhu"
,
cgpaddr
->
PDP_addr_1
[
i
][
0
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_1
[
i
][
0
],
cgpaddr
->
PDP_addr_1
[
i
][
1
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_1
[
i
][
1
],
cgpaddr
->
PDP_addr_1
[
i
][
2
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_1
[
i
][
2
],
cgpaddr
->
PDP_addr_1
[
i
][
3
]);
(
unsigned
int
)
cgpaddr
->
PDP_addr_1
[
i
][
3
]);
}
}
if
(
cgpaddr
->
PDP_addr_2
[
i
]
!=
NULL
)
{
if
(
cgpaddr
->
PDP_addr_2
[
i
]
!=
NULL
)
{
/* IPv6 Link-local address prefixe */
/* IPv6 Link-local address prefixe */
offset
+=
sprintf
(
buffer
+
offset
,
offset
+=
sprintf
(
buffer
+
offset
,
",%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu"
,
",%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu"
,
0xfe
,
0x80
,
0
,
0
,
0
,
0
,
0
,
0
);
(
unsigned
int
)
0xfe
,
(
unsigned
int
)
0x80
,
(
unsigned
int
)
0
,
(
unsigned
int
)
0
,
(
unsigned
int
)
0
,
(
unsigned
int
)
0
,
(
unsigned
int
)
0
,
(
unsigned
int
)
0
);
/* IPv6 Link-local address */
/* IPv6 Link-local address */
offset
+=
sprintf
(
buffer
+
offset
,
offset
+=
sprintf
(
buffer
+
offset
,
".%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu"
,
".%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu"
,
cgpaddr
->
PDP_addr_2
[
i
][
0
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
0
],
cgpaddr
->
PDP_addr_2
[
i
][
1
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
1
],
cgpaddr
->
PDP_addr_2
[
i
][
2
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
2
],
cgpaddr
->
PDP_addr_2
[
i
][
3
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
3
],
cgpaddr
->
PDP_addr_2
[
i
][
4
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
4
],
cgpaddr
->
PDP_addr_2
[
i
][
5
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
5
],
cgpaddr
->
PDP_addr_2
[
i
][
6
],
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
6
],
cgpaddr
->
PDP_addr_2
[
i
][
7
]);
(
unsigned
int
)
cgpaddr
->
PDP_addr_2
[
i
][
7
]);
}
}
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
"
);
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
"
);
...
@@ -1101,10 +1104,10 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data)
...
@@ -1101,10 +1104,10 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data)
offset
+=
sprintf
(
buffer
,
"
\r\n
"
);
offset
+=
sprintf
(
buffer
,
"
\r\n
"
);
}
}
offset
+=
sprintf
(
buffer
+
offset
,
"+CGPADDR: %u"
,
cgpaddr
->
cid
[
0
]);
offset
+=
sprintf
(
buffer
+
offset
,
"+CGPADDR: %u"
,
(
unsigned
int
)
cgpaddr
->
cid
[
0
]);
for
(
i
=
1
;
i
<
cgpaddr
->
n_pdns
;
i
++
)
{
for
(
i
=
1
;
i
<
cgpaddr
->
n_pdns
;
i
++
)
{
offset
+=
sprintf
(
buffer
+
offset
,
",%u"
,
cgpaddr
->
cid
[
i
]);
offset
+=
sprintf
(
buffer
+
offset
,
",%u"
,
(
unsigned
int
)
cgpaddr
->
cid
[
i
]);
}
}
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
"
);
offset
+=
sprintf
(
buffer
+
offset
,
"
\r\n
"
);
...
@@ -1179,7 +1182,7 @@ static int _at_response_encode_cgev(char* buffer, const at_response_t* data)
...
@@ -1179,7 +1182,7 @@ static int _at_response_encode_cgev(char* buffer, const at_response_t* data)
if
(
data
->
type
==
AT_COMMAND_GET
)
{
if
(
data
->
type
==
AT_COMMAND_GET
)
{
const
at_cgev_resp_t
*
cgev
=
&
(
data
->
response
.
cgev
);
const
at_cgev_resp_t
*
cgev
=
&
(
data
->
response
.
cgev
);
offset
+=
sprintf
(
buffer
+
offset
,
"+CGEV: %s %u
\r\n
"
,
offset
+=
sprintf
(
buffer
+
offset
,
"+CGEV: %s %u
\r\n
"
,
_at_response_event_str
[
cgev
->
code
],
cgev
->
cid
);
_at_response_event_str
[
cgev
->
code
],
(
unsigned
int
)
cgev
->
cid
);
}
}
LOG_FUNC_RETURN
(
offset
);
LOG_FUNC_RETURN
(
offset
);
...
...
openair3/NAS/UE/ESM/PdnConnectivity.c
View file @
875bdaf2
...
@@ -181,7 +181,7 @@ int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int is_to_define,
...
@@ -181,7 +181,7 @@ int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int is_to_define,
LOG_TRACE
(
INFO
,
"ESM-PROC - Define new %s PDN connection to APN %s (cid=%d)"
,
LOG_TRACE
(
INFO
,
"ESM-PROC - Define new %s PDN connection to APN %s (cid=%d)"
,
(
pdn_type
==
ESM_PDN_TYPE_IPV4
)
?
"IPv4"
:
(
pdn_type
==
ESM_PDN_TYPE_IPV4
)
?
"IPv4"
:
(
pdn_type
==
ESM_PDN_TYPE_IPV6
)
?
"IPv6"
:
"IPv4v6"
,
(
pdn_type
==
ESM_PDN_TYPE_IPV6
)
?
"IPv6"
:
"IPv4v6"
,
apn
->
value
,
cid
);
(
apn
!=
NULL
)
?
apn
->
value
:
0
,
cid
);
if
(
is_emergency
&&
esm_data
->
emergency
)
{
if
(
is_emergency
&&
esm_data
->
emergency
)
{
/* The UE shall not request additional PDN connection for
/* The UE shall not request additional PDN connection for
...
...
openair3/S1AP/s1ap_common.h
View file @
875bdaf2
...
@@ -90,6 +90,7 @@ extern int asn1_xer_print;
...
@@ -90,6 +90,7 @@ extern int asn1_xer_print;
# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0)
# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0)
#endif
#endif
#define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
#define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\
do {\
IE_TYPE **ptr; \
IE_TYPE **ptr; \
...
@@ -102,9 +103,11 @@ extern int asn1_xer_print;
...
@@ -102,9 +103,11 @@ extern int asn1_xer_print;
break; \
break; \
} \
} \
} \
} \
if (mandatory) DevAssert(ie != NULL); \
if (ie == NULL ) { \
S1AP_ERROR("S1AP_FIND_PROTOCOLIE_BY_ID: %s %d: ie is NULL\n",__FILE__,__LINE__);\
if (mandatory) _Assert_Exit_ \
} \
} while(0)
} while(0)
/** \brief Function callback prototype.
/** \brief Function callback prototype.
**/
**/
typedef
int
(
*
s1ap_message_decoded_callback
)(
typedef
int
(
*
s1ap_message_decoded_callback
)(
...
...
openair3/S1AP/s1ap_eNB_handlers.c
View file @
875bdaf2
This diff is collapsed.
Click to expand it.
openair3/S1AP/s1ap_eNB_nas_procedures.c
View file @
875bdaf2
...
@@ -177,7 +177,7 @@ int s1ap_eNB_handle_nas_first_req(
...
@@ -177,7 +177,7 @@ int s1ap_eNB_handle_nas_first_req(
if
((
collision_p
=
RB_INSERT
(
s1ap_ue_map
,
&
instance_p
->
s1ap_ue_head
,
ue_desc_p
))
if
((
collision_p
=
RB_INSERT
(
s1ap_ue_map
,
&
instance_p
->
s1ap_ue_head
,
ue_desc_p
))
==
NULL
)
{
==
NULL
)
{
S1AP_DEBUG
(
"Found usable eNB_ue_s1ap_id: 0x%06x %d
(10)
\n
"
,
S1AP_DEBUG
(
"Found usable eNB_ue_s1ap_id: 0x%06x %u
(10)
\n
"
,
ue_desc_p
->
eNB_ue_s1ap_id
,
ue_desc_p
->
eNB_ue_s1ap_id
,
ue_desc_p
->
eNB_ue_s1ap_id
);
ue_desc_p
->
eNB_ue_s1ap_id
);
/* Break the loop as the id is not already used by another UE */
/* Break the loop as the id is not already used by another UE */
...
@@ -501,11 +501,18 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
...
@@ -501,11 +501,18 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
DownlinkNASTransport
;
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
DownlinkNASTransport
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
if
(
ie
==
NULL
)
{
/* checked by macro, but cppcheck doesn't see it */
return
-
1
;
}
else
{
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
true
);
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
true
);
if
(
ie
==
NULL
)
{
/* checked by macro, but cppcheck doesn't see it */
return
-
1
;
}
else
{
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
}
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
s1ap_eNB_instance
,
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
s1ap_eNB_instance
,
enb_ue_s1ap_id
))
==
NULL
)
{
enb_ue_s1ap_id
))
==
NULL
)
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_LOG_RX_DISCARDED_MESSAGE
(
...
@@ -555,14 +562,19 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
...
@@ -555,14 +562,19 @@ int s1ap_eNB_handle_nas_downlink(uint32_t assoc_id,
MSC_AS_TIME_FMT
" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u"
,
MSC_AS_TIME_FMT
" downlinkNASTransport eNB_ue_s1ap_id %u mme_ue_s1ap_id %u"
,
assoc_id
,
assoc_id
,
mme_ue_s1ap_id
);
mme_ue_s1ap_id
);
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_DownlinkNASTransport_IEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_NAS_PDU
,
true
);
S1AP_ProtocolIE_ID_id_NAS_PDU
,
true
);
/* Forward the NAS PDU to RRC */
/* Forward the NAS PDU to RRC */
if
(
ie
!=
NULL
)
{
/* checked by macro, but cppcheck doesn't see it */
s1ap_eNB_itti_send_nas_downlink_ind
(
s1ap_eNB_instance
->
instance
,
s1ap_eNB_itti_send_nas_downlink_ind
(
s1ap_eNB_instance
->
instance
,
ue_desc_p
->
ue_initial_id
,
ue_desc_p
->
ue_initial_id
,
ue_desc_p
->
eNB_ue_s1ap_id
,
ue_desc_p
->
eNB_ue_s1ap_id
,
ie
->
value
.
choice
.
NAS_PDU
.
buf
,
ie
->
value
.
choice
.
NAS_PDU
.
buf
,
ie
->
value
.
choice
.
NAS_PDU
.
size
);
ie
->
value
.
choice
.
NAS_PDU
.
size
);
}
else
{
return
-
1
;
}
return
0
;
return
0
;
}
}
...
...
openair3/S1AP/s1ap_eNB_overload.c
View file @
875bdaf2
...
@@ -57,11 +57,11 @@ int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
...
@@ -57,11 +57,11 @@ int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_OverloadStartIEs_t
,
ie
,
container
,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_OverloadStartIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_OverloadResponse
,
true
);
S1AP_ProtocolIE_ID_id_OverloadResponse
,
true
);
if
(
ie
!=
NULL
)
{
DevCheck
(
ie
->
value
.
choice
.
OverloadResponse
.
present
==
DevCheck
(
ie
->
value
.
choice
.
OverloadResponse
.
present
==
S1AP_OverloadResponse_PR_overloadAction
,
S1AP_OverloadResponse_PR_overloadAction
,
S1AP_OverloadResponse_PR_overloadAction
,
0
,
0
);
S1AP_OverloadResponse_PR_overloadAction
,
0
,
0
);
}
/* Non UE-associated signalling -> stream 0 */
/* Non UE-associated signalling -> stream 0 */
DevCheck
(
stream
==
0
,
stream
,
0
,
0
);
DevCheck
(
stream
==
0
,
stream
,
0
,
0
);
...
...
openair3/S1AP/s1ap_eNB_trace.c
View file @
875bdaf2
...
@@ -119,8 +119,9 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
...
@@ -119,8 +119,9 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
mme_ref_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
);
mme_ref_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
);
DevAssert
(
mme_ref_p
!=
NULL
);
DevAssert
(
mme_ref_p
!=
NULL
);
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_ref_p
->
s1ap_eNB_instance
,
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_ref_p
->
s1ap_eNB_instance
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
))
==
NULL
)
{
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
);
if
(
ue_desc_p
==
NULL
)
{
/* Could not find context associated with this eNB_ue_s1ap_id -> generate
/* Could not find context associated with this eNB_ue_s1ap_id -> generate
* trace failure indication.
* trace failure indication.
*/
*/
...
@@ -130,7 +131,7 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
...
@@ -130,7 +131,7 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
memset
(
&
cause
,
0
,
sizeof
(
S1AP_Cause_t
));
memset
(
&
cause
,
0
,
sizeof
(
S1AP_Cause_t
));
cause
.
present
=
S1AP_Cause_PR_radioNetwork
;
cause
.
present
=
S1AP_Cause_PR_radioNetwork
;
cause
.
choice
.
radioNetwork
=
S1AP_CauseRadioNetwork_unknown_pair_ue_s1ap_id
;
cause
.
choice
.
radioNetwork
=
S1AP_CauseRadioNetwork_unknown_pair_ue_s1ap_id
;
s1ap_eNB_generate_trace_failure
(
ue_desc_p
,
&
trace_id
,
&
cause
);
s1ap_eNB_generate_trace_failure
(
NULL
,
&
trace_id
,
&
cause
);
}
}
return
0
;
return
0
;
...
...
openair3/SCTP/sctp_eNB_task.c
View file @
875bdaf2
...
@@ -603,7 +603,7 @@ sctp_handle_new_association_req(
...
@@ -603,7 +603,7 @@ sctp_handle_new_association_req(
sd
,
sctp_nb_cnx
,
assoc_id
);
sd
,
sctp_nb_cnx
,
assoc_id
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
sctp_send_data
(
void
sctp_send_data
(
instance_t
instance
,
instance_t
instance
,
task_id_t
task_id
,
task_id_t
task_id
,
...
@@ -667,7 +667,7 @@ static int sctp_close_association(
...
@@ -667,7 +667,7 @@ static int sctp_close_association(
close
(
sctp_cnx
->
sd
);
close
(
sctp_cnx
->
sd
);
STAILQ_REMOVE
(
&
sctp_cnx_list
,
sctp_cnx
,
sctp_cnx_list_elm_s
,
entries
);
STAILQ_REMOVE
(
&
sctp_cnx_list
,
sctp_cnx
,
sctp_cnx_list_elm_s
,
entries
);
SCTP_DEBUG
(
"Removed assoc_id %u (closed socket %u)
\n
"
,
SCTP_DEBUG
(
"Removed assoc_id %u (closed socket %u)
\n
"
,
sctp_cnx
->
assoc_id
,
sctp_cnx
->
sd
);
sctp_cnx
->
assoc_id
,
(
unsigned
int
)
sctp_cnx
->
sd
);
}
}
return
0
;
return
0
;
...
@@ -741,12 +741,14 @@ static int sctp_create_new_listener(
...
@@ -741,12 +741,14 @@ static int sctp_create_new_listener(
if
(
server_type
)
{
if
(
server_type
)
{
if
((
sd
=
socket
(
PF_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
))
<
0
)
{
if
((
sd
=
socket
(
PF_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
))
<
0
)
{
SCTP_ERROR
(
"socket: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
SCTP_ERROR
(
"socket: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
free
(
addr
);
return
-
1
;
return
-
1
;
}
}
}
}
else
{
else
{
if
((
sd
=
socket
(
AF_INET6
,
SOCK_STREAM
,
IPPROTO_SCTP
))
<
0
)
{
if
((
sd
=
socket
(
AF_INET6
,
SOCK_STREAM
,
IPPROTO_SCTP
))
<
0
)
{
SCTP_ERROR
(
"socket: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
SCTP_ERROR
(
"socket: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
free
(
addr
);
return
-
1
;
return
-
1
;
}
}
}
}
...
@@ -756,6 +758,7 @@ static int sctp_create_new_listener(
...
@@ -756,6 +758,7 @@ static int sctp_create_new_listener(
if
(
setsockopt
(
sd
,
IPPROTO_SCTP
,
SCTP_EVENTS
,
&
event
,
if
(
setsockopt
(
sd
,
IPPROTO_SCTP
,
SCTP_EVENTS
,
&
event
,
sizeof
(
struct
sctp_event_subscribe
))
<
0
)
{
sizeof
(
struct
sctp_event_subscribe
))
<
0
)
{
SCTP_ERROR
(
"setsockopt: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
SCTP_ERROR
(
"setsockopt: %s:%d
\n
"
,
strerror
(
errno
),
errno
);
free
(
addr
);
return
-
1
;
return
-
1
;
}
}
...
...
targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
View file @
875bdaf2
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
875bdaf2
...
@@ -340,8 +340,8 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
...
@@ -340,8 +340,8 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
ret
=
sysctl
(
rname
,
namelen
,
NULL
,
0
,
newval
,
newlen
);
ret
=
sysctl
(
rname
,
namelen
,
NULL
,
0
,
newval
,
newlen
);
if
(
ret
)
{
if
(
ret
)
{
fprintf
(
stderr
,
"[ETHERNET] Error using sysctl():%s
\n
"
,
strerror
(
errno
));
fprintf
(
stderr
,
"[ETHERNET] Error using sysctl():%s
\n
"
,
strerror
(
errno
));
}
else
{
}
else
{
printf
(
"[ETHERNET] Kernel network receive buffer max size is set to %u
\n
"
,
newval
[
0
]);
printf
(
"[ETHERNET] Kernel network receive buffer max size is set to %u
\n
"
,(
unsigned
int
)
newval
[
0
]);
}
}
break
;
break
;
case
KERNEL_SND_BUF_MAX_SIZE
:
case
KERNEL_SND_BUF_MAX_SIZE
:
...
@@ -349,8 +349,8 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
...
@@ -349,8 +349,8 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
ret
=
sysctl
(
wname
,
namelen
,
NULL
,
0
,
newval
,
newlen
);
ret
=
sysctl
(
wname
,
namelen
,
NULL
,
0
,
newval
,
newlen
);
if
(
ret
)
{
if
(
ret
)
{
fprintf
(
stderr
,
"[ETHERNET] Error using sysctl():%s
\n
"
,
strerror
(
errno
));
fprintf
(
stderr
,
"[ETHERNET] Error using sysctl():%s
\n
"
,
strerror
(
errno
));
}
else
{
}
else
{
printf
(
"[ETHERNET] Kernel network send buffer max size is set to %u
\n
"
,
newval
[
0
]);
printf
(
"[ETHERNET] Kernel network send buffer max size is set to %u
\n
"
,(
unsigned
int
)
newval
[
0
]);
}
}
break
;
break
;
...
...
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