printf("down");
break;
- case SPEED_10:
- printf("up, 10M");
+ case SPEED_10_HD:
+ printf("up, 10M half-duplex");
break;
- case SPEED_100:
- printf("up, 100M");
+ case SPEED_10_FD:
+ printf("up, 10M full-duplex");
break;
- case SPEED_1000:
- printf("up, 1000M");
+ case SPEED_100_HD:
+ printf("up, 100M half-duplex");
+ break;
+
+ case SPEED_100_FD:
+ printf("up, 100M full-duplex");
+ break;
+
+ case SPEED_1000_FD:
+ printf("up, 1000M full-duplex");
break;
default:
swi.ports = malloc(swi.ports_count * sizeof(struct port_info));
memset(swi.ports, 0, swi.ports_count * sizeof(struct port_info));
for (p = 0; p < swi.ports_count; p++) {
- swi.ports[p].state = SPEED_1000;
+ swi.ports[p].state = SPEED_1000_FD;
swi.ports[p].pvid = 1;
swi.ports[p].bitrate_in = BITRATE_NOLIMIT;
swi.ports[p].bitrate_out = BITRATE_NOLIMIT;
enum {
SPEED_UNK = -1, /**< unknown status */
SPEED_DOWN = 0, /**< link down */
- SPEED_10 = 1, /**< 10 Mb/s */
- SPEED_100 = 4, /**< 100 Mb/s */
- SPEED_1000 = 5 /**< 1000 Mb/s */
+ SPEED_10_HD = 1, /**< 10 Mb/s half duplex */
+ SPEED_10_FD = 2, /**< 10 Mb/s full duplex */
+ SPEED_100_HD = 3, /**< 100 Mb/s half duplex */
+ SPEED_100_FD = 4, /**< 100 Mb/s full duplex */
+ SPEED_1000_FD = 5 /**< 1000 Mb/s full duplex */
};
switch (ps->status) {
case SPEED_DOWN:
- case SPEED_10:
- case SPEED_100:
- case SPEED_1000:
+ case SPEED_10_HD:
+ case SPEED_10_FD:
+ case SPEED_100_HD:
+ case SPEED_100_FD:
+ case SPEED_1000_FD:
return 0;
default:
case SPEED_DOWN:
return "down";
- case SPEED_10:
- return "10M";
+ case SPEED_10_HD:
+ return "10M half-duplex";
- case SPEED_100:
- return "100M";
+ case SPEED_10_FD:
+ return "10M full-duplex";
- case SPEED_1000:
- return "1000M";
+ case SPEED_100_HD:
+ return "100M half-duplex";
+
+ case SPEED_100_FD:
+ return "100M full-duplex";
+
+ case SPEED_1000_FD:
+ return "1000M full-duplex";
default:
return "unknown";
local status_codes = {
[0] = "down",
- [1] = "10M",
- [4] = "100M",
- [5] = "1000M"
+ [1] = "10M half-duplex",
+ [2] = "10M full-duplex",
+ [3] = "100M half-duplex",
+ [4] = "100M full-duplex",
+ [5] = "1000M full-duplex"
}