Lines Matching refs:ip
79 static void pick(struct in_addr *ip)
86 ip->s_addr = htonl((LINKLOCAL_ADDR + 0x0100) + tmp);
126 static int run(char *argv[3], const char *intf, struct in_addr *ip)
132 if (ip) {
133 char *addr = inet_ntoa(*ip);
134 setenv("ip", addr, 1);
174 struct in_addr ip;
188 #define ip (L.ip )
213 if (inet_aton(r_opt, &ip) == 0
214 || (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR
251 // start with some stable ip address, either a function of
256 if (ip.s_addr == 0)
257 pick(&ip);
313 nprobes, intf, inet_ntoa(ip));
316 &null_addr, ip);
325 nclaims, intf, inet_ntoa(ip));
327 ð_addr, ip,
328 ð_addr, ip);
338 nclaims, intf, inet_ntoa(ip));
340 ð_addr, ip,
341 ð_addr, ip);
350 nclaims, intf, inet_ntoa(ip));
352 ð_addr, ip,
353 ð_addr, ip);
361 run(script_av, intf, &ip);
381 pick(&ip);
412 run(script_av, intf, &ip);
448 if (memcmp(p.arp.arp_spa, &ip.s_addr, sizeof(struct in_addr)) == 0 &&
452 if (memcmp(p.arp.arp_tpa, &ip.s_addr, sizeof(struct in_addr)) == 0 &&
458 VDBG("state = %d, source ip conflict = %d, target ip conflict = %d\n",
474 pick(&ip);
488 ð_addr, ip,
489 ð_addr, ip);
499 run(script_av, intf, &ip);
502 pick(&ip);
512 pick(&ip);