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
bfaa906a
Commit
bfaa906a
authored
Jun 06, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove rb_config functions from nas_config, remove unused functions, make static
parent
e50978e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
79 deletions
+3
-79
openair2/RRC/NAS/nas_config.h
openair2/RRC/NAS/nas_config.h
+0
-6
openair2/RRC/NAS/rb_config.c
openair2/RRC/NAS/rb_config.c
+3
-42
openair2/RRC/NAS/rb_config.h
openair2/RRC/NAS/rb_config.h
+0
-31
No files found.
openair2/RRC/NAS/nas_config.h
View file @
bfaa906a
...
...
@@ -175,10 +175,4 @@ char *getBroadcastAddress(void);
int
bringInterfaceUp
(
char
*
interfaceName
,
int
up
);
int
rb_validate_config_ipv4
(
int
cx
,
int
inst
,
int
rb
);
int
rb_conf_ipv4
(
int
action
,
int
cx
,
int
inst
,
int
rb
,
int
dscp
,
in_addr_t
saddr_ipv4
,
in_addr_t
daddr_ipv4
);
void
rb_ioctl_init
(
int
inst
);
int
rb_stats_req
(
int
inst
);
void
init_socket
(
void
);
in_addr_t
ipv4_address
(
int
thirdOctet
,
int
fourthOctet
);
#endif
/*NAS_CONFIG_H_*/
openair2/RRC/NAS/rb_config.c
View file @
bfaa906a
...
...
@@ -58,7 +58,7 @@ struct nas_ioctl gifr;
static
int
fd
;
static
int
socket_enabled
;
void
init_socket
(
void
)
static
void
init_socket
(
void
)
{
if
((
fd
=
socket
(
AF_INET6
,
SOCK_DGRAM
,
0
))
<
0
)
{
...
...
@@ -69,7 +69,7 @@ void init_socket(void)
socket_enabled
=
1
;
}
void
rb_ioctl_init
(
int
inst
)
static
void
rb_ioctl_init
(
int
inst
)
{
/* init the gifr struct for the given inst */
...
...
@@ -79,7 +79,7 @@ void rb_ioctl_init(int inst)
}
int
rb_validate_config_ipv4
(
int
cx
,
int
inst
,
int
rb
)
static
int
rb_validate_config_ipv4
(
int
cx
,
int
inst
,
int
rb
)
{
if
(
inst
==
-
1
)
{
...
...
@@ -229,45 +229,6 @@ int rb_conf_ipv4(int action,int cx, int inst, int rb, int dscp, in_addr_t saddr_
}
int
rb_stats_req
(
int
inst
)
{
if
(
fd
<=
0
)
{
return
(
1
);
}
/* request stats without defining the interface */
else
if
(
inst
==
-
1
)
{
// printf("Specify an interface for statistics request \n");
LOG_E
(
OIP
,
"Specify an interface for statistics request
\n
"
);
return
(
1
);
}
struct
nas_msg_statistic_reply
*
msgrep
;
int
err
;
rb_ioctl_init
(
inst
);
gifr
.
type
=
NAS_MSG_STATISTIC_REQUEST
;
msgrep
=
(
struct
nas_msg_statistic_reply
*
)(
gifr
.
msg
);
if
((
err
=
ioctl
(
fd
,
NAS_IOCTL_RRM
,
&
gifr
))
<
0
)
{
perror
(
"IOCTL error: STATS REQ FAILED
\n
"
);
LOG_E
(
OIP
,
"IOCTL error: STATS REQ FAILED
\n
"
);
}
LOG_I
(
OIP
,
"ioctl :Statistics request"
);
LOG_I
(
OIP
,
"tx_packets = %u, rx_packets = %u
\n
"
,
msgrep
->
tx_packets
,
msgrep
->
rx_packets
);
LOG_I
(
OIP
,
"tx_bytes = %u, rx_bytes = %u
\n
"
,
msgrep
->
tx_bytes
,
msgrep
->
rx_bytes
);
LOG_I
(
OIP
,
"tx_errors = %u, rx_errors = %u
\n
"
,
msgrep
->
tx_errors
,
msgrep
->
rx_errors
);
LOG_I
(
OIP
,
"tx_dropped = %u, rx_dropped = %u
\n
"
,
msgrep
->
tx_dropped
,
msgrep
->
rx_dropped
);
return
(
0
);
}
in_addr_t
ipv4_address
(
int
thirdOctet
,
int
fourthOctet
)
{
...
...
openair2/RRC/NAS/rb_config.h
View file @
bfaa906a
...
...
@@ -28,40 +28,9 @@
#define __RB_CONFIG_H__
#include <netinet/in.h>
/*
typedef struct {
int fd; // socket file descriptor
int stats;
int action; // add or delete
int rb;
int cx;
int inst;
int saddr_ipv4set;
int daddr_ipv4set;
in_addr_t saddr_ipv4;
in_addr_t daddr_ipv4;
int saddr_ipv6set;
int daddr_ipv6set;
struct in6_addr saddr_ipv6;
struct in6_addr daddr_ipv6;
int dscp;
} rb_config;
*/
int
rb_validate_config_ipv4
(
int
cx
,
int
inst
,
int
rb
);
int
rb_conf_ipv4
(
int
action
,
int
cx
,
int
inst
,
int
rb
,
int
dscp
,
in_addr_t
saddr_ipv4
,
in_addr_t
daddr_ipv4
);
void
rb_ioctl_init
(
int
inst
);
int
rb_stats_req
(
int
inst
);
void
init_socket
(
void
);
in_addr_t
ipv4_address
(
int
thirdOctet
,
int
fourthOctet
);
...
...
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