diff options
Diffstat (limited to 'cpukit/libnetworking/rtems/rtems_bootp.c')
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_bootp.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_bootp.c b/cpukit/libnetworking/rtems/rtems_bootp.c new file mode 100644 index 0000000000..caf2faa6e2 --- /dev/null +++ b/cpukit/libnetworking/rtems/rtems_bootp.c @@ -0,0 +1,42 @@ +/* + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems.h> +#include <rtems/error.h> +#include <sys/types.h> +#include <rtems/rtems_bsdnet.h> +#include <rtems/rtems_bsdnet_internal.h> + +/* + * Perform a BOOTP request + */ +void +rtems_bsdnet_do_bootp (void) +{ + bool ok; + rtems_bsdnet_semaphore_obtain (); + ok = bootpc_init (false, true); + rtems_bsdnet_semaphore_release (); + if (!ok) + panic ("rtems_bsdnet_do_bootp: bootp failed"); +} + +/* + * Perform a BOOTP request and update "standard" files in /etc + * with the results. + */ +void +rtems_bsdnet_do_bootp_and_rootfs (void) +{ + bool ok; + rtems_bsdnet_semaphore_obtain (); + ok = bootpc_init (true, true); + rtems_bsdnet_semaphore_release (); + if (!ok) + panic ("rtems_bsdnet_do_bootp_and_rootfs: bootp failed"); +} |