Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
e6347dcd
Commit
e6347dcd
authored
Oct 25, 2011
by
Juan Luis Manas
Committed by
Alessandro Rubini
Mar 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTU/rtu_fd: removed unnecessary check. mac_to_str added to mac.c
parent
d6552db6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
mac.c
userspace/wrsw_rtud/mac.c
+11
-0
rtu_fd.c
userspace/wrsw_rtud/rtu_fd.c
+0
-3
rtu_fd_srv.c
userspace/wrsw_rtud/rtu_fd_srv.c
+0
-2
No files found.
userspace/wrsw_rtud/mac.c
View file @
e6347dcd
...
@@ -40,3 +40,14 @@ char *mac_to_string(uint8_t mac[ETH_ALEN])
...
@@ -40,3 +40,14 @@ char *mac_to_string(uint8_t mac[ETH_ALEN])
return
strdup
(
str
);
//FIXME: can't be static but this takes memory
return
strdup
(
str
);
//FIXME: can't be static but this takes memory
}
}
/**
* \brief Helper function to convert mac address into a string
*/
char
*
mac_to_str
(
uint8_t
mac
[
ETH_ALEN
],
char
str
[
ETH_ALEN
*
3
])
{
snprintf
(
str
,
ETH_ALEN
*
3
,
"%02x:%02x:%02x:%02x:%02x:%02x"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
return
str
;
}
userspace/wrsw_rtud/rtu_fd.c
View file @
e6347dcd
...
@@ -941,9 +941,6 @@ int rtu_fdb_delete_static_entry(uint8_t mac[ETH_ALEN], uint16_t vid)
...
@@ -941,9 +941,6 @@ int rtu_fdb_delete_static_entry(uint8_t mac[ETH_ALEN], uint16_t vid)
"delete static entry: vid=%d mac=%s"
,
vid
,
mac_to_string
(
mac
));
"delete static entry: vid=%d mac=%s"
,
vid
,
mac_to_string
(
mac
));
lock
();
lock
();
// Check that VLAN is registered (except for wildcard vid)
if
((
vid
!=
WILDCARD_VID
)
&&
!
rtu_sw_find_vlan_entry
(
vid
))
return
unlock
(
-
EINVAL
);
// Check that entry is registered
// Check that entry is registered
sfe
=
sfe_find
(
mac
,
vid
);
sfe
=
sfe_find
(
mac
,
vid
);
if
(
!
sfe
)
if
(
!
sfe
)
...
...
userspace/wrsw_rtud/rtu_fd_srv.c
View file @
e6347dcd
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include <hw/trace.h>
#include "rtu_fd_srv.h"
#include "rtu_fd_srv.h"
#include "rtu_fd_export.h"
#include "rtu_fd_export.h"
...
...
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