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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
34e64ab1
Commit
34e64ab1
authored
Oct 12, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused/useless Ethernet variables
parent
bba14188
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
radio/ETHERNET/eth_raw.c
radio/ETHERNET/eth_raw.c
+2
-8
radio/ETHERNET/ethernet_lib.h
radio/ETHERNET/ethernet_lib.h
+3
-9
No files found.
radio/ETHERNET/eth_raw.c
View file @
34e64ab1
...
...
@@ -87,7 +87,6 @@ int eth_socket_init_raw(openair0_device *device) {
}
/* initialize destination address */
bzero
((
void
*
)
&
(
eth
->
local_addrc_ll
),
sizeof
(
struct
sockaddr_ll
));
bzero
((
void
*
)
&
(
eth
->
local_addrd_ll
),
sizeof
(
struct
sockaddr_ll
));
bzero
((
void
*
)
&
(
eth
->
if_index
),
sizeof
(
struct
ifreq
));
...
...
@@ -98,17 +97,12 @@ int eth_socket_init_raw(openair0_device *device) {
for
(
int
i
=
0
;
i
<
eth
->
num_fd
;
i
++
)
if
(
ioctl
(
eth
->
sockfdd
[
i
],
SIOCGIFINDEX
,
&
(
eth
->
if_index
))
<
0
)
perror
(
"SIOCGIFINDEX"
);
eth
->
local_addrc_ll
.
sll_family
=
AF_PACKET
;
eth
->
local_addrc_ll
.
sll_ifindex
=
eth
->
if_index
.
ifr_ifindex
;
eth
->
local_addrd_ll
.
sll_family
=
AF_PACKET
;
eth
->
local_addrd_ll
.
sll_ifindex
=
eth
->
if_index
.
ifr_ifindex
;
/* hear traffic from specific protocol*/
eth
->
local_addrc_ll
.
sll_protocol
=
htons
((
short
)
device
->
eth_params
->
my_portc
);
eth
->
local_addrd_ll
.
sll_protocol
=
htons
((
short
)
device
->
eth_params
->
my_portd
);
eth
->
local_addrc_ll
.
sll_halen
=
ETH_ALEN
;
eth
->
local_addrc_ll
.
sll_pkttype
=
PACKET_OTHERHOST
;
eth
->
local_addrd_ll
.
sll_halen
=
ETH_ALEN
;
eth
->
local_addrd_ll
.
sll_pkttype
=
PACKET_OTHERHOST
;
eth
->
addr_len
=
sizeof
(
struct
sockaddr_ll
);
...
...
radio/ETHERNET/ethernet_lib.h
View file @
34e64ab1
...
...
@@ -80,14 +80,6 @@ typedef struct {
struct
sockaddr_in
local_addrd
;
/*!\brief address length for both UDP and RAW socket*/
int
addr_len
;
/*!\brief destination address (control) for RAW socket*/
struct
sockaddr_ll
dest_addrc_ll
;
/*!\brief local address (control) for RAW socket*/
struct
sockaddr_ll
local_addrc_ll
;
/*!\brief destination address (user) for RAW socket*/
struct
sockaddr_ll
dest_addrd_ll
;
/*!\brief local address (user) for RAW socket*/
struct
sockaddr_ll
local_addrd_ll
;
/*!\brief inteface index for RAW socket*/
struct
ifreq
if_index
;
/*!\brief timeout ms */
...
...
@@ -146,7 +138,9 @@ typedef struct {
/*!\brief precomputed ethernet header (control) */
struct
ether_header
ehc
;
/*!\brief precomputed ethernet header (data) */
struct
ether_header
ehd
;
struct
ether_header
ehd
;
/*!\brief local address (user) for RAW socket*/
struct
sockaddr_ll
local_addrd_ll
;
}
eth_state_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