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
30
Issues
30
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
Software for White Rabbit PTP Core
Commits
8705ee3f
Commit
8705ee3f
authored
Aug 10, 2017
by
Adam Wujek
💬
Committed by
Grzegorz Daniluk
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/lldp: fill managment IP
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
88de0cf2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
lldp.c
lib/lldp.c
+10
-1
No files found.
lib/lldp.c
View file @
8705ee3f
...
...
@@ -117,10 +117,18 @@ static void lldp_add_tlv(int tlv_type) {
/* TLV Info string */
/* TODO get host system name from wr-core outer world */
lldpdu
[
lldpdu_len
]
=
0x
4
;
/* len */
lldpdu
[
lldpdu_len
]
=
0x
5
;
/* len */
lldpdu
[
lldpdu_len
+
LLDP_SUBTYPE
]
=
0x1
;
/* mngt add subtype */
lldpdu
[
lldpdu_len
+
IF_SUBTYPE
]
=
0x1
;
/* if subtype */
lldpdu
[
lldpdu_len
+
IF_NUM
]
=
0x1
;
/* if number */
/* TLV Info srting */
if
(
HAS_IP
)
{
getIP
(
ipWR
);
char
buf
[
32
];
format_ip
(
buf
,
ipWR
);
memcpy
(
&
lldpdu
[
lldpdu_len
+
LLDP_SUBTYPE
+
1
],
ipWR
,
4
);
}
break
;
case
USER_DEF
:
/* TODO define WR TLV */
...
...
@@ -168,6 +176,7 @@ static int lldp_poll(void)
if
(
HAS_IP
&&
(
ip_status
!=
IP_TRAINING
))
{
lldp_add_tlv
(
PORT
);
lldp_add_tlv
(
MNG_ADD
);
/* update other dynamic TLVs */
}
...
...
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