3 void shell_port(char ** argv, int elem) {
11 if (strncmp(argv[1], "show", 4) == 0) {
12 printf("Port\tSpeed\t\tBytes In\t\tBytes Out\n");
13 for (n = 0; n< 5; n++) {
14 printf("%i\t%s\t% 8lu\t\t% 8lu\n", n,
15 (settings.portStatistics[n].state == 0x05 ? "1000 Mbit/s" : (settings.portStatistics[n].state == 0x04 ? "100 Mbit/s" : (settings.portStatistics[n].state == 0x03 ? "10 Mbit/s": (settings.portStatistics[n].state == 0x00 ? "No Cable": "???")))),
16 settings.portStatistics[n].bytesIn,
17 settings.portStatistics[n].bytesOut