/illumos-gate/usr/src/lib/libinetutil/common/ |
H A D | eh.c | 58 iu_eh_t *eh = malloc(sizeof (iu_eh_t)); in iu_eh_create() local 61 if (eh == NULL) in iu_eh_create() 64 eh->iueh_pollfds = NULL; in iu_eh_create() 65 eh->iueh_events = NULL; in iu_eh_create() 66 eh->iueh_shutdown = NULL; in iu_eh_create() 67 eh->iueh_num_fds = 0; in iu_eh_create() 68 eh->iueh_stop = B_FALSE; in iu_eh_create() 69 eh->iueh_reason = 0; in iu_eh_create() 70 eh->iueh_shutdown_arg = NULL; in iu_eh_create() 72 (void) sigemptyset(&eh->iueh_sig_regset); in iu_eh_create() [all …]
|
/illumos-gate/usr/src/boot/libsa/ |
H A D | ether.c | 59 struct ether_header *eh; in sendether() local 66 eh = (struct ether_header *)pkt - 1; in sendether() 67 len += sizeof (*eh); in sendether() 69 MACPY(d->myea, eh->ether_shost); /* by byte */ in sendether() 70 MACPY(dea, eh->ether_dhost); /* by byte */ in sendether() 71 eh->ether_type = htons(etype); in sendether() 73 n = netif_put(d, eh, len); in sendether() 74 if (n == -1 || n < sizeof (*eh)) in sendether() 77 n -= sizeof (*eh); in sendether() 92 struct ether_header *eh; in readether() local [all …]
|
H A D | arp.c | 78 struct ether_header eh; in arpwhohas() member 127 struct ether_header *eh; in arpwhohas() local 129 eh = (struct ether_header *)((uintptr_t)pkt + ETHER_ALIGN); in arpwhohas() 131 ether_sprintf(eh->ether_shost)); in arpwhohas()
|
H A D | ip.c | 185 struct ether_header *eh; in readipv4() local 366 eh = (struct ether_header *)((uintptr_t)ipr->ip_pkt + 2); in readipv4() 367 bcopy((void *)((uintptr_t)ipq->ipq_pkt + 2), eh, sizeof (*eh)); in readipv4() 370 ipr->ip_hdr = (struct ip *)((uintptr_t)eh + sizeof (*eh)); in readipv4()
|
/illumos-gate/usr/src/cmd/sgs/libelf/common/ |
H A D | update.c | 166 Ehdr * eh = elf->ed_ehdr; in _elf_upd_lib() local 167 unsigned ver = eh->e_version; in _elf_upd_lib() 168 register char *p = (char *)eh->e_ident; in _elf_upd_lib() 183 eh->e_ehsize = (Half)hi; in _elf_upd_lib() 184 if (eh->e_phnum != 0) { in _elf_upd_lib() 186 eh->e_phentsize = (Half)elf_fsize(ELF_T_PHDR, 1, ver); in _elf_upd_lib() 188 eh->e_phoff = (Off)hi; in _elf_upd_lib() 189 hi += eh->e_phentsize * eh->e_phnum; in _elf_upd_lib() 191 eh->e_phoff = 0; in _elf_upd_lib() 192 eh->e_phentsize = 0; in _elf_upd_lib() [all …]
|
H A D | clscook.c | 293 Ehdr * eh = elf->ed_ehdr; /* must be present */ in _elf_phdr() local 296 if (eh->e_phnum == 0) in _elf_phdr() 300 if (eh->e_phentsize != fsz) { in _elf_phdr() 305 fsz *= eh->e_phnum; in _elf_phdr() 307 msz = _elf_msize(ELF_T_PHDR, work) * eh->e_phnum; in _elf_phdr() 308 if ((eh->e_phoff == 0) || in _elf_phdr() 309 (elf->ed_fsz <= eh->e_phoff) || in _elf_phdr() 310 (elf->ed_fsz - eh->e_phoff < fsz)) { in _elf_phdr() 315 if (inplace && fsz >= msz && eh->e_phoff % sizeof (ElfField) == 0) { in _elf_phdr() 316 elf->ed_phdr = (Elf_Void *)(elf->ed_ident + eh->e_phoff); in _elf_phdr() [all …]
|
H A D | newehdr.c | 64 Ehdr *eh; in elf_newehdr() local 76 if ((eh = (Ehdr *)getehdr(elf)) != 0) { in elf_newehdr() 81 return (eh); in elf_newehdr() 96 if ((eh = (Ehdr *)getehdr(elf)) != 0) { /* this cooks if necessary */ in elf_newehdr() 100 return (eh); in elf_newehdr() 104 if ((eh = (Ehdr *)malloc(sizeof (Ehdr))) == 0) { in elf_newehdr() 109 *eh = _elf_ehdr_init; in elf_newehdr() 112 elf->ed_ehdr = eh; in elf_newehdr() 114 return (eh); in elf_newehdr()
|
/illumos-gate/usr/src/uts/i86pc/dboot/ |
H A D | dboot_elfload.c | 78 Elf64_Ehdr *eh; in dboot_elfload64() local 92 eh = getehdr(); in dboot_elfload64() 93 if (eh == NULL) in dboot_elfload64() 96 if (eh->e_type != ET_EXEC) in dboot_elfload64() 97 dboot_panic("not ET_EXEC, e_type = 0x%x", eh->e_type); in dboot_elfload64() 99 if (eh->e_phnum == 0 || eh->e_phoff == 0) in dboot_elfload64() 105 allphdrs = PGETBYTES(eh->e_phoff); in dboot_elfload64() 108 eh->e_phnum); in dboot_elfload64() 113 sechdrs = PGETBYTES(eh->e_shoff); in dboot_elfload64() 116 eh->e_shnum); in dboot_elfload64() [all …]
|
/illumos-gate/usr/src/tools/elfextract/ |
H A D | elfextract.c | 55 extract32(Elf32_Ehdr *eh) in extract32() argument 66 if (eh->e_type != ET_EXEC) { in extract32() 68 pname, eh->e_type); in extract32() 71 if (eh->e_phnum == 0 || eh->e_phoff == 0) { in extract32() 79 allphdrs = ELFSEEK(eh->e_phoff); in extract32() 82 pname, eh->e_phnum); in extract32() 89 for (i = 0; i < eh->e_phnum; i++) { in extract32() 91 phdr = (Elf32_Phdr *)(allphdrs + eh->e_phentsize * i); in extract32() 125 extract64(Elf64_Ehdr *eh) in extract64() argument 136 if (eh->e_type != ET_EXEC) { in extract64() [all …]
|
/illumos-gate/usr/src/tools/btxld/ |
H A D | btxld.c | 418 struct elfh eh; in puthdr() local 434 eh = elfhdr; in puthdr() 435 eh.e.e_entry = htole32(hdr->entry); in puthdr() 436 eh.p[0].p_vaddr = eh.p[0].p_paddr = htole32(hdr->org); in puthdr() 437 eh.p[0].p_filesz = eh.p[0].p_memsz = htole32(hdr->text); in puthdr() 438 eh.p[1].p_offset = htole32(le32toh(eh.p[0].p_offset) + in puthdr() 439 le32toh(eh.p[0].p_filesz)); in puthdr() 440 eh.p[1].p_vaddr = eh.p[1].p_paddr = in puthdr() 441 htole32(align(le32toh(eh.p[0].p_paddr) + le32toh(eh.p[0].p_memsz), in puthdr() 443 eh.p[1].p_filesz = eh.p[1].p_memsz = htole32(hdr->data); in puthdr() [all …]
|
/illumos-gate/usr/src/tools/mbh_patch/ |
H A D | mbh_patch.c | 105 patch64(Elf64_Ehdr *eh) in patch64() argument 117 if (eh->e_type != ET_EXEC) { in patch64() 119 pname, fname, eh->e_type); in patch64() 122 if ((eh->e_phnum == 0) || (eh->e_phoff == 0)) { in patch64() 131 if ((phdrs = ELFSEEK(eh->e_phoff)) == NULL) { in patch64() 133 "hdrs\n", pname, fname, eh->e_phnum); in patch64() 180 for (ndx = 0; ndx < eh->e_phnum; ndx++) { in patch64() 182 phdr = (Elf64_Phdr *)(phdrs + eh->e_phentsize * ndx); in patch64() 207 if (eh->e_entry != phdr->p_paddr) { in patch64()
|
/illumos-gate/usr/src/stand/lib/inet/ |
H A D | ethernet.c | 294 struct ether_header *eh; in ether_input() local 378 eh = (struct ether_header *)mac_state.mac_buf; in ether_input() 379 if (eh->ether_type == ntohs(ETHERTYPE_IP) && in ether_input() 416 if (eh->ether_type == ntohs(ETHERTYPE_ARP) && in ether_input() 442 (caddr_t)&eh->ether_dhost, in ether_input() 445 (caddr_t)&eh->ether_shost, in ether_input() 494 struct ether_header eh; in ether_output() local 528 eh.ether_type = htons(ETHERTYPE_IP); in ether_output() 529 bcopy(mac_state.mac_addr_buf, (caddr_t)&eh.ether_shost, in ether_output() 558 result = mac_get_arp(&tmpip, (void *)&eh.ether_dhost, in ether_output() [all …]
|
H A D | ibd.c | 293 ipoib_ptxhdr_t *eh; in ibd_input() local 378 eh = (ipoib_ptxhdr_t *)mac_state.mac_buf; in ibd_input() 379 if (eh->ipoib_rhdr.ipoib_type == ntohs(ETHERTYPE_IP) && in ibd_input() 415 if (eh->ipoib_rhdr.ipoib_type == ntohs(ETHERTYPE_ARP) && in ibd_input() 440 (caddr_t)&eh->ipoib_dest, IPOIB_ADDRL); in ibd_input() 486 ipoib_ptxhdr_t eh; in ibd_output() local 515 eh.ipoib_rhdr.ipoib_type = htons(ETHERTYPE_IP); in ibd_output() 516 eh.ipoib_rhdr.ipoib_mbz = 0; in ibd_output() 536 result = mac_get_arp(&tmpip, (void *)&eh.ipoib_dest, in ibd_output() 548 bcopy((caddr_t)&ibdbroadcastaddr, (caddr_t)&eh.ipoib_dest, in ibd_output() [all …]
|
/illumos-gate/usr/src/boot/i386/isoboot/ |
H A D | isoboot.c | 345 Elf32_Ehdr eh; in load() member 369 else if (IS_ELF(hdr.eh)) in load() 402 fs_off = hdr.eh.e_phoff; in load() 403 for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { in load() 417 if (hdr.eh.e_shnum == hdr.eh.e_shstrndx + 3) { in load() 418 fs_off = hdr.eh.e_shoff + sizeof (es[0]) * in load() 419 (hdr.eh.e_shstrndx + 1); in load() 432 addr = hdr.eh.e_entry & 0xffffff; in load()
|
/illumos-gate/usr/src/lib/varpd/libvarpd/common/ |
H A D | libvarpd_arp.c | 619 struct ether_vlan_header *eh; in libvarpd_inject_arp() local 620 eh = (struct ether_vlan_header *)(buf + bsize); in libvarpd_inject_arp() 622 bcopy(dstmac, &eh->ether_dhost, ETHERADDRL); in libvarpd_inject_arp() 623 bcopy(srcmac, &eh->ether_shost, ETHERADDRL); in libvarpd_inject_arp() 624 eh->ether_tpid = htons(ETHERTYPE_VLAN); in libvarpd_inject_arp() 625 eh->ether_tci = htons(VLAN_TCI(0, ETHER_CFI, vlan)); in libvarpd_inject_arp() 626 eh->ether_type = htons(ETHERTYPE_ARP); in libvarpd_inject_arp() 628 struct ether_header *eh; in libvarpd_inject_arp() local 629 eh = (struct ether_header *)(buf + bsize); in libvarpd_inject_arp() 631 bcopy(dstmac, &eh->ether_dhost, ETHERADDRL); in libvarpd_inject_arp() [all …]
|
/illumos-gate/usr/src/uts/common/io/mac/plugins/ |
H A D | mac_wifi.c | 409 struct ether_header eh; in mac_wifi_header_uncook() local 425 IEEE80211_ADDR_COPY(&eh.ether_dhost, mhi.mhi_daddr); in mac_wifi_header_uncook() 426 IEEE80211_ADDR_COPY(&eh.ether_shost, mhi.mhi_saddr); in mac_wifi_header_uncook() 427 eh.ether_type = htons(mhi.mhi_origsap); in mac_wifi_header_uncook() 431 bcopy(&eh, mp->b_rptr, sizeof (struct ether_header)); in mac_wifi_header_uncook()
|
/illumos-gate/usr/src/boot/i386/gptzfsboot/ |
H A D | zfsboot.c | 371 Elf32_Ehdr eh; in load() member 389 } else if (IS_ELF(hdr.eh)) { in load() 433 lseek(fd, hdr.eh.e_phoff, SEEK_SET); in load() 434 for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { in load() 453 if (hdr.eh.e_shnum == hdr.eh.e_shstrndx + 3) { in load() 454 lseek(fd, hdr.eh.e_shoff + in load() 455 sizeof (es[0]) * (hdr.eh.e_shstrndx + 1), in load() 474 addr = hdr.eh.e_entry & 0xffffff; in load()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/bridged/ |
H A D | events.c | 489 struct ether_header *eh; in receive_packet() local 519 eh = (struct ether_header *)buffer; in receive_packet() 520 rc = STP_IN_check_bpdu_header((BPDU_T *)&eh->ether_type, buflen); in receive_packet() 531 (void) _link_ntoa(eh->ether_shost.ether_addr_octet, in receive_packet() 546 (void) _link_ntoa(eh->ether_shost.ether_addr_octet, in receive_packet() 552 (BPDU_T *)&eh->ether_type, buflen); in receive_packet() 555 (void) _link_ntoa(eh->ether_shost.ether_addr_octet, sender, in receive_packet()
|
/illumos-gate/usr/src/lib/libinetutil/ |
H A D | Makefile.com | 29 OBJECTS = octet.o inetutil.o ifspec.o ifaddrlist.o ifaddrlistx.o eh.o tq.o 41 $(SRCDIR)/ifspec.c $(SRCDIR)/eh.c $(SRCDIR)/tq.c \
|
/illumos-gate/usr/src/cmd/cmd-inet/sbin/dhcpagent/ |
H A D | agent.c | 67 iu_eh_t *eh; variable 210 eh = iu_eh_create(); in main() 212 if (eh == NULL || tq == NULL) { in main() 235 (void) iu_eh_register_signal(eh, SIGTHAW, refresh_smachs, NULL); in main() 294 if (iu_register_event(eh, ipc_fd, POLLIN, accept_event, 0) == -1) { in main() 322 if (iu_register_event(eh, rtsock_fd, POLLIN, rtsock_event, 0) == -1) { in main() 351 switch (iu_handle_events(eh, tq)) { in main() 371 (void) iu_eh_unregister_signal(eh, SIGTHAW, NULL); in main() 373 iu_eh_destroy(eh); in main() 429 if (iu_register_event(eh, client_fd, POLLIN, ipc_event, in accept_event() [all …]
|
H A D | script_handler.c | 226 (void) iu_unregister_event(eh, dsmp->dsm_script_event_id, NULL); in script_cleanup() 344 event_id = iu_register_event(eh, fds[0], POLLIN, script_exit, dsmp); in script_start()
|
H A D | agent.h | 56 extern iu_eh_t *eh;
|
/illumos-gate/usr/src/uts/common/io/myri10ge/drv/ |
H A D | myri10ge_lro.c | 134 struct ether_header *eh; in myri10ge_lro_rx() local 144 eh = (struct ether_header *)(void *)m_head->b_rptr; in myri10ge_lro_rx() 145 if (eh->ether_type != htons(ETHERTYPE_IP)) in myri10ge_lro_rx() 147 ip = (struct ip *)(void *)(eh + 1); in myri10ge_lro_rx()
|
/illumos-gate/usr/src/uts/common/io/ppp/sppp/ |
H A D | sppp_dlpi.c | 1098 mblk_t *eh; in sppp_dladdether() local 1101 if ((eh = allocb(sizeof (struct ether_header), BPRI_MED)) == NULL) { in sppp_dladdether() 1122 eh->b_wptr += sizeof (struct ether_header); in sppp_dladdether() 1123 bzero((caddr_t)eh->b_rptr, sizeof (struct ether_header)); in sppp_dladdether() 1124 ((struct ether_header *)eh->b_rptr)->ether_type = htons((int16_t)type); in sppp_dladdether() 1126 linkb(eh, mp); in sppp_dladdether() 1127 return (eh); in sppp_dladdether()
|
/illumos-gate/usr/src/boot/common/ |
H A D | bootstrap.h | 377 void (*arch_loadseg)(Elf_Ehdr *eh, Elf_Phdr *ph, uint64_t delta); 379 void (*arch_loadseg)(void *eh, void *ph, uint64_t delta);
|