2 void shell_ip(char ** argv, int elem) {
6 printf(" ip [show|dhcp|set] \n");
10 if (strncmp(argv[1], "show", 2) == 0) {
14 printf("DHCP:\t\t%s\n", settings.dhcp == 0x01 ? "ON":"OFF");
15 printf("Subnetmask:\t");
16 printIp(settings.subnetmask);
18 printIp(settings.gateway);
22 if (strncmp(argv[1], "dhcp", 4) == 0) {
24 printf("ip dhcp [on|off|renew]\n");
25 printf(" on: Turn on DHCP\n");
26 printf(" off: Turn off DHCP, current IP will be taken\n");
27 printf(" renew: renew IP-Address via DHCP (turns on DHCP too)\n");
30 if (strncmp(argv[2], "on", 2) == 0) {
31 printError(gs105e_dhcpSettings(DHCP_ON));
32 } else if (strncmp(argv[2], "off", 3) == 0) {
33 printError(gs105e_dhcpSettings(DHCP_OFF));
34 } else if (strncmp(argv[2], "renew", 5) == 0) {
35 printError(gs105e_dhcpSettings(DHCP_RENEW));