| /netbsd-src/external/ibm-public/postfix/dist/src/tls/ |
| H A D | tls_prng_exch.c | 86 TLS_PRNG_SRC *eh; in tls_prng_exch_open() local 91 eh = (TLS_PRNG_SRC *) mymalloc(sizeof(*eh)); in tls_prng_exch_open() 92 eh->fd = fd; in tls_prng_exch_open() 93 eh->name = mystrdup(name); in tls_prng_exch_open() 94 eh->timeout = 0; in tls_prng_exch_open() 97 return (eh); in tls_prng_exch_open() 102 void tls_prng_exch_update(TLS_PRNG_SRC *eh) in tls_prng_exch_update() argument 111 if (myflock(eh->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) != 0) in tls_prng_exch_update() 112 msg_fatal("cannot lock PRNG exchange file %s: %m", eh->name); in tls_prng_exch_update() 113 if (lseek(eh->fd, 0, SEEK_SET) < 0) in tls_prng_exch_update() [all …]
|
| /netbsd-src/sys/arch/mips/mips/ |
| H A D | cpu_exec.c | 97 const Elf32_Ehdr * const eh = eh0; in mips_netbsd_elf32_probe() local 106 switch (eh->e_flags & EF_MIPS_ARCH) { in mips_netbsd_elf32_probe() 137 switch (eh->e_flags & (EF_MIPS_ABI|EF_MIPS_ABI2)) { in mips_netbsd_elf32_probe() 144 printf("pid %d(%s): ABI set to N32 (e_flags=%#x)\n", p->p_pid, p->p_comm, eh->e_flags); in mips_netbsd_elf32_probe() 158 printf("pid %d(%s): ABI set to O32 (e_flags=%#x)\n", p->p_pid, p->p_comm, eh->e_flags); in mips_netbsd_elf32_probe() 173 Elf32_Ehdr * const eh = eh0; in coredump_elf32_setup() local 179 eh->e_flags |= EF_MIPS_ARCH_64R2; in coredump_elf32_setup() 181 eh->e_flags |= EF_MIPS_ARCH_64; in coredump_elf32_setup() 183 eh->e_flags |= EF_MIPS_ARCH_32R2; in coredump_elf32_setup() 185 eh->e_flags |= EF_MIPS_ARCH_32; in coredump_elf32_setup() [all …]
|
| /netbsd-src/sys/lib/libsa/ |
| H A D | ether.c | 64 struct ether_header *eh; in sendether() local 71 eh = (struct ether_header *)pkt - 1; in sendether() 72 len += sizeof(*eh); in sendether() 74 MACPY(d->myea, eh->ether_shost); /* by byte */ in sendether() 75 MACPY(dea, eh->ether_dhost); /* by byte */ in sendether() 76 eh->ether_type = htons(etype); in sendether() 78 n = netif_put(d, eh, len); in sendether() 79 if (n == -1 || (size_t)n < sizeof(*eh)) in sendether() 82 n -= (ssize_t)sizeof(*eh); in sendether() 96 struct ether_header *eh; in readether() local [all …]
|
| /netbsd-src/external/mpl/dhcp/dist/common/ |
| H A D | ethernet.c | 49 struct isc_ether_header eh; local 52 memcpy (eh.ether_dhost, &to -> hbuf [1], 53 sizeof eh.ether_dhost); 55 memset (eh.ether_dhost, 0xff, sizeof (eh.ether_dhost)); 56 if (interface -> hw_address.hlen - 1 == sizeof (eh.ether_shost)) 57 memcpy (eh.ether_shost, &interface -> hw_address.hbuf [1], 58 sizeof (eh.ether_shost)); 60 memset (eh.ether_shost, 0x00, sizeof (eh.ether_shost)); 62 eh.ether_type = htons (ETHERTYPE_IP); 64 memcpy (&buf [*bufix], &eh, ETHER_HEADER_SIZE); [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/bfd/ |
| H A D | elf32-hppa.c | 228 struct elf_link_hash_entry eh; member 317 (hh ? hh->eh.root.root.string : "<undef>") 319 #define eh_name(eh) \ argument 320 (eh ? eh->root.root.string : "<undef>") 608 && hh->eh.plt.offset != (bfd_vma) -1 in hppa_type_of_stub() 609 && hh->eh.dynindx != -1 in hppa_type_of_stub() 612 || !hh->eh.def_regular in hppa_type_of_stub() 613 || hh->eh.root.type == bfd_link_hash_defweak)) in hppa_type_of_stub() 789 off = hsh->hh->eh.plt.offset; in hppa_build_one_stub() 887 hsh->hh->eh.root.u.def.section = stub_sec; in hppa_build_one_stub() [all …]
|
| H A D | elf32-metag.c | 782 struct elf_link_hash_entry eh; member 1062 len = 8 + 1 + strlen (hh->eh.root.root.string) + 1 + 8 + 1; in metag_stub_name() 1068 hh->eh.root.root.string, in metag_stub_name() 1276 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1333 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1345 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1520 struct elf_link_hash_entry *eh; in elf_metag_relocate_section() local 1525 eh, sec, relocation, in elf_metag_relocate_section() 1528 name = eh->root.root.string; in elf_metag_relocate_section() 1529 hh = (struct elf_metag_link_hash_entry *) eh; in elf_metag_relocate_section() [all …]
|
| H A D | elf64-hppa.c | 53 struct elf_link_hash_entry eh; member 154 #define eh_name(eh) \ argument 155 (eh ? eh->root.root.string : "<undef>") 638 while (hh->eh.root.type == bfd_link_hash_indirect in elf64_hppa_check_relocs() 639 || hh->eh.root.type == bfd_link_hash_warning) in elf64_hppa_check_relocs() 640 hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); in elf64_hppa_check_relocs() 644 hh->eh.ref_regular = 1; in elf64_hppa_check_relocs() 657 || !hh->eh.def_regular in elf64_hppa_check_relocs() 658 || hh->eh.root.type == bfd_link_hash_defweak)) in elf64_hppa_check_relocs() 711 if (hh != NULL && hh->eh.type != STT_PARISC_MILLI) in elf64_hppa_check_relocs() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/bfd/ |
| H A D | elf32-metag.c | 782 struct elf_link_hash_entry eh; member 1062 len = 8 + 1 + strlen (hh->eh.root.root.string) + 1 + 8 + 1; in metag_stub_name() 1068 hh->eh.root.root.string, in metag_stub_name() 1276 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1333 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1345 if (hh && hh->eh.root.type == bfd_link_hash_undefweak) in metag_final_link_relocate() 1520 struct elf_link_hash_entry *eh; in elf_metag_relocate_section() local 1525 eh, sec, relocation, in elf_metag_relocate_section() 1528 name = eh->root.root.string; in elf_metag_relocate_section() 1529 hh = (struct elf_metag_link_hash_entry *) eh; in elf_metag_relocate_section() [all …]
|
| H A D | elf32-hppa.c | 228 struct elf_link_hash_entry eh; member 317 (hh ? hh->eh.root.root.string : "<undef>") 319 #define eh_name(eh) \ argument 320 (eh ? eh->root.root.string : "<undef>") 608 && hh->eh.plt.offset != (bfd_vma) -1 in hppa_type_of_stub() 609 && hh->eh.dynindx != -1 in hppa_type_of_stub() 612 || !hh->eh.def_regular in hppa_type_of_stub() 613 || hh->eh.root.type == bfd_link_hash_defweak)) in hppa_type_of_stub() 789 off = hsh->hh->eh.plt.offset; in hppa_build_one_stub() 887 hsh->hh->eh.root.u.def.section = stub_sec; in hppa_build_one_stub() [all …]
|
| H A D | elf64-hppa.c | 53 struct elf_link_hash_entry eh; member 154 #define eh_name(eh) \ argument 155 (eh ? eh->root.root.string : "<undef>") 638 while (hh->eh.root.type == bfd_link_hash_indirect in elf64_hppa_check_relocs() 639 || hh->eh.root.type == bfd_link_hash_warning) in elf64_hppa_check_relocs() 640 hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); in elf64_hppa_check_relocs() 644 hh->eh.ref_regular = 1; in elf64_hppa_check_relocs() 657 || !hh->eh.def_regular in elf64_hppa_check_relocs() 658 || hh->eh.root.type == bfd_link_hash_defweak)) in elf64_hppa_check_relocs() 711 if (hh != NULL && hh->eh.type != STT_PARISC_MILLI) in elf64_hppa_check_relocs() [all …]
|
| /netbsd-src/external/bsd/ipf/dist/ipsend/ |
| H A D | resend.c | 78 ether_header_t *eh; local 96 eh = (ether_header_t *)malloc(sizeof(*eh)); 97 if(!eh) 103 bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); 107 free(eh); 115 eh = (ether_header_t *)realloc((char *)eh, sizeof(*eh) + len); 116 eh->ether_type = htons((u_short)ETHERTYPE_IP); 119 (char *)A_A eh->ether_dhost) == -1) { 124 bcopy(dhost, (char *)A_A eh->ether_dhost, 129 bcopy(ip, (char *)(eh + 1), len); [all …]
|
| H A D | ip.c | 61 ether_header_t *eh; local 68 eh = (ether_header_t *)s; 70 bcopy((char *)buf, s + sizeof(*eh), len); 73 bcopy(last_arp, (char *)A_A eh->ether_dhost, 6); 75 else if (arp((char *)&gwip, (char *)A_A eh->ether_dhost) == -1) 80 eh->ether_type = htons(ETHERTYPE_IP); 82 err = sendip(nfd, s, sizeof(*eh) + len); 99 ether_header_t *eh; local 113 eh = (ether_header_t *)ipbuf; 115 bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost)); [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/libphobos/libdruntime/gcc/ |
| H A D | deh.d | 188 auto eh = &ehstorage; in create() local 191 if (eh.object) in create() 193 eh = cast(ExceptionHeader*) __builtin_calloc(ExceptionHeader.sizeof, 1); in create() 195 if (!eh) in create() 198 eh.object = o; in create() 200 eh.unwindHeader.exception_class = gdcExceptionClass; in create() 202 return eh; in create() 208 static void free(ExceptionHeader* eh) @nogc in free() 210 __builtin_memset(eh, 0, ExceptionHeader.sizeof); in free() 211 if (eh != &ehstorage) in free() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/gcc/ |
| H A D | deh.d | 192 auto eh = &ehstorage; 195 if (eh.object) 197 eh = cast(ExceptionHeader*) __builtin_calloc(ExceptionHeader.sizeof, 1); 199 if (!eh) 202 eh.object = o; 204 eh.unwindHeader.exception_class = gdcExceptionClass; 206 return eh; 212 static void free(ExceptionHeader* eh) @nogc 214 *eh = ExceptionHeader.init; 215 if (eh != &ehstorage) [all …]
|
| /netbsd-src/sys/kern/ |
| H A D | exec_elf.c | 129 elf_placedynexec(struct exec_package *epp, Elf_Ehdr *eh, Elf_Phdr *ph) in elf_placedynexec() 134 for (align = 1, i = 0; i < eh->e_phnum; i++) in elf_placedynexec() 147 for (i = 0; i < eh->e_phnum; i++) in elf_placedynexec() 150 eh->e_entry += offset; 287 elf_check_header(Elf_Ehdr *eh) in elf_check_header() 290 if (memcmp(eh->e_ident, ELFMAG, SELFMAG) != 0 || in elf_check_header() 291 eh->e_ident[EI_CLASS] != ELFCLASS) { in elf_check_header() 293 "e_ident[EI_CLASS] %#x", eh->e_ident[EI_MAG0], in elf_check_header() 294 eh->e_ident[EI_MAG1], eh in elf_check_header() 126 elf_placedynexec(struct exec_package * epp,Elf_Ehdr * eh,Elf_Phdr * ph) elf_placedynexec() argument 284 elf_check_header(Elf_Ehdr * eh) elf_check_header() argument 422 Elf_Ehdr eh; elf_load_interp() local 649 Elf_Ehdr *eh = epp->ep_hdr; exec_elf_makecmds() local 898 netbsd_elf_signature(struct lwp * l,struct exec_package * epp,Elf_Ehdr * eh) netbsd_elf_signature() argument 1115 netbsd_elf_probe(struct lwp * l,struct exec_package * epp,void * eh,char * itp,vaddr_t * pos) netbsd_elf_probe() argument [all...] |
| /netbsd-src/external/bsd/openldap/dist/servers/slapd/back-wt/ |
| H A D | dn2entry.c | 45 EntryHeader eh; in wt_dn2entry() local 82 rc = wt_entry_header( &item, &eh ); in wt_dn2entry() 84 eoff = eh.data - (char *)item.data; in wt_dn2entry() 85 eh.bv.bv_len = eh.nvals * sizeof( struct berval ) + item.size; in wt_dn2entry() 86 eh.bv.bv_val = ch_malloc( eh.bv.bv_len ); in wt_dn2entry() 87 memset(eh.bv.bv_val, 0xff, eh.bv.bv_len); in wt_dn2entry() 88 eh.data = eh.bv.bv_val + eh.nvals * sizeof( struct berval ); in wt_dn2entry() 89 memcpy(eh.data, item.data, item.size); in wt_dn2entry() 90 eh.data += eoff; in wt_dn2entry() 91 rc = entry_decode( &eh, &e ); in wt_dn2entry()
|
| H A D | id2entry.c | 129 EntryHeader eh; in wt_id2entry() local 150 rc = wt_entry_header( &item, &eh ); in wt_id2entry() 151 eoff = eh.data - (char *)item.data; in wt_id2entry() 152 eh.bv.bv_len = eh.nvals * sizeof( struct berval ) + item.size; in wt_id2entry() 153 eh.bv.bv_val = ch_malloc( eh.bv.bv_len ); in wt_id2entry() 154 memset(eh.bv.bv_val, 0xff, eh.bv.bv_len); in wt_id2entry() 155 eh.data = eh.bv.bv_val + eh.nvals * sizeof( struct berval ); in wt_id2entry() 156 memcpy(eh.data, item.data, item.size); in wt_id2entry() 157 eh.data += eoff; in wt_id2entry() 158 rc = entry_decode( &eh, &e ); in wt_id2entry()
|
| /netbsd-src/sys/compat/linux/common/ |
| H A D | linux_exec_elf32.c | 94 Elf_Ehdr *eh) in ELFNAME2() 106 shsize = eh->e_shnum * sizeof(Elf_Shdr); in ELFNAME2() 108 error = exec_read(l, epp->ep_vp, eh->e_shoff, sh, shsize, in ELFNAME2() 114 shstrndx = eh->e_shstrndx; in ELFNAME2() 115 if (shstrndx == SHN_UNDEF || shstrndx >= eh->e_shnum) { in ELFNAME2() 122 for (i = 0; i < eh->e_shnum; i++) { in ELFNAME2() 162 Elf_Ehdr *eh) in ELFNAME2() 171 shsize = eh->e_shnum * sizeof(Elf_Shdr); in ELFNAME2() 173 error = exec_read(l, epp->ep_vp, eh->e_shoff, sh, shsize, in ELFNAME2() 178 for (i = 0; i < eh->e_shnum; i++) { in ELFNAME2() [all …]
|
| /netbsd-src/sys/dev/ |
| H A D | kloader.c | 171 Elf_Ehdr eh; in kloader_load() local 191 kloader_read(0, sizeof(Elf_Ehdr), &eh); in kloader_load() 193 if (eh.e_ident[EI_MAG0] != ELFMAG0 || in kloader_load() 194 eh.e_ident[EI_MAG1] != ELFMAG1 || in kloader_load() 195 eh.e_ident[EI_MAG2] != ELFMAG2 || in kloader_load() 196 eh.e_ident[EI_MAG3] != ELFMAG3) { in kloader_load() 202 phsz = eh.e_phentsize * eh.e_phnum; in kloader_load() 207 if (kloader_read(eh.e_phoff, phsz, ph) != 0) { in kloader_load() 213 shsz = eh.e_shentsize * eh.e_shnum; in kloader_load() 218 if (kloader_read(eh.e_shoff, shsz, sh) != 0) { in kloader_load() [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/ |
| H A D | except.cc | 353 cfun->eh = ggc_cleared_alloc<eh_status> (); in init_eh_for_function() 356 vec_safe_push (cfun->eh->region_array, (eh_region)0); in init_eh_for_function() 357 vec_safe_push (cfun->eh->lp_array, (eh_landing_pad)0); in init_eh_for_function() 380 new_eh->next_peer = cfun->eh->region_tree; in gen_eh_region() 381 cfun->eh->region_tree = new_eh; in gen_eh_region() 384 new_eh->index = vec_safe_length (cfun->eh->region_array); in gen_eh_region() 385 vec_safe_push (cfun->eh->region_array, new_eh); in gen_eh_region() 465 lp->index = vec_safe_length (cfun->eh->lp_array); in gen_eh_landing_pad() 468 vec_safe_push (cfun->eh->lp_array, lp); in gen_eh_landing_pad() 476 return (*ifun->eh->region_array)[i]; in get_eh_region_from_number_fn() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/ |
| H A D | except.c | 352 cfun->eh = ggc_cleared_alloc<eh_status> (); in init_eh_for_function() 355 vec_safe_push (cfun->eh->region_array, (eh_region)0); in init_eh_for_function() 356 vec_safe_push (cfun->eh->lp_array, (eh_landing_pad)0); in init_eh_for_function() 379 new_eh->next_peer = cfun->eh->region_tree; in gen_eh_region() 380 cfun->eh->region_tree = new_eh; in gen_eh_region() 383 new_eh->index = vec_safe_length (cfun->eh->region_array); in gen_eh_region() 384 vec_safe_push (cfun->eh->region_array, new_eh); in gen_eh_region() 464 lp->index = vec_safe_length (cfun->eh->lp_array); in gen_eh_landing_pad() 467 vec_safe_push (cfun->eh->lp_array, lp); in gen_eh_landing_pad() 475 return (*ifun->eh->region_array)[i]; in get_eh_region_from_number_fn() [all …]
|
| /netbsd-src/sys/net/agr/ |
| H A D | if_agrether_hash.c | 75 const struct ether_header *eh; in agrether_hashmbuf() local 81 eh = agr_m_extract(m, off, sizeof(*eh), &eh_store); in agrether_hashmbuf() 82 if (eh == NULL) { in agrether_hashmbuf() 86 hash = HASH(&eh->ether_dhost, sizeof(eh->ether_dhost), hash); in agrether_hashmbuf() 87 hash = HASH(&eh->ether_shost, sizeof(eh->ether_shost), hash); in agrether_hashmbuf() 88 etype = eh->ether_type; in agrether_hashmbuf() 102 off += sizeof(*vlanhdr) - sizeof(*eh); in agrether_hashmbuf() 110 off += sizeof(*eh); in agrether_hashmbuf()
|
| /netbsd-src/external/bsd/elftoolchain/dist/libelf/ |
| H A D | libelf_ar.c | 120 Elf_Arhdr *eh; in _libelf_ar_gethdr() local 146 if ((eh = malloc(sizeof(Elf_Arhdr))) == NULL) { in _libelf_ar_gethdr() 151 e->e_hdr.e_arhdr = eh; in _libelf_ar_gethdr() 154 eh->ar_name = eh->ar_rawname = NULL; in _libelf_ar_gethdr() 156 if ((eh->ar_name = _libelf_ar_get_translated_name(arh, parent)) == in _libelf_ar_gethdr() 163 eh->ar_uid = (uid_t) n; in _libelf_ar_gethdr() 168 eh->ar_gid = (gid_t) n; in _libelf_ar_gethdr() 173 eh->ar_mode = (mode_t) n; in _libelf_ar_gethdr() 191 eh->ar_size = n; in _libelf_ar_gethdr() 193 if ((eh->ar_rawname = _libelf_ar_get_raw_name(arh)) == NULL) in _libelf_ar_gethdr() [all …]
|
| H A D | libelf_extended.c | 58 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) in _libelf_setshnum() argument 79 ((Elf32_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum() 81 ((Elf64_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum() 88 _libelf_setshstrndx(Elf *e, void *eh, int ec, size_t shstrndx) in _libelf_setshstrndx() argument 109 ((Elf32_Ehdr *) eh)->e_shstrndx = shstrndx & 0xFFFFU; in _libelf_setshstrndx() 111 ((Elf64_Ehdr *) eh)->e_shstrndx = shstrndx & 0xFFFFU; in _libelf_setshstrndx() 117 _libelf_setphnum(Elf *e, void *eh, int ec, size_t phnum) in _libelf_setphnum() argument 138 ((Elf32_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum() 140 ((Elf64_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum()
|
| /netbsd-src/sys/arch/newsmips/stand/boot/ |
| H A D | netif_news.c | 115 struct ether_header *eh; in netif_put() local 119 eh = pkt; in netif_put() 120 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); in netif_put() 121 printf("src: %s ", ether_sprintf(eh->ether_shost)); in netif_put() 122 printf("type: 0x%x\n", eh->ether_type & 0xFFFF); in netif_put() 179 struct ether_header *eh = pkt; in netif_get() local 181 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); in netif_get() 182 printf("src: %s ", ether_sprintf(eh->ether_shost)); in netif_get() 183 printf("type: 0x%x\n", eh->ether_type & 0xFFFF); in netif_get()
|