Lines Matching defs:if_index
244 int shut = 0, bpfsock, if_index, udpsock;
302 if (imsg_get_data(&imsg, &if_index,
303 sizeof(if_index)) == -1)
306 set_bpfsock(bpfsock, if_index);
313 if (imsg_get_data(&imsg, &if_index,
314 sizeof(if_index)) == -1)
317 if ((iface = get_iface_by_id(if_index)) == NULL) {
327 if (imsg_get_data(&imsg, &if_index,
328 sizeof(if_index)) == -1)
331 if ((iface = get_iface_by_id(if_index)) != NULL &&
441 if_index = ifaces[i];
442 if_name = if_indextoname(if_index, ifnamebuf);
444 NULL ? if_name : "<unknown>", if_index);
446 IMSG_REQUEST_REBOOT, 0, 0, &if_index,
447 sizeof(if_index));
527 iface = get_iface_by_id(imsg_req_dhcp.if_index);
543 iface = get_iface_by_id(imsg_req_dhcp.if_index);
598 uint32_t if_index;
602 if_index = ifm->ifm_index;
607 iface = get_iface_by_id(if_index);
608 if_name = if_indextoname(if_index, ifnamebuf);
612 log_debug("interface with idx %d removed", if_index);
614 &if_index, sizeof(if_index));
615 remove_iface(if_index);
624 &if_index, sizeof(if_index));
625 remove_iface(if_index);
631 ifinfo.if_index = if_index;
652 &if_index, sizeof(if_index));
688 uint32_t if_index;
698 for (ifnidx = ifnidxp; ifnidx->if_index != 0 && ifnidx->if_name != NULL;
700 if_index = ifnidx->if_index;
710 ifinfo.if_index = if_index;
754 &if_index, sizeof(if_index));
807 uint32_t if_index;
818 if_index = ifan->ifan_index;
821 &if_index, sizeof(if_index));
822 remove_iface(if_index);
876 imsg_dhcp.if_index = iface->ifinfo.if_index;
1072 if ((if_name = if_indextoname(iface->ifinfo.if_index, ifnamebuf)) == NULL)
1171 get_iface_by_id(uint32_t if_index)
1176 if (iface->ifinfo.if_index == if_index)
1184 remove_iface(uint32_t if_index)
1188 iface = get_iface_by_id(if_index);
1204 set_bpfsock(int bpfsock, uint32_t if_index)
1208 iface = get_iface_by_id(if_index);
1251 int *ret, if_index, count = 0, i = 0;
1265 if ((if_index = if_nametoindex(iface_conf->name)) == 0)
1271 ret[i++] = if_index;
1274 ret[i++] = if_index;
1278 if ((if_index = if_nametoindex(oiface_conf->name)) == 0)
1283 ret[i++] = if_index;