| /mirbsd/src/sys/lib/libsa/ |
| D | ether.c | 67 struct ether_header *eh; local 74 eh = (struct ether_header *)pkt - 1; 75 len += sizeof(*eh); 77 MACPY(d->myea, eh->ether_shost); /* by byte */ 78 MACPY(dea, eh->ether_dhost); /* by byte */ 79 eh->ether_type = htons(etype); 81 n = netif_put(d, eh, len); 82 if (n < 0 || (size_t)n < sizeof(*eh)) 85 n -= sizeof(*eh); 103 struct ether_header *eh; local [all …]
|
| /mirbsd/src/gnu/usr.bin/binutils/bfd/ |
| D | elf32-hppa.c | 208 struct elf_link_hash_entry eh; member 454 len = 8 + 1 + strlen (hh->eh.root.root.string) + 1 + 8 + 1; in hppa_stub_name() 460 hh->eh.root.root.string, in hppa_stub_name() 596 && hh->eh.plt.offset != (bfd_vma) -1 in hppa_type_of_stub() 597 && hh->eh.dynindx != -1 in hppa_type_of_stub() 600 || !hh->eh.def_regular in hppa_type_of_stub() 601 || hh->eh.root.type == bfd_link_hash_defweak)) in hppa_type_of_stub() 753 off = hsh->hh->eh.plt.offset; in hppa_build_one_stub() 845 hsh->hh->eh.root.u.def.section = stub_sec; in hppa_build_one_stub() 846 hsh->hh->eh.root.u.def.value = stub_sec->size; in hppa_build_one_stub() [all …]
|
| D | elf64-ppc.c | 3394 struct ppc_stub_hash_entry *eh; in stub_hash_newfunc() local 3397 eh = (struct ppc_stub_hash_entry *) entry; in stub_hash_newfunc() 3398 eh->stub_type = ppc_stub_none; in stub_hash_newfunc() 3399 eh->stub_sec = NULL; in stub_hash_newfunc() 3400 eh->stub_offset = 0; in stub_hash_newfunc() 3401 eh->target_value = 0; in stub_hash_newfunc() 3402 eh->target_section = NULL; in stub_hash_newfunc() 3403 eh->h = NULL; in stub_hash_newfunc() 3404 eh->id_sec = NULL; in stub_hash_newfunc() 3430 struct ppc_branch_hash_entry *eh; in branch_hash_newfunc() local [all …]
|
| /mirbsd/src/usr.sbin/pppoe/ |
| D | server.c | 192 struct ether_header eh; in getpackets() local 218 memmove(&eh, mpkt, sizeof(struct ether_header)); in getpackets() 219 eh.ether_type = ntohs(eh.ether_type); in getpackets() 239 if (eh.ether_type == ETHERTYPE_PPPOEDISC) { in getpackets() 243 recv_padi(bpffd, ea, &eh, &ph, len, mpkt); in getpackets() 246 recv_padr(bpffd, sysname, ea, &eh, &ph, in getpackets() 250 recv_padt(bpffd, ea, &eh, &ph, len, mpkt); in getpackets() 256 else if (eh.ether_type == ETHERTYPE_PPPOE) { in getpackets() 261 (struct ether_addr *)&eh.ether_shost[0], in getpackets() 272 recv_padi(int bpffd, struct ether_addr *ea, struct ether_header *eh, in recv_padi() argument [all …]
|
| D | debug.c | 47 struct ether_header eh; in debug_packet() local 53 if (len < sizeof(eh)) { in debug_packet() 57 memmove(&eh, pkt, sizeof(eh)); in debug_packet() 58 pkt += sizeof(eh); in debug_packet() 59 len -= sizeof(eh); in debug_packet() 60 eh.ether_type = ntohs(eh.ether_type); in debug_packet() 62 if (eh.ether_type == ETHERTYPE_PPPOE && option_verbose < 2) in debug_packet() 66 ether_ntoa((struct ether_addr *)eh.ether_shost), in debug_packet() 67 ether_ntoa((struct ether_addr *)eh.ether_dhost), in debug_packet() 68 eh.ether_type); in debug_packet() [all …]
|
| D | client.c | 210 struct ether_addr *rmea, struct ether_header *eh, in send_padr() argument 291 struct ether_header eh; in getpackets() local 320 memmove(&eh, mpkt, sizeof(struct ether_header)); in getpackets() 321 eh.ether_type = ntohs(eh.ether_type); in getpackets() 341 if (eh.ether_type == ETHERTYPE_PPPOEDISC) { in getpackets() 345 r = recv_pado(bfd, srv, myea, rmea, &eh, in getpackets() 350 &eh, &ph, len, mpkt); in getpackets() 353 r = recv_padt(bfd, myea, rmea, &eh, &ph, in getpackets() 362 else if (eh.ether_type == ETHERTYPE_PPPOE) { in getpackets() 365 if (memcmp(rmea, &eh.ether_shost[0], ETHER_ADDR_LEN)) in getpackets() [all …]
|
| /mirbsd/src/sbin/dhclient/ |
| D | packet.c | 91 struct ether_header eh; in assemble_hw_header() local 94 memcpy(eh.ether_dhost, to->haddr, sizeof(eh.ether_dhost)); in assemble_hw_header() 96 memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost)); in assemble_hw_header() 97 if (ifi->hw_address.hlen == sizeof(eh.ether_shost)) in assemble_hw_header() 98 memcpy(eh.ether_shost, ifi->hw_address.haddr, in assemble_hw_header() 99 sizeof(eh.ether_shost)); in assemble_hw_header() 101 memset(eh.ether_shost, 0x00, sizeof(eh.ether_shost)); in assemble_hw_header() 103 eh.ether_type = htons(ETHERTYPE_IP); in assemble_hw_header() 105 memcpy(&buf[*bufix], &eh, ETHER_HEADER_SIZE); in assemble_hw_header() 149 struct ether_header eh; in decode_hw_header() local [all …]
|
| /mirbsd/src/usr.sbin/dhcpd/ |
| D | packet.c | 92 struct ether_header eh; in assemble_hw_header() local 95 memcpy(eh.ether_dhost, to->haddr, sizeof(eh.ether_dhost)); in assemble_hw_header() 97 memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost)); in assemble_hw_header() 100 memset(eh.ether_shost, 0x00, sizeof(eh.ether_shost)); in assemble_hw_header() 102 eh.ether_type = htons(ETHERTYPE_IP); in assemble_hw_header() 104 memcpy(&buf[*bufix], &eh, ETHER_HEADER_SIZE); in assemble_hw_header() 150 struct ether_header eh; in decode_hw_header() local 152 memcpy(&eh, buf + bufix, ETHER_HEADER_SIZE); in decode_hw_header() 154 memcpy(from->haddr, eh.ether_shost, sizeof(eh.ether_shost)); in decode_hw_header() 156 from->hlen = sizeof(eh.ether_shost); in decode_hw_header() [all …]
|
| /mirbsd/src/usr.sbin/dhcrelay/ |
| D | packet.c | 92 struct ether_header eh; in assemble_hw_header() local 95 memcpy(eh.ether_dhost, to->haddr, sizeof(eh.ether_dhost)); in assemble_hw_header() 97 memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost)); in assemble_hw_header() 100 memset(eh.ether_shost, 0x00, sizeof(eh.ether_shost)); in assemble_hw_header() 102 eh.ether_type = htons(ETHERTYPE_IP); in assemble_hw_header() 104 memcpy(&buf[*bufix], &eh, ETHER_HEADER_SIZE); in assemble_hw_header() 150 struct ether_header eh; in decode_hw_header() local 152 memcpy(&eh, buf + bufix, ETHER_HEADER_SIZE); in decode_hw_header() 154 memcpy(from->haddr, eh.ether_shost, sizeof(eh.ether_shost)); in decode_hw_header() 156 from->hlen = sizeof(eh.ether_shost); in decode_hw_header() [all …]
|
| /mirbsd/src/sys/kern/ |
| D | exec_elf.c | 345 Elf_Ehdr eh; in ELFNAME() local 380 (caddr_t)&eh, sizeof(eh))) != 0) in ELFNAME() 383 if (ELFNAME(check_header)(&eh, ET_DYN) && in ELFNAME() 384 ELFNAME(olf_check_header)(&eh, ET_DYN, &os)) { in ELFNAME() 389 phsize = eh.e_phnum * sizeof(Elf_Phdr); in ELFNAME() 392 if ((error = ELFNAME(read_from)(p, nd.ni_vp, eh.e_phoff, (caddr_t)ph, in ELFNAME() 396 for (i = 0; i < eh.e_phnum; i++) { in ELFNAME() 468 for (i = 0; i < eh.e_phnum; i++) { in ELFNAME() 486 if (eh.e_entry >= ph[i].p_vaddr && in ELFNAME() 487 eh.e_entry < (ph[i].p_vaddr + size)) { in ELFNAME() [all …]
|
| /mirbsd/src/sys/net/ |
| D | if_ethersubr.c | 218 struct ether_header *eh; local 352 eh = (struct ether_header *)dst->sa_data; 353 bcopy((caddr_t)eh->ether_shost, (caddr_t)esrc, sizeof (esrc)); 357 eh = (struct ether_header *)dst->sa_data; 358 bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst)); 360 etype = eh->ether_type; 380 eh = mtod(m, struct ether_header *); 381 bcopy((caddr_t)&etype,(caddr_t)&eh->ether_type, 382 sizeof(eh->ether_type)); 383 bcopy((caddr_t)edst, (caddr_t)eh->ether_dhost, sizeof (edst)); [all …]
|
| D | if_bridge.c | 917 struct ether_header *eh; in bridge_output() local 926 if (m->m_len < sizeof(*eh)) { in bridge_output() 927 m = m_pullup(m, sizeof(*eh)); in bridge_output() 931 eh = mtod(m, struct ether_header *); in bridge_output() 932 dst = (struct ether_addr *)&eh->ether_dhost[0]; in bridge_output() 933 src = (struct ether_addr *)&eh->ether_shost[0]; in bridge_output() 953 if (dst_if == NULL || ETHER_IS_MULTICAST(eh->ether_dhost)) { in bridge_output() 1106 struct ether_header eh; in bridgeintr_frame() local 1140 if (m->m_pkthdr.len < sizeof(eh)) { in bridgeintr_frame() 1144 m_copydata(m, 0, sizeof(struct ether_header), (caddr_t)&eh); in bridgeintr_frame() [all …]
|
| D | if_tokensubr.c | 373 struct ether_header *eh; local 374 eh = (struct ether_header *)dst->sa_data; 375 bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst)); 378 etype = TYPEHTONS(eh->ether_type); 596 struct ether_header *eh; local 608 eh = (struct ether_header *)sa.sa_data; 610 eh->ether_shost[i] = c = trh->token_dhost[i]; 611 eh->ether_dhost[i] = 612 eh->ether_dhost[i] = trh->token_shost[i]; 613 eh->ether_shost[i] = c; [all …]
|
| D | bridgestp.c | 230 struct ether_header eh; local 256 m->m_pkthdr.len = sizeof(eh) + sizeof(bpdu); 291 bcopy(arp->ac_enaddr, eh.ether_shost, ETHER_ADDR_LEN); 292 bcopy(bstp_etheraddr, eh.ether_dhost, ETHER_ADDR_LEN); 293 eh.ether_type = htons(sizeof(bpdu)); 295 bcopy(&eh, m->m_data, sizeof(eh)); 296 bcopy(&bpdu, m->m_data + sizeof(eh), sizeof(bpdu)); 395 struct ether_header *eh; local 406 m->m_pkthdr.len = sizeof(*eh) + sizeof(bpdu); 409 eh = mtod(m, struct ether_header *); [all …]
|
| /mirbsd/src/lib/libc/net/ |
| D | ip6opt.c | 99 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_append() local 116 if (bp == (u_char *)eh) { in inet6_option_append() 122 off = bp - (u_char *)eh; in inet6_option_append() 142 off = bp - (u_char *)eh; in inet6_option_append() 149 eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1; in inet6_option_append() 173 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_alloc() local 186 if (bp == (u_char *)eh) { in inet6_option_alloc() 192 off = bp - (u_char *)eh; in inet6_option_alloc() 208 off = bp - (u_char *)eh; in inet6_option_alloc() 215 eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1; in inet6_option_alloc()
|
| /mirbsd/src/sys/arch/sparc/stand/common/ |
| D | netif_sun.c | 145 struct ether_header *eh; local 149 eh = pkt; 150 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); 151 printf("src: %s ", ether_sprintf(eh->ether_shost)); 152 printf("type: 0x%x\n", eh->ether_type & 0xFFFF); 214 struct ether_header *eh = pkt; local 216 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); 217 printf("src: %s ", ether_sprintf(eh->ether_shost)); 218 printf("type: 0x%x\n", eh->ether_type & 0xFFFF);
|
| /mirbsd/src/distrib/common/ |
| D | elfrdsetroot.c | 84 Elf_Ehdr eh; in main() local 109 n = read(fd, &eh, sizeof(eh)); in main() 110 if (n < sizeof(eh)) { in main() 115 if (!IS_ELF(eh)) { in main() 120 phsize = eh.e_phnum * sizeof(Elf_Phdr); in main() 122 lseek(fd, eh.e_phoff, 0); in main() 128 for (n = 0; n < eh.e_phnum && !found; n++) { in main() 130 found = find_rd_root_image(file, &eh, &ph[n], n); in main() 203 find_rd_root_image(char *file, Elf_Ehdr *eh, Elf_Phdr *ph, int segment) in find_rd_root_image() argument
|
| /mirbsd/src/sys/arch/i386/stand/installboot/ |
| D | installboot.c | 424 Elf_Ehdr eh; in loadprotoblocks() local 449 if (read(fd, &eh, sizeof(eh)) != sizeof(eh)) { in loadprotoblocks() 453 if (!IS_ELF(eh)) { in loadprotoblocks() 456 eh.e_ident[EI_MAG0], eh.e_ident[EI_MAG1], in loadprotoblocks() 457 eh.e_ident[EI_MAG2], eh.e_ident[EI_MAG3]); in loadprotoblocks() 467 if (eh.e_phnum != 1) { in loadprotoblocks() 470 phsize = eh.e_phnum * sizeof(Elf_Phdr); in loadprotoblocks() 476 lseek(fd, eh.e_phoff, SEEK_SET); in loadprotoblocks() 514 fprintf(stderr, "%s: entry point %#x\n", fname, eh.e_entry); in loadprotoblocks() 582 if (read(fd, &eh, sizeof(eh)) != sizeof(eh)) { in loadblocknums() [all …]
|
| /mirbsd/src/sys/netatalk/ |
| D | aarp.c | 193 struct ether_header *eh; local 230 eh = (struct ether_header *)sa.sa_data; 233 bcopy((caddr_t)atmulticastaddr, (caddr_t)eh->ether_dhost, 234 sizeof( eh->ether_dhost )); 235 eh->ether_type = htons(AT_LLC_SIZE + sizeof(struct ether_aarp)); 253 bcopy((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost, 254 sizeof( eh->ether_dhost )); 255 eh->ether_type = htons( ETHERTYPE_AARP ); 370 struct ether_header *eh; local 519 eh = (struct ether_header *)sa.sa_data; [all …]
|
| /mirbsd/src/usr.sbin/kvm_mkdb/ |
| D | nlist.c | 301 Elf_Ehdr eh; in __elf_knlist() local 312 fread(&eh, sizeof(eh), 1, fp) != 1 || in __elf_knlist() 313 !IS_ELF(eh)) in __elf_knlist() 316 sh = (Elf_Shdr *)malloc(sizeof(Elf_Shdr) * eh.e_shnum); in __elf_knlist() 319 sizeof(Elf_Shdr) * eh.e_shnum); in __elf_knlist() 321 if (fseek (fp, eh.e_shoff, SEEK_SET) < 0) { in __elf_knlist() 326 if (fread(sh, sizeof(Elf_Shdr) * eh.e_shnum, 1, fp) != 1) { in __elf_knlist() 331 shstr = (char *)malloc(sh[eh.e_shstrndx].sh_size); in __elf_knlist() 334 sh[eh.e_shstrndx].sh_size); in __elf_knlist() 335 if (fseek (fp, sh[eh.e_shstrndx].sh_offset, SEEK_SET) < 0) { in __elf_knlist() [all …]
|
| /mirbsd/src/sys/netinet/ |
| D | if_ether.c | 329 struct ether_header *eh; local 339 eh = (struct ether_header *)sa.sa_data; 341 bcopy((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost, 342 sizeof(eh->ether_dhost)); 343 eh->ether_type = htons(ETHERTYPE_ARP); /* if_output will not swap */ 349 bcopy((caddr_t)enaddr, (caddr_t)eh->ether_shost, 350 sizeof(eh->ether_shost)); 516 struct ether_header *eh; local 697 eh = (struct ether_header *)sa.sa_data; 698 bcopy(ea->arp_tha, eh->ether_dhost, sizeof(eh->ether_dhost)); [all …]
|
| D | ip_ether.c | 82 struct ether_header eh; in etherip_input() local 208 m_copydata(m, 0, sizeof(eh), (void *) &eh); in etherip_input() 212 if (eh.ether_dhost[0] & 1) { in etherip_input() 214 (caddr_t)eh.ether_dhost, sizeof(etherbroadcastaddr)) == 0) in etherip_input() 269 m = bridge_input(&sc->gif_if, &eh, m); in etherip_input()
|
| /mirbsd/src/sys/dev/ic/ |
| D | lemac.c | 276 struct ether_header eh; in lemac_input() local 279 if (length - sizeof(eh) > ETHERMTU || in lemac_input() 280 length - sizeof(eh) < ETHERMIN) { in lemac_input() 285 LEMAC_INSB(sc, LEMAC_REG_DAT, sizeof(eh), (void *)&eh); in lemac_input() 287 LEMAC_GETBUF16(sc, offset, sizeof(eh) / 2, (void *)&eh); in lemac_input() 304 bcopy((caddr_t)&eh, m->m_data, sizeof(eh)); in lemac_input() 306 LEMAC_INSB(sc, LEMAC_REG_DAT, length - sizeof(eh), in lemac_input() 307 mtod(m, caddr_t) + sizeof(eh)); in lemac_input() 309 LEMAC_GETBUF16(sc, offset + sizeof(eh), in lemac_input() 310 (length - sizeof(eh)) / 2, in lemac_input() [all …]
|
| D | am7990.c | 449 struct ether_header *eh; local 488 eh = mtod(m, struct ether_header *); 489 if (ETHER_CMP(eh->ether_dhost, sc->sc_arpcom.ac_enaddr) && 490 ETHER_CMP(eh->ether_dhost, etherbroadcastaddr)) { 950 struct ether_header eh; local 961 if (len >= sizeof(eh)) { 962 (*sc->sc_copyfrombuf)(sc, &eh, LE_RBUFADDR(sc, no), sizeof(eh)); 964 ether_sprintf(eh.ether_dhost)); 965 printf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), 966 ntohs(eh.ether_type)); [all …]
|
| D | an.c | 309 struct ether_header *eh; local 335 eh = mtod(m, struct ether_header *); 366 (char *)&eh->ether_dhost, ETHER_ADDR_LEN); 368 (char *)&eh->ether_shost, ETHER_ADDR_LEN); 371 error = an_read_data(sc, id, 0x44, (caddr_t)&(eh->ether_type), 389 an_cache_store(sc, eh, m, rx_frame.an_rx_signal_strength); 1233 struct ether_header *eh; local 1261 eh = mtod(m0, struct ether_header *); 1263 bcopy((char *)&eh->ether_dhost, 1265 bcopy((char *)&eh->ether_shost, [all …]
|