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
31
Issues
31
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
ea62c7d7
Commit
ea62c7d7
authored
Mar 07, 2013
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootp: don't annoy people with BOOTP message spam. report IP acquired.
parent
997cb5d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
bootp.c
lib/bootp.c
+6
-2
No files found.
lib/bootp.c
View file @
ea62c7d7
...
...
@@ -134,13 +134,14 @@ int send_bootp(uint8_t * buf, int retry)
buf
[
IP_CHECKSUM
+
0
]
=
sum
>>
8
;
buf
[
IP_CHECKSUM
+
1
]
=
sum
&
0xff
;
mprintf
(
"Sending BOOTP request...
\n
"
);
//
mprintf("Sending BOOTP request...\n");
return
BOOTP_END
;
}
int
process_bootp
(
uint8_t
*
buf
,
int
len
)
{
uint8_t
mac
[
6
];
uint8_t
ip
[
4
];
get_mac_addr
(
mac
);
...
...
@@ -158,8 +159,11 @@ int process_bootp(uint8_t * buf, int len)
if
(
memcmp
(
buf
+
BOOTP_CHADDR
,
mac
,
6
))
return
0
;
mprintf
(
"Discovered IP address!
\n
"
);
setIP
(
buf
+
BOOTP_YIADDR
);
getIP
(
ip
);
mprintf
(
"Discovered IP address (%d.%d.%d.%d)!
\n
"
,
ip
[
0
],
ip
[
1
],
ip
[
2
],
ip
[
3
]);
return
1
;
}
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