- reporting link state with DHCP off fixed
This commit is contained in:
parent
c3f8e53006
commit
398a448eba
@ -122,6 +122,7 @@ static ThreadReturnType task_ethintf(ThreadParamType param) {
|
|||||||
} else { // if link is off
|
} else { // if link is off
|
||||||
dhcp_stop(intf->dhcp);
|
dhcp_stop(intf->dhcp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// print generic message
|
// print generic message
|
||||||
MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET);
|
MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET);
|
||||||
@ -130,7 +131,6 @@ static ThreadReturnType task_ethintf(ThreadParamType param) {
|
|||||||
if (ls) {
|
if (ls) {
|
||||||
MSG("(%u Mbps, %s duplex)\n", speed, duplex ? "FULL" : "HALF");
|
MSG("(%u Mbps, %s duplex)\n", speed, duplex ? "FULL" : "HALF");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case ETH_IIE_TRANSMIT_NOTIFY: {
|
case ETH_IIE_TRANSMIT_NOTIFY: {
|
||||||
@ -262,7 +262,7 @@ void ethinf_get_config(EthInterface *intf, EthInterfaceNetworkConfig *config) {
|
|||||||
config->manageDhcp = intf->manageDhcp;
|
config->manageDhcp = intf->manageDhcp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ethinf_print_info(const EthInterface * intf) {
|
void ethinf_print_info(const EthInterface *intf) {
|
||||||
MSG("IP: " ANSI_COLOR_BYELLOW);
|
MSG("IP: " ANSI_COLOR_BYELLOW);
|
||||||
PRINT_IPv4(intf->ip);
|
PRINT_IPv4(intf->ip);
|
||||||
MSG(ANSI_COLOR_RESET "\nRouter: ");
|
MSG(ANSI_COLOR_RESET "\nRouter: ");
|
||||||
@ -277,7 +277,7 @@ void ethinf_print_info(const EthInterface * intf) {
|
|||||||
bool on = dhcp_get_fsm_state(intf->dhcp) != DHCP_STOPPED;
|
bool on = dhcp_get_fsm_state(intf->dhcp) != DHCP_STOPPED;
|
||||||
MSG("DHCP is %s" ANSI_COLOR_RESET " %s.", on ? (ANSI_COLOR_BGREEN "RUNNING") : (ANSI_COLOR_BRED "STOPPED"), intf->manageDhcp ? "[automanaged]" : "");
|
MSG("DHCP is %s" ANSI_COLOR_RESET " %s.", on ? (ANSI_COLOR_BGREEN "RUNNING") : (ANSI_COLOR_BRED "STOPPED"), intf->manageDhcp ? "[automanaged]" : "");
|
||||||
} else {
|
} else {
|
||||||
MSG ("DHCP is " ANSI_COLOR_RED "ABSENT" ANSI_COLOR_RESET ".");
|
MSG("DHCP is " ANSI_COLOR_RED "ABSENT" ANSI_COLOR_RESET ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG("\n");
|
MSG("\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user