/freebsd-current/stand/libsa/ |
H A D | ether.c | 55 struct ether_header *eh; local 62 eh = (struct ether_header *)pkt - 1; 63 len += sizeof(*eh); 65 MACPY(d->myea, eh->ether_shost); /* by byte */ 66 MACPY(dea, eh->ether_dhost); /* by byte */ 67 eh->ether_type = htons(etype); 69 n = netif_put(d, eh, len); 70 if (n == -1 || n < sizeof(*eh)) 73 n -= sizeof(*eh); 88 struct ether_header *eh; local [all...] |
/freebsd-current/contrib/elftoolchain/libelf/ |
H A D | elf_shstrndx.c | 37 void *eh; local 46 if ((eh = _libelf_ehdr(e, ec, 0)) == NULL) 69 void *eh; local 74 ((eh = _libelf_ehdr(e, ec, 0)) == NULL)) { 79 return (_libelf_setshstrndx(e, eh, ec, strndx));
|
H A D | libelf_extended.c | 49 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) argument 70 ((Elf32_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; 72 ((Elf64_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; 79 _libelf_setshstrndx(Elf *e, void *eh, int ec, size_t shstrndx) argument 100 ((Elf32_Ehdr *) eh)->e_shstrndx = shstrndx & 0xFFFFU; 102 ((Elf64_Ehdr *) eh)->e_shstrndx = shstrndx & 0xFFFFU; 108 _libelf_setphnum(Elf *e, void *eh, int ec, size_t phnum) argument 129 ((Elf32_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; 131 ((Elf64_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU;
|
H A D | elf_phnum.c | 37 void *eh; local 46 if ((eh = _libelf_ehdr(e, ec, 0)) == NULL)
|
H A D | elf_shnum.c | 37 void *eh; local 46 if ((eh = _libelf_ehdr(e, ec, 0)) == NULL)
|
H A D | libelf_ar.c | 111 Elf_Arhdr *eh; local 137 if ((eh = malloc(sizeof(Elf_Arhdr))) == NULL) { 142 e->e_hdr.e_arhdr = eh; 145 eh->ar_name = eh->ar_rawname = NULL; 147 if ((eh->ar_name = _libelf_ar_get_translated_name(arh, parent)) == 154 eh->ar_uid = (uid_t) n; 159 eh->ar_gid = (gid_t) n; 164 eh->ar_mode = (mode_t) n; 182 eh [all...] |
H A D | libelf_ehdr.c | 92 Elf##SZ##_Ehdr *eh = (E); \ 93 eh->e_ident[EI_MAG0] = ELFMAG0; \ 94 eh->e_ident[EI_MAG1] = ELFMAG1; \ 95 eh->e_ident[EI_MAG2] = ELFMAG2; \ 96 eh->e_ident[EI_MAG3] = ELFMAG3; \ 97 eh->e_ident[EI_CLASS] = ELFCLASS##SZ; \ 98 eh->e_ident[EI_DATA] = ELFDATANONE; \ 99 eh->e_ident[EI_VERSION] = LIBELF_PRIVATE(version) & 0xFFU; \ 100 eh->e_machine = EM_NONE; \ 101 eh [all...] |
/freebsd-current/sbin/ipf/ipsend/ |
H A D | resend.c | 65 ether_header_t *eh; local 83 eh = (ether_header_t *)malloc(sizeof(*eh)); 84 if(!eh) 90 bzero((char *) &eh->ether_shost, sizeof(eh->ether_shost)); 94 free(eh); 102 eh = (ether_header_t *)realloc((char *)eh, sizeof(*eh) [all...] |
H A D | ip.c | 48 ether_header_t *eh; local 55 eh = (ether_header_t *)s; 57 bcopy((char *)buf, s + sizeof(*eh), len); 60 bcopy(last_arp, (char *) &eh->ether_dhost, 6); 62 else if (arp((char *)&gwip, (char *) &eh->ether_dhost) == -1) 67 eh->ether_type = htons(ETHERTYPE_IP); 69 err = sendip(nfd, s, sizeof(*eh) + len); 83 ether_header_t *eh; local 97 eh = (ether_header_t *)ipbuf; 99 bzero((char *) &eh [all...] |
/freebsd-current/lib/libkvm/ |
H A D | kvm_powerpc64.c | 48 Elf64_Ehdr *eh; member in struct:vmstate 53 valid_elf_header(kvm_t *kd, Elf64_Ehdr *eh) argument 56 if (!IS_ELF(*eh)) 58 if (eh->e_ident[EI_CLASS] != ELFCLASS64) 60 if (eh->e_ident[EI_DATA] != ELFDATA2MSB && 61 eh->e_ident[EI_DATA] != ELFDATA2LSB) 63 if (eh->e_ident[EI_VERSION] != EV_CURRENT) 65 if (eh->e_ident[EI_OSABI] != ELFOSABI_STANDALONE) 67 if (_kvm16toh(kd, eh->e_type) != ET_CORE) 69 if (_kvm16toh(kd, eh [all...] |
H A D | kvm_powerpc.c | 48 Elf32_Ehdr *eh; member in struct:vmstate 53 valid_elf_header(Elf32_Ehdr *eh) argument 56 if (!IS_ELF(*eh)) 58 if (eh->e_ident[EI_CLASS] != ELFCLASS32) 60 if (eh->e_ident[EI_DATA] != ELFDATA2MSB) 62 if (eh->e_ident[EI_VERSION] != EV_CURRENT) 64 if (eh->e_ident[EI_OSABI] != ELFOSABI_STANDALONE) 66 if (be16toh(eh->e_type) != ET_CORE) 68 if (be16toh(eh->e_machine) != EM_PPC) 99 vm->mapsz = sizeof(*vm->eh) [all...] |
/freebsd-current/sys/netgraph/ |
H A D | ng_ether_echo.c | 108 struct ether_header *eh; local 113 if (m->m_len < sizeof(*eh) ) { 114 m = m_pullup(m, sizeof(*eh)); 120 eh = mtod(m, struct ether_header *); 123 bcopy(eh->ether_dhost, &tmpaddr, ETHER_ADDR_LEN); 124 bcopy(eh->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN); 125 bcopy(&tmpaddr, eh->ether_shost, ETHER_ADDR_LEN);
|
/freebsd-current/tests/sys/netgraph/ |
H A D | bridge.c | 55 struct ether_header eh; member in struct:frame4 61 struct ether_header eh; member in struct:frame6 74 .eh.ether_type = ETHERTYPE_IP, 75 .eh.ether_shost = {2, 4, 6}, 76 .eh.ether_dhost = {2, 4, 6}, 104 msg4.eh.ether_shost[5] = 1; 113 msg4.eh.ether_shost[5] = 1; 119 msg4.eh.ether_shost[5] = 2; 125 msg4.eh.ether_shost[5] = 3; 132 msg4.eh [all...] |
/freebsd-current/tools/tools/ath/ath_ee_9287_print/ |
H A D | 9287.c | 51 BASE_EEP_9287_HEADER *eh = &eep->ee_base.baseEepHeader; local 55 eh->version, eh->length, eh->checksum); 57 eh->opCapFlags, eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); 59 eh->macAddr[0], eh [all...] |
/freebsd-current/tools/tools/ath/ath_ee_v14_print/ |
H A D | ath_ee_v14_print.c | 87 BASE_EEP_HEADER *eh = &eep->ee_base.baseEepHeader; local 91 eh->version, eh->length, eh->checksum); 92 printf("| CapFlags: 0x%.2x\n", eh->opCapFlags); 95 eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); 97 eh->macAddr[0], eh [all...] |
/freebsd-current/sbin/dhclient/ |
H A D | packet.c | 95 struct ether_header eh; local 97 memset(eh.ether_dhost, 0xff, sizeof(eh.ether_dhost)); 98 if (interface->hw_address.hlen == sizeof(eh.ether_shost)) 99 memcpy(eh.ether_shost, interface->hw_address.haddr, 100 sizeof(eh.ether_shost)); 102 memset(eh.ether_shost, 0x00, sizeof(eh.ether_shost)); 104 eh.ether_type = htons(ETHERTYPE_IP); 106 memcpy(&buf[*bufix], &eh, ETHER_HEADER_SIZ 150 struct ether_header eh; local [all...] |
/freebsd-current/tools/tools/ath/ath_ee_v4k_print/ |
H A D | v4k.c | 52 BASE_EEP4K_HEADER *eh = &eep->ee_base.baseEepHeader; local 55 eh->version, eh->length, eh->checksum); 57 eh->opCapFlags, eh->eepMisc, eh->regDmn[0], eh->regDmn[1]); 59 eh->macAddr[0], eh [all...] |
/freebsd-current/sys/dev/wtap/ |
H A D | if_medium.c | 43 struct eventhandler *eh = (struct eventhandler *) local 45 eh->tq = taskqueue_create("wtap_tx_taskq", M_NOWAIT | M_ZERO, 46 taskqueue_thread_enqueue, &eh->tq); 47 taskqueue_start_threads(&eh->tq, 1, PI_NET, "%s taskq", "wtap_medium"); 48 md->tx_handler = eh;
|
/freebsd-current/contrib/tcpdump/ |
H A D | print-rip.c | 183 const struct rip_entry_header *eh = (const struct rip_entry_header *)p; local 194 print_unknown_data(ndo, p + sizeof(*eh), "\n\t ", RIP_ROUTELEN - sizeof(*eh)); 222 const struct rip_entry_header *eh = (const struct rip_entry_header *)p; local 226 if (remaining < sizeof(*eh)) 228 ND_TCHECK_SIZE(eh); 229 family = GET_BE_U_2(eh->rip_family); 231 uint16_t auth_type = GET_BE_U_2(eh->rip_tag); 233 p += sizeof(*eh); 234 remaining -= sizeof(*eh); [all...] |
/freebsd-current/sys/fs/ext2fs/ |
H A D | ext2_extents.c | 141 ext4_ext_walk_header(struct inode *ip, struct ext4_extent_header *eh, int depth) argument 145 error = ext4_ext_check_header(ip, eh, depth); 151 eh, le16toh(eh->eh_ecount), 152 le16toh(eh->eh_max), le16toh(eh->eh_depth), 153 le32toh(eh->eh_gen)); 155 for (i = 0; i < le16toh(eh->eh_ecount) && error == 0; i++) 156 if (eh->eh_depth != 0) 158 (struct ext4_extent_index *)(eh 403 ext4_validate_extent_entries(struct inode *ip, struct ext4_extent_header *eh, int depth) argument 447 ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh, int depth) argument 497 struct ext4_extent_header *eh; local 522 struct ext4_extent_header *eh; local 603 struct ext4_extent_header *eh; local 1199 struct ext4_extent_header *eh; local 1238 struct ext4_extent_header * eh; local 1551 struct ext4_extent_header *eh; local 1643 struct ext4_extent_header *eh; local [all...] |
/freebsd-current/usr.sbin/btxld/ |
H A D | btxld.c | 401 struct elfh eh; local 417 eh = elfhdr; 418 eh.e.e_entry = htole32(hdr->entry); 419 eh.p[0].p_vaddr = eh.p[0].p_paddr = htole32(hdr->org); 420 eh.p[0].p_filesz = eh.p[0].p_memsz = htole32(hdr->text); 421 eh.p[1].p_offset = htole32(le32toh(eh.p[0].p_offset) + 422 le32toh(eh [all...] |
/freebsd-current/usr.sbin/bluetooth/btpand/ |
H A D | packet.c | 61 exthdr_t *eh; local 66 while ((eh = STAILQ_FIRST(&pkt->extlist)) != NULL) { 68 free(eh);
|
/freebsd-current/sys/dev/ixgbe/ |
H A D | if_fdir.c | 87 struct ether_vlan_header *eh; local 93 eh = mtod(mp, struct ether_vlan_header *); 94 if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { 96 etype = eh->evl_proto; 99 etype = eh->evl_encap_proto;
|
/freebsd-current/lib/libc/net/ |
H A D | ip6opt.c | 112 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); local 125 if (bp == (u_char *)eh) { 131 off = bp - (u_char *)eh; 150 off = bp - (u_char *)eh; 157 eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1; 181 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); local 194 if (bp == (u_char *)eh) { 200 off = bp - (u_char *)eh; 215 off = bp - (u_char *)eh; [all...] |
/freebsd-current/stand/libofw/ |
H A D | ofw_net.c | 99 struct ether_header *eh; local 101 eh = pkt; 102 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); 103 printf("src: %s ", ether_sprintf(eh->ether_shost)); 104 printf("type: 0x%x\n", eh->ether_type & 0xffff); 182 struct ether_header *eh = ptr; local 184 printf("dst: %s ", ether_sprintf(eh->ether_dhost)); 185 printf("src: %s ", ether_sprintf(eh->ether_shost)); 186 printf("type: 0x%x\n", eh->ether_type & 0xffff);
|