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
6
Merge Requests
6
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
f2b85055
Commit
f2b85055
authored
May 30, 2017
by
Cesar Prados
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootp: add vendor extension info with the wrpc-sw build info
Documentation of the vendor extension RFC 2132
parent
7e45c9d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
bootp.c
lib/bootp.c
+14
-1
No files found.
lib/bootp.c
View file @
f2b85055
...
...
@@ -9,7 +9,7 @@
#include <string.h>
#include <wrc.h>
#include "endpoint.h"
#include "revision.h"
#include "ipv4.h"
#define BOOTP_OP (UDP_END)
...
...
@@ -32,6 +32,7 @@
int
prepare_bootp
(
struct
wr_sockaddr
*
addr
,
uint8_t
*
buf
,
int
retry
)
{
struct
wr_udp_addr
uaddr
;
const
char
*
test
=
build_revision
;
// ----------- BOOTP ------------
buf
[
BOOTP_OP
]
=
1
;
/* bootrequest */
...
...
@@ -60,7 +61,19 @@ int prepare_bootp(struct wr_sockaddr *addr, uint8_t * buf, int retry)
memset
(
buf
+
BOOTP_SNAME
,
0
,
64
);
/* desired BOOTP server */
memset
(
buf
+
BOOTP_FILE
,
0
,
128
);
/* desired BOOTP file */
memset
(
buf
+
BOOTP_VEND
,
0
,
64
);
/* vendor extensions */
buf
[
BOOTP_VEND
+
0
]
=
0x63
;
/* RFC 2132 */
buf
[
BOOTP_VEND
+
1
]
=
0x82
;
buf
[
BOOTP_VEND
+
2
]
=
0x53
;
buf
[
BOOTP_VEND
+
3
]
=
0x63
;
buf
[
BOOTP_VEND
+
4
]
=
0x3c
;
buf
[
BOOTP_VEND
+
5
]
=
0x20
;
//size of the vendor string
memcpy
(
buf
+
BOOTP_VEND
+
6
,
build_revision
,
32
);
buf
[
BOOTP_VEND
+
38
]
=
0xff
;
buf
[
BOOTP_VEND
+
39
]
=
0x00
;
/* complete with udp helper */
memset
(
&
uaddr
.
saddr
,
0
,
4
);
...
...
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