Lines Matching refs:nip
165 unsigned nip; member
524 uint32_t optcode = 0, inf = infomode, convtmp, mask, nip, router; in strtoopt() local
616 if (striptovar(grp, (uint8_t*)&nip)<0) error_exit("wrong formatted static route option"); in strtoopt()
622 memcpy(((uint8_t*)options_list[count].val)+options_list[count].len, &nip, mask/8); in strtoopt()
661 striptovar(tkip, &sltmp->nip); in get_staticlease()
1309 static int verifyip_in_lease(uint32_t nip, uint8_t mac[6]) in verifyip_in_lease() argument
1315 if (((dyn_lease*) listdls->arg)->lease_nip == nip) { in verifyip_in_lease()
1323 if (sls->nip == nip) return -2; in verifyip_in_lease()
1325 if ((ntohl(nip) < gconfig.start_ip) || (ntohl(nip) > gconfig.end_ip)) in verifyip_in_lease()
1414 uint32_t nip = 0; in getip_from_pool() local
1418 if (req_nip && (!verifyip_in_lease(req_nip, mac))) nip = req_nip; in getip_from_pool()
1420 if (!nip) { in getip_from_pool()
1423 nip = ((dyn_lease*)listdls->arg)->lease_nip; in getip_from_pool()
1428 if (verifyip_in_lease(nip, mac) < 0) nip = 0; in getip_from_pool()
1435 if (!nip) { in getip_from_pool()
1438 nip = sls->nip; in getip_from_pool()
1444 if (!nip) { in getip_from_pool()
1445 for (nip = htonl(gconfig.start_ip); ntohl(nip) <= gconfig.end_ip; ) { in getip_from_pool()
1446 if (!verifyip_in_lease(nip, mac)) break; in getip_from_pool()
1447 nip = ntohl(nip); in getip_from_pool()
1448 nip = htonl(++nip); in getip_from_pool()
1450 if (ntohl(nip) > gconfig.end_ip) { in getip_from_pool()
1451 nip = 0; in getip_from_pool()
1455 if (nip) addip_to_lease(nip, mac, req_exp, hostname, 1); in getip_from_pool()
1456 return nip; in getip_from_pool()