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 = 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++) {