Changeset View
Changeset View
Standalone View
Standalone View
sys/net/debugnet_inet.c
Show First 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | debugnet_arp_gw(struct debugnet_pcb *pcb) | ||||
dst = pcb->dp_server; | dst = pcb->dp_server; | ||||
restart: | restart: | ||||
for (retries = 0; retries < debugnet_arp_nretries; retries++) { | for (retries = 0; retries < debugnet_arp_nretries; retries++) { | ||||
error = debugnet_send_arp(pcb, dst); | error = debugnet_send_arp(pcb, dst); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
for (polls = 0; polls < debugnet_npolls && | for (polls = 0; polls < debugnet_npolls && | ||||
pcb->dp_state < DN_STATE_HAVE_GW_MAC; polls++) { | pcb->dp_state < DN_STATE_HAVE_GW_MAC; polls++) { | ||||
debugnet_network_poll(pcb->dp_ifp); | debugnet_network_poll(pcb); | ||||
DELAY(500); | DELAY(500); | ||||
} | } | ||||
if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) | if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) | ||||
break; | break; | ||||
printf("(ARP retry)"); | printf("(ARP retry)"); | ||||
} | } | ||||
if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) | if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |