5
Last change
on this file since cb68253 was
cb68253,
checked in by Sebastian Huber <sebastian.huber@…>, on 09/07/18 at 04:19:02
|
network: Use kernel/user space header files
Add and use <machine/rtems-bsd-kernel-space.h> and
<machine/rtems-bsd-user-space.h> similar to the libbsd to avoid command
line defines and defines scattered throught the code base.
Simplify cpukit/libnetworking/Makefile.am.
Update #3375.
|
-
Property mode set to
100644
|
File size:
835 bytes
|
Line | |
---|
1 | #include <machine/rtems-bsd-kernel-space.h> |
---|
2 | |
---|
3 | #if HAVE_CONFIG_H |
---|
4 | #include "config.h" |
---|
5 | #endif |
---|
6 | |
---|
7 | #include <rtems.h> |
---|
8 | #include <rtems/error.h> |
---|
9 | #include <sys/types.h> |
---|
10 | #include <rtems/rtems_bsdnet.h> |
---|
11 | #include <rtems/rtems_bsdnet_internal.h> |
---|
12 | |
---|
13 | #include "rtems/bootp.h" |
---|
14 | |
---|
15 | /* |
---|
16 | * Perform a BOOTP request |
---|
17 | */ |
---|
18 | void |
---|
19 | rtems_bsdnet_do_bootp (void) |
---|
20 | { |
---|
21 | bool ok; |
---|
22 | rtems_bsdnet_semaphore_obtain (); |
---|
23 | ok = bootpc_init (false, true); |
---|
24 | rtems_bsdnet_semaphore_release (); |
---|
25 | if (!ok) |
---|
26 | panic ("rtems_bsdnet_do_bootp: bootp failed"); |
---|
27 | } |
---|
28 | |
---|
29 | /* |
---|
30 | * Perform a BOOTP request and update "standard" files in /etc |
---|
31 | * with the results. |
---|
32 | */ |
---|
33 | void |
---|
34 | rtems_bsdnet_do_bootp_and_rootfs (void) |
---|
35 | { |
---|
36 | bool ok; |
---|
37 | rtems_bsdnet_semaphore_obtain (); |
---|
38 | ok = bootpc_init (true, true); |
---|
39 | rtems_bsdnet_semaphore_release (); |
---|
40 | if (!ok) |
---|
41 | panic ("rtems_bsdnet_do_bootp_and_rootfs: bootp failed"); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.