/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/ |
H A D | main.c | 33 static void advertise(struct sockaddr_in6 *sin6, struct phyint *pi, 35 static void solicit(struct sockaddr_in6 *sin6, struct phyint *pi); 37 static void check_if_removed(struct phyint *pi); 38 static void loopback_ra_enqueue(struct phyint *pi, 155 add_opt_lla(struct phyint *pi, struct nd_opt_lla *optp) in add_opt_lla() argument 162 if (phyint_get_lla(pi, &lifr) == -1) in add_opt_lla() 178 solicit(struct sockaddr_in6 *sin6, struct phyint *pi) in solicit() argument 193 packetlen += add_opt_lla(pi, (struct nd_opt_lla *)pptr); in solicit() 196 print_route_sol("Sending solicitation to ", pi, rs, packetlen, in solicit() 199 sendpacket(sin6, pi->pi_sock, packetlen, 0); in solicit() [all …]
|
H A D | tables.c | 37 static void phyint_print(struct phyint *pi); 38 static void phyint_insert(struct phyint *pi); 43 static void prefix_insert(struct phyint *pi, struct prefix *pr); 49 static void adv_prefix_insert(struct phyint *pi, struct adv_prefix *adv_pr); 53 static void router_insert(struct phyint *pi, struct router *dr); 65 struct phyint *pi; in phyint_lookup() local 70 for (pi = phyints; pi != NULL; pi = pi->pi_next) { in phyint_lookup() 71 if (strcmp(pi->pi_name, name) == 0) in phyint_lookup() 74 return (pi); in phyint_lookup() 80 struct phyint *pi; in phyint_lookup_on_index() local [all …]
|
H A D | ndp.c | 40 struct phyint *pi, struct sockaddr_in6 *from); 42 static void incoming_rs(struct phyint *pi, struct nd_router_solicit *rs, 45 void incoming_ra(struct phyint *pi, struct nd_router_advert *ra, 47 static void incoming_prefix_opt(struct phyint *pi, uchar_t *opt, 49 static void incoming_prefix_onlink(struct phyint *pi, uchar_t *opt); 53 static boolean_t incoming_prefix_addrconf(struct phyint *pi, 56 boolean_t incoming_prefix_addrconf_process(struct phyint *pi, 60 static void incoming_mtu_opt(struct phyint *pi, uchar_t *opt, 62 static void incoming_lla_opt(struct phyint *pi, uchar_t *opt, 65 static void verify_ra_consistency(struct phyint *pi, [all …]
|
H A D | tables.h | 257 extern int phyint_init_from_k(struct phyint *pi); 258 extern void phyint_delete(struct phyint *pi); 259 extern uint_t phyint_timer(struct phyint *pi, uint_t elapsed); 261 extern int phyint_get_lla(struct phyint *pi, struct lifreq *lifrp); 262 extern void phyint_reach_random(struct phyint *pi, 264 extern void phyint_cleanup(struct phyint *pi); 266 extern boolean_t tmptoken_create(struct phyint *pi); 267 extern void tmptoken_delete(struct phyint *pi); 268 extern uint_t tmptoken_timer(struct phyint *pi, uint_t elapsed); 272 extern struct prefix *prefix_create(struct phyint *pi, struct in6_addr addr, [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/ |
H A D | mpd_tables.c | 46 static void phyint_insert(struct phyint *pi, struct phyint_group *pg); 47 static void phyint_delete(struct phyint *pi); 48 static boolean_t phyint_is_usable(struct phyint *pi); 65 static int phyint_state_event(struct phyint_group *pg, struct phyint *pi); 68 static int phyint_group_member_event(struct phyint_group *pg, struct phyint *pi, 71 static int logint_upcount(struct phyint *pi); 92 struct phyint *pi; in phyint_lookup() local 97 for (pi = phyints; pi != NULL; pi = pi->pi_next) { in phyint_lookup() 98 if (strncmp(pi->pi_name, name, sizeof (pi->pi_name)) == 0) in phyint_lookup() 101 return (pi); in phyint_lookup() [all …]
|
H A D | mpd_probe.c | 78 static boolean_t phyint_repaired(struct phyint *pi); 1024 struct phyint *pi; in check_pg_crtt_improved() local 1033 for (pi = pg->pg_phyint; pi != NULL; pi = pi->pi_pgnext) { in check_pg_crtt_improved() 1034 if (!check_pii_crtt_improved(pi->pi_v4) || in check_pg_crtt_improved() 1035 !check_pii_crtt_improved(pi->pi_v6)) in check_pg_crtt_improved() 1127 struct phyint *pi; in incoming_mcast_reply() local 1174 pi = pii->pii_phyint; in incoming_mcast_reply() 1175 if (pi->pi_group == phyint_anongroup) { in incoming_mcast_reply() 1178 pi = pi->pi_group->pg_phyint; in incoming_mcast_reply() 1179 for (; pi != NULL; pi = pi->pi_pgnext) in incoming_mcast_reply() [all …]
|
H A D | mpd_tables.h | 76 #define PHYINT_INSTANCE(pi, af) \ argument 77 ((af) == AF_INET ? (pi)->pi_v4 : (pi)->pi_v6) 127 #define LINK_DOWN(pi) ((pi)->pi_link_state == 0) argument 128 #define LINK_UP(pi) (!LINK_DOWN(pi)) argument 129 #define FLAGS_TO_LINK_STATE(pi) (((pi)->pi_flags & IFF_RUNNING) != 0) argument 130 #define UPDATE_LINK_STATE(pi) ((pi)->pi_link_state = \ argument 131 FLAGS_TO_LINK_STATE(pi) ? 1 : 0) 132 #define INIT_LINK_STATE(pi) ((pi)->pi_link_state = 1) argument 421 extern void phyint_changed(struct phyint *pi); 422 extern void phyint_chstate(struct phyint *pi, enum pi_state state); [all …]
|
H A D | mpd_main.c | 482 struct phyint *pi; in check_addr_unique() local 508 for (pi = pg->pg_phyint; pi != NULL; pi = pi->pi_pgnext) { in check_addr_unique() 509 pii = PHYINT_INSTANCE(pi, ss->ss_family); in check_addr_unique() 528 stop_probing(struct phyint *pi) in stop_probing() argument 532 pii = pi->pi_v4; in stop_probing() 539 pii = pi->pi_v6; in stop_probing() 546 phyint_chstate(pi, PI_OFFLINE); in stop_probing() 583 struct phyint *pi; in select_test_ifs() local 767 for (pi = phyints; pi != NULL; pi = pi->pi_next) { in select_test_ifs() 768 if ((!PROBE_ENABLED(pi->pi_v4) && !PROBE_ENABLED(pi->pi_v6)) && in select_test_ifs() [all …]
|
/illumos-gate/usr/src/cmd/bhyve/common/ |
H A D | pci_emul.c | 160 static void pci_lintr_route(struct pci_devinst *pi); 161 static void pci_lintr_update(struct pci_devinst *pi); 166 CFGWRITE(struct pci_devinst *pi, int coff, uint32_t val, int bytes) in CFGWRITE() argument 170 pci_set_cfgdata8(pi, coff, val); in CFGWRITE() 172 pci_set_cfgdata16(pi, coff, val); in CFGWRITE() 174 pci_set_cfgdata32(pi, coff, val); in CFGWRITE() 178 CFGREAD(struct pci_devinst *pi, int coff, int bytes) in CFGREAD() argument 182 return (pci_get_cfgdata8(pi, coff)); in CFGREAD() 184 return (pci_get_cfgdata16(pi, coff)); in CFGREAD() 186 return (pci_get_cfgdata32(pi, coff)); in CFGREAD() [all …]
|
H A D | pci_passthru.c | 112 struct ppt_cfg_io pi; in passthru_read_config() local 114 pi.pci_off = reg; in passthru_read_config() 115 pi.pci_width = width; in passthru_read_config() 117 if (ioctl(sc->pptfd, PPT_CFG_READ, &pi) != 0) { in passthru_read_config() 120 return (pi.pci_data); in passthru_read_config() 127 struct ppt_cfg_io pi; in passthru_write_config() local 129 pi.pci_off = reg; in passthru_write_config() 130 pi.pci_width = width; in passthru_write_config() 131 pi.pci_data = data; in passthru_write_config() 133 (void) ioctl(sc->pptfd, PPT_CFG_WRITE, &pi); in passthru_write_config() [all …]
|
H A D | pci_emul.h | 66 int (*pe_cfgwrite)(struct pci_devinst *pi, int offset, 68 int (*pe_cfgread)(struct pci_devinst *pi, int offset, 72 void (*pe_barwrite)(struct pci_devinst *pi, int baridx, 74 uint64_t (*pe_barread)(struct pci_devinst *pi, int baridx, 77 void (*pe_baraddr)(struct pci_devinst *pi, 80 void (*pe_lintrupdate)(struct pci_devinst *pi); 236 int pci_emul_add_boot_device(struct pci_devinst *const pi, 238 int pci_emul_add_msicap(struct pci_devinst *pi, int msgnum); 239 int pci_emul_add_pciecap(struct pci_devinst *pi, int pcie_device_type); 240 void pci_emul_capwrite(struct pci_devinst *pi, int offset, int bytes, [all …]
|
H A D | pci_uart.c | 51 struct pci_devinst *pi = arg; in pci_uart_intr_assert() local 53 pci_lintr_assert(pi); in pci_uart_intr_assert() 59 struct pci_devinst *pi = arg; in pci_uart_intr_deassert() local 61 pci_lintr_deassert(pi); in pci_uart_intr_deassert() 65 pci_uart_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, in pci_uart_write() argument 71 uart_ns16550_write(pi->pi_arg, offset, value); in pci_uart_write() 75 pci_uart_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) in pci_uart_read() argument 82 val = uart_ns16550_read(pi->pi_arg, offset); in pci_uart_read() 96 pci_uart_init(struct pci_devinst *pi, nvlist_t *nvl) in pci_uart_init() argument 101 pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_NS16550_IO_BAR_SIZE); in pci_uart_init() [all …]
|
H A D | pci_virtio_viona.c | 184 pci_viona_iosize(struct pci_devinst *pi) in pci_viona_iosize() argument 186 if (pci_msix_enabled(pi)) { in pci_viona_iosize() 721 pci_viona_init(struct pci_devinst *pi, nvlist_t *nvl) in pci_viona_init() argument 778 error = pci_viona_viona_init(pi->pi_vmctx, sc); in pci_viona_init() 795 pci_set_cfgdata16(pi, PCIR_DEVICE, VIRTIO_DEV_NET); in pci_viona_init() 796 pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); in pci_viona_init() 797 pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); in pci_viona_init() 798 pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_ID_NETWORK); in pci_viona_init() 799 pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); in pci_viona_init() 810 vi_softc_linkup(&sc->vsc_vs, &sc->vsc_consts, sc, pi, sc->vsc_queues); in pci_viona_init() [all …]
|
H A D | pci_irq.c | 157 pci_irq_assert(struct pci_devinst *pi) in pci_irq_assert() argument 162 pin = pi->pi_lintr.pirq_pin; in pci_irq_assert() 169 vm_isa_assert_irq(pi->pi_vmctx, pirq->reg & PIRQ_IRQ, in pci_irq_assert() 170 pi->pi_lintr.ioapic_irq); in pci_irq_assert() 176 vm_ioapic_assert_irq(pi->pi_vmctx, pi->pi_lintr.ioapic_irq); in pci_irq_assert() 180 pci_irq_deassert(struct pci_devinst *pi) in pci_irq_deassert() argument 185 pin = pi->pi_lintr.pirq_pin; in pci_irq_deassert() 192 vm_isa_deassert_irq(pi->pi_vmctx, pirq->reg & PIRQ_IRQ, in pci_irq_deassert() 193 pi->pi_lintr.ioapic_irq); in pci_irq_deassert() 199 vm_ioapic_deassert_irq(pi->pi_vmctx, pi->pi_lintr.ioapic_irq); in pci_irq_deassert() [all …]
|
H A D | pci_fbuf.c | 120 pci_fbuf_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, in pci_fbuf_write() argument 128 sc = pi->pi_arg; in pci_fbuf_write() 174 pci_fbuf_read(struct pci_devinst *pi, int baridx, uint64_t offset, int size) in pci_fbuf_read() argument 182 sc = pi->pi_arg; in pci_fbuf_read() 219 pci_fbuf_baraddr(struct pci_devinst *pi, int baridx, int enabled, in pci_fbuf_baraddr() argument 228 sc = pi->pi_arg; in pci_fbuf_baraddr() 230 if (vm_munmap_memseg(pi->pi_vmctx, sc->fbaddr, FB_SIZE) != 0) in pci_fbuf_baraddr() 235 if (vm_mmap_memseg(pi->pi_vmctx, address, VM_FRAMEBUFFER, 0, in pci_fbuf_baraddr() 376 pci_fbuf_init(struct pci_devinst *pi, nvlist_t *nvl) in pci_fbuf_init() argument 388 pi->pi_arg = sc; in pci_fbuf_init() [all …]
|
/illumos-gate/usr/src/uts/common/io/cxgbe/t4nex/ |
H A D | t4_mac.c | 53 static int t4_init_synchronized(struct port_info *pi); 54 static int t4_uninit_synchronized(struct port_info *pi); 55 static void propinfo(struct port_info *pi, const char *name, 57 static int getprop(struct port_info *pi, const char *name, uint_t size, 59 static int setprop(struct port_info *pi, const char *name, const void *val); 208 t4_port_to_media(struct port_info *pi) in t4_port_to_media() argument 211 struct link_config *lc = &pi->link_cfg; in t4_port_to_media() 221 switch (pi->port_type) { in t4_port_to_media() 232 switch (pi->mod_type) { in t4_port_to_media() 312 struct port_info *pi = arg; in t4_mc_getstat() local [all …]
|
H A D | adapter.h | 91 #define IS_DOOMED(pi) (pi->flags & DOOMED) argument 92 #define SET_DOOMED(pi) do { pi->flags |= DOOMED; } while (0) argument 553 #define PORT_LOCK(pi) mutex_enter(&(pi)->lock) argument 554 #define PORT_UNLOCK(pi) mutex_exit(&(pi)->lock) argument 555 #define PORT_LOCK_ASSERT_OWNED(pi) ASSERT(mutex_owned(&(pi)->lock)) argument 556 #define PORT_LOCK_ASSERT_NOTOWNED(pi) ASSERT(!mutex_owned(&(pi)->lock)) argument 588 #define for_each_txq(pi, iter, txq) \ argument 589 txq = &pi->adapter->sge.txq[pi->first_txq]; \ 590 for (iter = 0; iter < pi->ntxq; ++iter, ++txq) 591 #define for_each_rxq(pi, iter, rxq) \ argument [all …]
|
H A D | t4_nexus.c | 509 struct port_info *pi; in t4_devo_attach() local 511 pi = kmem_zalloc(sizeof (*pi), KM_SLEEP); in t4_devo_attach() 512 sc->port[i] = pi; in t4_devo_attach() 515 pi->adapter = sc; in t4_devo_attach() 517 pi->port_id = i; in t4_devo_attach() 528 struct port_info *pi = sc->port[i]; in t4_devo_attach() local 530 mutex_init(&pi->lock, NULL, MUTEX_DRIVER, NULL); in t4_devo_attach() 531 pi->mtu = ETHERMTU; in t4_devo_attach() 533 if (is_10XG_port(pi)) { in t4_devo_attach() 535 pi->tmr_idx = prp->tmr_idx_10g; in t4_devo_attach() [all …]
|
/illumos-gate/usr/src/boot/common/ |
H A D | pnp.c | 35 struct pnpinfo *pi; in pnp_scan() local 72 STAILQ_FOREACH(pi, &pnp_devices, pi_link) { in pnp_scan() 73 pager_output(STAILQ_FIRST(&pi->pi_ident)->id_ident); /* first ident should be canonical */ in pnp_scan() 74 if (pi->pi_desc != NULL) { in pnp_scan() 76 pager_output(pi->pi_desc); in pnp_scan() 91 struct pnpinfo *pi; in pnp_discard() local 94 pi = STAILQ_FIRST(&pnp_devices); in pnp_discard() 96 pnp_freeinfo(pi); in pnp_discard() 104 pnp_addident(struct pnpinfo *pi, char *ident) in pnp_addident() argument 108 STAILQ_FOREACH(id, &pi->pi_ident, id_link) in pnp_addident() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc/ |
H A D | in.rdisc.c | 157 struct phyint *pi); 169 static void free_phyint(struct phyint *pi); 170 static struct logint *find_logint(struct phyint *pi, char *name); 171 static struct logint *add_logint(struct phyint *pi, char *name); 174 static void deleted_phyint(struct phyint *pi, int s, 606 struct phyint *pi; in advertise() local 618 for (pi = phyint; pi != NULL; pi = pi->pi_next) { in advertise() 627 for (li = pi->pi_logical_first; li != NULL; li = li->li_next) { in advertise() 656 pi->pi_logical_first); in advertise() 659 pi->pi_logical_first); in advertise() [all …]
|
/illumos-gate/usr/src/test/util-tests/tests/smbios/ |
H A D | smbios_test_pinfo.c | 36 smb_processor_info_t pi; in smbios_test_pinfo_mktable_amd64() local 38 pi.smbpai_hdr.smbh_type = SMB_TYPE_PROCESSOR_INFO; in smbios_test_pinfo_mktable_amd64() 39 pi.smbpai_hdr.smbh_len = sizeof (smb_processor_info_t); in smbios_test_pinfo_mktable_amd64() 40 pi.smbpai_proc = htole16(smbios_pinfo_phandle); in smbios_test_pinfo_mktable_amd64() 41 pi.smbpai_len = 0; in smbios_test_pinfo_mktable_amd64() 42 pi.smbpai_type = SMB_PROCINFO_T_AMD64; in smbios_test_pinfo_mktable_amd64() 44 (void) smbios_test_table_append(table, &pi, sizeof (pi)); in smbios_test_pinfo_mktable_amd64() 107 smb_processor_info_t pi; in smbios_test_pinfo_mktable_riscv() local 110 pi.smbpai_hdr.smbh_type = SMB_TYPE_PROCESSOR_INFO; in smbios_test_pinfo_mktable_riscv() 111 pi.smbpai_hdr.smbh_len = sizeof (smb_processor_info_t) + in smbios_test_pinfo_mktable_riscv() [all …]
|
/illumos-gate/usr/src/cmd/troff/troff.d/ |
H A D | t10.c | 284 ptout0(pi) in ptout0() argument 285 tchar *pi; in ptout0() 293 i = *pi; 303 return(pi+outsize); 317 pi++; 318 while( cbits(*pi) != XOFF && pi < olinep ) 319 outascii(*pi++); 321 if ( cbits(*pi) == XOFF ) 322 pi++; 323 return pi; [all …]
|
/illumos-gate/usr/src/lib/fm/topo/modules/common/pcibus/ |
H A D | pcibus_hba.c | 71 di_node_t cn, int instance, di_path_t pi) in pci_scsi_device_create() argument 88 if (pi != NULL) { in pci_scsi_device_create() 89 pci_pi_prop_set(child, pi, SCSI_ADDR_PROP_TARGET_PORT, in pci_scsi_device_create() 91 pci_pi_prop_set(child, pi, SCSI_ADDR_PROP_ATTACHED_PORT, in pci_scsi_device_create() 93 pci_pi_prop_set(child, pi, SCSI_ADDR_PROP_TARGET_PORT_PM, in pci_scsi_device_create() 95 pci_pi_prop_set(child, pi, SCSI_ADDR_PROP_ATTACHED_PORT_PM, in pci_scsi_device_create() 97 if (di_path_prop_lookup_int64s(pi, in pci_scsi_device_create() 194 di_path_t pi; in pci_iports_instantiate() local 220 for (pi = di_path_phci_next_path(cn, DI_PATH_NIL); in pci_iports_instantiate() 221 pi != DI_PATH_NIL; pi = di_path_phci_next_path(cn, pi)) in pci_iports_instantiate() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
H A D | inetd.c | 245 struct method_context *mthd_ctxt, const proto_info_t *pi) __NORETURN; 837 proto_info_t *pi; in poll_bound_fds() local 840 for (pi = uu_list_first(cfg->proto_list); pi != NULL; in poll_bound_fds() 841 pi = uu_list_next(cfg->proto_list, pi)) { in poll_bound_fds() 842 if (pi->listen_fd != -1) { /* fd bound */ in poll_bound_fds() 844 strcmp(pi->proto, proto_name) == 0) { in poll_bound_fds() 846 clear_pollfd(pi->listen_fd); in poll_bound_fds() 847 } else if (set_pollfd(pi->listen_fd, in poll_bound_fds() 884 proto_info_t *pi; in handle_bind_failure() local 892 for (pi = uu_list_first(cfg->proto_list); pi != NULL; in handle_bind_failure() [all …]
|
/illumos-gate/usr/src/test/util-tests/tests/awk/gnu/ |
H A D | math.awk | 2 pi = 3.1415927 3 printf "cos(%f) = %f\n", pi/4, cos(pi/4) 4 printf "sin(%f) = %f\n", pi/4, sin(pi/4) 8 printf "sqrt(pi ^ 2) = %f\n", sqrt(pi ^ 2)
|