Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/networking/udhcp/arpping.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/networking/udhcp/arpping.c
r3232 r3621 40 40 uint32_t from_ip, 41 41 uint8_t *from_mac, 42 const char *interface) 42 const char *interface, 43 unsigned timeo) 43 44 { 44 45 int timeout_ms; … … 48 49 struct sockaddr addr; /* for interface name */ 49 50 struct arpMsg arp; 51 52 if (!timeo) 53 return 1; 50 54 51 55 s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)); … … 84 88 85 89 /* wait for arp reply, and check it */ 86 timeout_ms = 2000;90 timeout_ms = (int)timeo; 87 91 do { 88 92 typedef uint32_t aliased_uint32_t FIX_ALIASING; … … 125 129 * (people did see overflows here when system time jumps): 126 130 */ 127 } while ((unsigned)timeout_ms <= 2000);131 } while ((unsigned)timeout_ms <= timeo); 128 132 129 133 ret: 130 134 close(s); 131 log1("%srp reply received for this address", rv ? " No a" : "A");135 log1("%srp reply received for this address", rv ? "no a" : "A"); 132 136 return rv; 133 137 }
Note:
See TracChangeset
for help on using the changeset viewer.