• Home
  • Raw
  • Download

Lines Matching refs:ifp

252 	struct interface *ifp;  in find_interface()  local
254 for (ifp = ifaces; ifp; ifp = ifp->next) in find_interface()
255 if (strcmp(ifp->name, ifname) == 0) in find_interface()
256 return ifp; in find_interface()
263 struct interface *ifp, *ifl = NULL; in stop_interface() local
275 for (ifp = ifaces; ifp; ifp = ifp->next) { in stop_interface()
276 if (ifp == iface) in stop_interface()
278 ifl = ifp; in stop_interface()
281 ifl->next = ifp->next; in stop_interface()
283 ifaces = ifp->next; in stop_interface()
284 free_interface(ifp); in stop_interface()
1299 struct interface *ifs, *ifp, *ifn, *ifl = NULL; in handle_interface() local
1304 ifp = find_interface(ifname); in handle_interface()
1305 if (ifp != NULL) in handle_interface()
1306 stop_interface(ifp); in handle_interface()
1320 for (ifp = ifs; ifp; ifp = ifp->next) { in handle_interface()
1321 if (strcmp(ifp->name, ifname) != 0) in handle_interface()
1325 if (strcmp(ifn->name, ifp->name) == 0) in handle_interface()
1331 ifn->flags = ifp->flags; in handle_interface()
1332 ifn->hwlen = ifp->hwlen; in handle_interface()
1333 if (ifp->hwlen != 0) in handle_interface()
1334 memcpy(ifn->hwaddr, ifp->hwaddr, ifn->hwlen); in handle_interface()
1337 ifl->next = ifp; in handle_interface()
1339 ifaces = ifp; in handle_interface()
1341 init_state(ifp, 0, NULL); in handle_interface()
1342 start_interface(ifp); in handle_interface()
1350 struct interface *ifp; in handle_hwaddr() local
1353 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_hwaddr()
1354 if (strcmp(ifp->name, ifname) == 0 && ifp->hwlen <= hwlen) { in handle_hwaddr()
1355 ifo = ifp->state->options; in handle_hwaddr()
1358 && ifp->state->new != NULL && in handle_hwaddr()
1359 ifp->state->new->cookie == htonl(MAGIC_COOKIE)) in handle_hwaddr()
1363 ifp->name); in handle_hwaddr()
1364 drop_dhcp(ifp, "EXPIRE"); in handle_hwaddr()
1366 memcpy(ifp->hwaddr, hwaddr, hwlen); in handle_hwaddr()
1367 ifp->hwlen = hwlen; in handle_hwaddr()
1372 ifp->name, in handle_hwaddr()
1373 hwaddr_ntoa(ifp->hwaddr, ifp->hwlen)); in handle_hwaddr()
1374 ifp->state->interval = 0; in handle_hwaddr()
1375 ifp->state->nakoff = 1; in handle_hwaddr()
1376 start_interface(ifp); in handle_hwaddr()
1387 struct interface *ifp; in handle_ifa() local
1393 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_ifa()
1394 if (strcmp(ifp->name, ifname) == 0) in handle_ifa()
1396 if (ifp == NULL) in handle_ifa()
1400 if (ifp->state->new && in handle_ifa()
1401 ifp->state->new->yiaddr == addr->s_addr) in handle_ifa()
1403 ifp->name, inet_ntoa(ifp->state->lease.addr), in handle_ifa()
1404 inet_ntocidr(ifp->state->lease.net)); in handle_ifa()
1411 ifo = ifp->state->options; in handle_ifa()
1416 free(ifp->state->old); in handle_ifa()
1417 ifp->state->old = ifp->state->new; in handle_ifa()
1418 ifp->state->new = dhcp_message_new(addr, net); in handle_ifa()
1419 ifp->dst.s_addr = dst ? dst->s_addr : INADDR_ANY; in handle_ifa()
1423 dhcp_message_add_addr(ifp->state->new, i, *dst); in handle_ifa()
1425 ifp->state->reason = "STATIC"; in handle_ifa()
1427 run_script(ifp); in handle_ifa()
1429 ifp->state->state = DHS_INFORM; in handle_ifa()
1430 ifp->state->xid = dhcp_xid(ifp); in handle_ifa()
1431 ifp->state->lease.server.s_addr = in handle_ifa()
1433 ifp->addr = *addr; in handle_ifa()
1434 ifp->net = *net; in handle_ifa()
1435 send_inform(ifp); in handle_ifa()
1474 struct interface *ifl, *ifn, *ifp, *ifs, *ift; in reconf_reboot() local
1480 for (ifp = ifs; ifp && (ift = ifp->next, 1); ifp = ift) { in reconf_reboot()
1483 if (strcmp(ifn->name, ifp->name) == 0) in reconf_reboot()
1492 free_interface(ifp); in reconf_reboot()
1494 ifp->next = NULL; in reconf_reboot()
1495 init_state(ifp, argc, argv); in reconf_reboot()
1496 start_interface(ifp); in reconf_reboot()
1498 ifl->next = ifp; in reconf_reboot()
1500 ifaces = ifp; in reconf_reboot()
1511 struct interface *ifp, *ifl; in handle_signal() local
1527 for (ifp = ifaces; ifp; ifp = ifp->next) { in handle_signal()
1528 start_renew(ifp); in handle_signal()
1560 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_signal()
1561 if (ifp->state->new) in handle_signal()
1562 configure(ifp); in handle_signal()
1581 for (ifp = ifaces; ifp; ifp = ifp->next) { in handle_signal()
1582 if (ifp->next == NULL) in handle_signal()
1584 ifl = ifp; in handle_signal()
1586 if (ifp == NULL) in handle_signal()
1588 if (ifp->carrier != LINK_DOWN && in handle_signal()
1590 ifp->state->options->options & DHCPCD_RELEASE)) in handle_signal()
1591 send_release(ifp); in handle_signal()
1592 stop_interface(ifp); in handle_signal()
1600 struct interface *ifp; in handle_args() local
1635 for (ifp = ifaces; ifp; ifp = ifp->next) { in handle_args()
1637 if (ifp->ras) in handle_args()
1643 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_args()
1644 send_interface(fd->fd, ifp); in handle_args()
1649 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_args()
1650 if (strcmp(argv[opt], ifp->name) == 0) { in handle_args()
1652 if (ifp->ras) in handle_args()
1661 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_args()
1662 if (strcmp(argv[opt], ifp->name) == 0) in handle_args()
1663 send_interface(fd->fd, ifp); in handle_args()
1714 for (ifp = ifaces; ifp; ifp = ifp->next) in handle_args()
1715 if (strcmp(ifp->name, argv[oi]) == 0) in handle_args()
1717 if (!ifp) in handle_args()
1720 ifp->state->options->options |= DHCPCD_RELEASE; in handle_args()
1721 if (ifp->state->options->options & DHCPCD_RELEASE && in handle_args()
1722 ifp->carrier != LINK_DOWN) in handle_args()
1723 send_release(ifp); in handle_args()
1724 stop_interface(ifp); in handle_args()