Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
Software for White Rabbit PTP Core
Commits
3a2fff4c
Commit
3a2fff4c
authored
Feb 22, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use format_mac in lldp and monitor
saves ~50B Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
21a38f50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
lldp.c
lib/lldp.c
+1
-4
monitor_ppsi.c
monitor/monitor_ppsi.c
+2
-4
No files found.
lib/lldp.c
View file @
3a2fff4c
...
...
@@ -119,10 +119,7 @@ static void lldp_add_tlv(int tlv_type) {
}
else
{
/* NOTE: no subtype */
ep_get_mac_addr
(
&
wrc_endpoint_dev
,
mac
);
pp_sprintf
(
buf
,
"%02x:%02x:%02x:%02x:%02x:%02x"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
format_mac
(
buf
,
mac
);
tlv_len
=
17
;
strncpy
((
char
*
)(
lldpdu
+
lldpdu_len
+
LLDP_HEADER
),
(
char
*
)
buf
,
tlv_len
);
...
...
monitor/monitor_ppsi.c
View file @
3a2fff4c
...
...
@@ -545,6 +545,7 @@ void print_main_data(void)
unsigned
char
*
p
=
ppi_pt
->
activePeer
;
char
*
extension_state_name
=
EMPTY_EXTENSION_STATE_NAME
;
char
proto
;
char
mac_buf
[
20
];
#if 0 /* FIXME: only one instance so far */
if (strcmp(if_name,
...
...
@@ -580,10 +581,7 @@ void print_main_data(void)
pcprintf
(
14
,
16
,
C_WHITE
,
"%-12s"
,
str_config
);
/* peer not implemented */
pprintf
(
14
,
31
,
"%02x:%02x"
":%02x:%02x:%02x:%02x "
,
p
[
0
],
p
[
1
],
p
[
2
],
p
[
3
],
p
[
4
],
p
[
5
]);
pprintf
(
14
,
31
,
format_mac
(
mac_buf
,
p
));
pcprintf
(
14
,
51
,
C_GREEN
,
"%s/"
,
getStateAsString
(
pp_instance_state_to_name
,
ppi_pt
->
state
));
/* print extension state */
...
...
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