Home
last modified time | relevance | path

Searched refs:eh (Results 1 – 25 of 47) sorted by relevance

12

/illumos-gate/usr/src/lib/libinetutil/common/
H A Deh.c61 if (eh == NULL) in iu_eh_create()
67 eh->iueh_num_fds = 0; in iu_eh_create()
69 eh->iueh_reason = 0; in iu_eh_create()
79 return (eh); in iu_eh_create()
101 free(eh->iueh_events); in iu_eh_destroy()
102 free(eh); in iu_eh_destroy()
287 n_lit = poll(eh->iueh_pollfds, eh->iueh_num_fds, timeout); in iu_handle_events()
301 eh->iueh_sig_info[sig].iues_handler(eh, in iu_handle_events()
345 eh->iueh_events[i].iuen_callback(eh, i, in iu_handle_events()
350 } while (eh->iueh_stop == B_FALSE || (eh->iueh_shutdown != NULL && in iu_handle_events()
[all …]
/illumos-gate/usr/src/boot/libsa/
H A Dether.c59 struct ether_header *eh; in sendether() local
67 len += sizeof (*eh); 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
102 if (n == -1 || n < sizeof (*eh)) { in readether()
121 *payload = (void *)((uintptr_t)eh + sizeof (*eh)); in readether()
122 *etype = ntohs(eh->ether_type); in readether()
[all …]
H A Darp.c78 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 Dip.c185 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 Dupdate.c189 hi += eh->e_phentsize * eh->e_phnum; in _elf_upd_lib()
191 eh->e_phoff = 0; in _elf_upd_lib()
206 eh->e_shnum = 0; in _elf_upd_lib()
323 eh->e_shnum = 0; in _elf_upd_lib()
329 eh->e_shoff = 0; in _elf_upd_lib()
380 if ((sz = eh->e_phoff + eh->e_phentsize * eh->e_phnum) > hi) in _elf_upd_usr()
390 eh->e_shnum = 0; in _elf_upd_usr()
445 if ((sz = eh->e_shoff + eh->e_shentsize * scncnt) > hi) in _elf_upd_usr()
564 dst.d_size = eh->e_phnum * eh->e_phentsize; in wrt()
799 if (eh == 0) { in _elfxx_update()
[all …]
H A Dclscook.c296 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()
308 if ((eh->e_phoff == 0) || in _elf_phdr()
309 (elf->ed_fsz <= eh->e_phoff) || in _elf_phdr()
355 if ((eh->e_shnum == 0) && (eh->e_shoff == 0)) in _elf_shdr()
359 if (eh->e_shentsize != fsz) { in _elf_shdr()
369 if ((scncnt = eh->e_shnum) == 0) { in _elf_shdr()
371 if ((eh->e_shoff == 0) || in _elf_shdr()
393 if ((eh->e_shoff == 0) || in _elf_shdr()
[all …]
H A Dnewehdr.c64 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 Ddboot_elfload.c78 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()
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()
121 for (i = 0; i < eh->e_phnum; i++) { in dboot_elfload64()
[all …]
/illumos-gate/usr/src/tools/elfextract/
H A Delfextract.c55 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()
125 extract64(Elf64_Ehdr *eh) in extract64() argument
136 if (eh->e_type != ET_EXEC) { in extract64()
138 pname, eh->e_type); in extract64()
141 if (eh->e_phnum == 0 || eh->e_phoff == 0) { in extract64()
[all …]
/illumos-gate/usr/src/tools/btxld/
H A Dbtxld.c434 eh = elfhdr; in puthdr()
436 eh.p[0].p_vaddr = eh.p[0].p_paddr = htole32(hdr->org); in puthdr()
438 eh.p[1].p_offset = htole32(le32toh(eh.p[0].p_offset) + in puthdr()
440 eh.p[1].p_vaddr = eh.p[1].p_paddr = in puthdr()
444 eh.sh[2].sh_addr = eh.p[0].p_vaddr; in puthdr()
445 eh.sh[2].sh_offset = eh.p[0].p_offset; in puthdr()
446 eh.sh[2].sh_size = eh.p[0].p_filesz; in puthdr()
447 eh.sh[3].sh_addr = eh.p[1].p_vaddr; in puthdr()
448 eh.sh[3].sh_offset = eh.p[1].p_offset; in puthdr()
449 eh.sh[3].sh_size = eh.p[1].p_filesz; in puthdr()
[all …]
/illumos-gate/usr/src/tools/mbh_patch/
H A Dmbh_patch.c105 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 Dethernet.c294 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()
571 (caddr_t)&eh.ether_dhost, sizeof (ether_addr_t)); in ether_output()
575 mp->b_rptr -= sizeof (eh); in ether_output()
[all …]
H A Dibd.c293 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()
552 mp->b_rptr -= sizeof (eh); in ibd_output()
[all …]
/illumos-gate/usr/src/boot/i386/isoboot/
H A Disoboot.c345 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 Dlibvarpd_arp.c619 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()
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()
632 bcopy(srcmac, &eh->ether_shost, ETHERADDRL); in libvarpd_inject_arp()
[all …]
/illumos-gate/usr/src/uts/common/io/mac/plugins/
H A Dmac_wifi.c409 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 Dzfsboot.c371 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/lib/libinetutil/
H A DMakefile.com29 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/usr.lib/bridged/
H A Devents.c489 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/cmd/cmd-inet/sbin/dhcpagent/
H A Dagent.c67 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 Dscript_handler.c226 (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 Dagent.h56 extern iu_eh_t *eh;
/illumos-gate/usr/src/uts/common/io/myri10ge/drv/
H A Dmyri10ge_lro.c134 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 Dsppp_dlpi.c1098 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 Dbootstrap.h377 void (*arch_loadseg)(Elf_Ehdr *eh, Elf_Phdr *ph, uint64_t delta);
379 void (*arch_loadseg)(void *eh, void *ph, uint64_t delta);

12