Lines Matching refs:phyi
314 struct physical_interface *phyi; in if_link() local
325 for (phyi = HFIRST(&ihash_tbl, &ifindex); in if_link()
326 phyi != NULL; phyi = phyi->phyi_link.hl_next) { in if_link()
327 if (phyi->phyi_index == ifindex) in if_link()
330 if (phyi == NULL) { in if_link()
333 phyi = rtmalloc(sizeof (*phyi), "physical_interface"); in if_link()
334 (void) memset(phyi, 0, sizeof (*phyi)); in if_link()
335 phyi->phyi_index = ifindex; in if_link()
340 (void) strncpy(phyi->phyi_name, ifp->int_name, in if_link()
342 phyi->phyi_name[size] = '\0'; in if_link()
343 HADD(&ihash_tbl, phyi); in if_link()
345 link_in((void **)&phyi->phyi_interface, ifp, in if_link()
347 ifp->int_phys = phyi; in if_link()
420 struct physical_interface *phyi; in phys_byname() local
424 for (phyi = ihash_tbl.htbl_ptrs[i]; phyi != NULL; in phys_byname()
425 phyi = phyi->phyi_link.hl_next) { in phys_byname()
426 if (strncmp(phyi->phyi_name, name, nlen) == 0 && in phys_byname()
427 phyi->phyi_name[nlen] == '\0') in phys_byname()
428 return (phyi); in phys_byname()
469 struct physical_interface *phyi; in ifwithindex() local
472 for (phyi = HFIRST(&ihash_tbl, &index); phyi != NULL; in ifwithindex()
473 phyi = phyi->phyi_link.hl_next) { in ifwithindex()
474 if (phyi->phyi_index == index) in ifwithindex()
475 return (phyi->phyi_interface); in ifwithindex()
779 struct physical_interface *phyi; in ifdel() local
793 if ((phyi = ifp->int_phys) != NULL) { in ifdel()
795 if (phyi->phyi_interface == NULL) { in ifdel()
796 hash_unlink(&ihash_tbl, phyi); in ifdel()
797 free(phyi); in ifdel()
1048 struct physical_interface *phyi; in ifscan() local
1437 if ((phyi = ifp->int_phys) == NULL || in ifscan()
1438 now.tv_sec < phyi->phyi_data.ts + in ifscan()
1447 phyi->phyi_name); in ifscan()
1454 if (phyi->phyi_data.ts == 0) { in ifscan()
1455 phyi->phyi_data = newstats; in ifscan()
1459 in = newstats.ipackets - phyi->phyi_data.ipackets; in ifscan()
1460 ierr = newstats.ierrors - phyi->phyi_data.ierrors; in ifscan()
1461 out = newstats.opackets - phyi->phyi_data.opackets; in ifscan()
1462 oerr = newstats.oerrors - phyi->phyi_data.oerrors; in ifscan()
1463 phyi->phyi_data = newstats; in ifscan()
1926 struct physical_interface *phyi = ifp->int_phys; in get_if_kstats() local
1931 if (phyi->phyi_data.ts == now.tv_sec) { in get_if_kstats()
1932 if (newdata != &phyi->phyi_data) in get_if_kstats()
1933 *newdata = phyi->phyi_data; in get_if_kstats()
1944 if (((ksp = kstat_lookup(kc, "link", 0, phyi->phyi_name)) == NULL) && in get_if_kstats()
1945 ((ksp = kstat_lookup(kc, NULL, -1, phyi->phyi_name)) == NULL)) { in get_if_kstats()