summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-04-02 15:17:36 +0000
committerphk <phk@FreeBSD.org>1996-04-02 15:17:36 +0000
commit40dcfd63289bc24ae168d6ebfbabe27888e43a7b (patch)
tree6a6ee506a85a03857723a6dde9a6816d51a9efac /sys
parent5a3487eb35f97fc893ebb2fe4c278036d3a164cd (diff)
downloadFreeBSD-src-40dcfd63289bc24ae168d6ebfbabe27888e43a7b.zip
FreeBSD-src-40dcfd63289bc24ae168d6ebfbabe27888e43a7b.tar.gz
Align help screen.
add gateway command.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/netboot/bootmenu.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/i386/boot/netboot/bootmenu.c b/sys/i386/boot/netboot/bootmenu.c
index 662a457..1c3621b 100644
--- a/sys/i386/boot/netboot/bootmenu.c
+++ b/sys/i386/boot/netboot/bootmenu.c
@@ -16,17 +16,18 @@ extern short aui;
int cmd_ip(), cmd_server(), cmd_kernel(), cmd_help(), exit();
int cmd_rootfs(), cmd_swapfs(), cmd_interface(), cmd_hostname();
int cmd_netmask(), cmd_swapsize(), cmd_swapopts(), cmd_rootopts();
-int cmd_aui();
+int cmd_aui(), cmd_gateway();
struct bootcmds_t {
char *name;
int (*func)();
char *help;
} bootcmds[] = {
- {"?", cmd_help, " this list"},
+ {"?", cmd_help, " this list"},
{"help", cmd_help, " this list"},
{"ip", cmd_ip, "<addr> set my IP addr"},
{"server", cmd_server, "<addr> set TFTP server IP addr"},
+ {"gateway", cmd_gateway, "<addr> set default router"},
{"netmask", cmd_netmask, "<addr> set network mask"},
{"hostname", cmd_hostname, "<name> set hostname"},
{"kernel", cmd_kernel, "<file> set boot filename"},
@@ -87,6 +88,20 @@ cmd_aui(p)
}
/**************************************************************************
+CMD_GATEWAY - Set routers IP address
+**************************************************************************/
+cmd_gateway(p)
+ char *p;
+{
+ int i;
+ if (!setip(p, &arptable[ARP_GATEWAY].ipaddr)) {
+ printf("Server IP address is %I\r\n",
+ arptable[ARP_GATEWAY].ipaddr);
+ } else /* Need to clear arp entry if we change IP address */
+ for (i=0; i<6; i++) arptable[ARP_GATEWAY].node[i] = 0;
+}
+
+/**************************************************************************
CMD_SERVER - Set server's IP address
**************************************************************************/
cmd_server(p)
OpenPOWER on IntegriCloud