/lk-master/lib/minip/ |
A D | chksum.c | 23 uint16_t temp = htons((*(uint8_t *)buf) << 8); in ones_sum16() 57 total += htons(p[0]); in rfc768_chksum() 58 total += htons(p[1]); in rfc768_chksum() 61 total += htons(p[0]); in rfc768_chksum() 62 total += htons(p[1]); in rfc768_chksum()
|
A D | minip.c | 107 pkt->type = htons(type); in minip_build_mac_hdr() 139 arp->htype = htons(0x0001); in send_arp_request() 140 arp->ptype = htons(0x0800); in send_arp_request() 143 arp->oper = htons(ARP_OPER_REQUEST); in send_arp_request() 297 if (htons(ip->len) > p->dlen) { in handle_ipv4_packet() 303 if (p->dlen > htons(ip->len)) { in handle_ipv4_packet() 374 rarp->oper = htons(ARP_OPER_REPLY); in handle_arp_pkt() 375 rarp->htype = htons(0x0001); in handle_arp_pkt() 376 rarp->ptype = htons(0x0800); in handle_arp_pkt() 410 printf(" type 0x%hx\n", htons(eth->type)); in dump_eth_packet() [all …]
|
A D | arp.c | 139 arp->htype = htons(0x0001); in arp_send_request() 140 arp->ptype = htons(0x0800); in arp_send_request() 143 arp->oper = htons(ARP_OPER_REQUEST); in arp_send_request()
|
A D | udp.c | 139 udp->src_port = htons(handle->sport); in udp_send_iovec() 140 udp->dst_port = htons(handle->dport); in udp_send_iovec() 141 udp->len = htons(sizeof(udp_hdr_t) + len); in udp_send_iovec()
|
A D | tcp.c | 359 pheader.tcp_length = htons(p->dlen); in tcp_input() 699 header->source_port = htons(src_port); in tcp_send() 700 header->dest_port = htons(dest_port); in tcp_send() 703 header->length_flags = htons(((sizeof(tcp_header_t) + options_length) / 4) << 12 | flags); in tcp_send() 704 header->win_size = htons(window_size); in tcp_send() 722 pheader.tcp_length = htons(p->dlen); in tcp_send()
|
/lk-master/lib/tftp/ |
A D | tftp.c | 70 uint16_t ack[] = {htons(TFTP_OPCODE_ACK), htons(count)}; in send_ack() 80 uint16_t ncode = htons(code); in send_error() 81 uint16_t err[] = { htons(TFTP_OPCODE_ERROR), ncode, in send_error() 127 if (RD_U16(data_c) != htons(TFTP_OPCODE_DATA)) { in udp_wrq_callback()
|
/lk-master/external/platform/stellaris/ti-driverlib/driverlib/ |
A D | ethernet.h | 111 #ifndef htons 112 #define htons(a) \ macro 118 #define ntohs(a) htons((a))
|
/lk-master/external/lib/lwip/include/lwip/ |
A D | def.h | 64 #ifdef htons 65 #undef htons 77 #define htons(x) lwip_htons(x) macro
|
A D | tcp_impl.h | 177 #define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = htons(((len) << 12) | TCPH_FLAGS(ph… 178 …rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS((u16_t)(~(u16_t)(TCP_FLAGS)))) | htons(flags)) 179 #define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = htons(((len) << 12) | … 181 …CPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | htons(flags)) 182 #define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = htons(ntohs((phdr)->_hdrlen_rsvd_…
|
/lk-master/external/lib/lwip/core/ipv4/ |
A D | inet_chksum.c | 114 return htons((u16_t)acc); in lwip_standard_chksum() 308 acc += (u32_t)htons((u16_t)proto); in inet_chksum_pseudo() 309 acc += (u32_t)htons(proto_len); in inet_chksum_pseudo() 374 acc += (u32_t)htons((u16_t)proto); in inet_chksum_pseudo_partial() 375 acc += (u32_t)htons(proto_len); in inet_chksum_pseudo_partial()
|
A D | ip_frag.c | 578 IPH_LEN_SET(fraghdr, htons(ipr->datagram_len)); in ip_reass() 811 IPH_OFFSET_SET(iphdr, htons(tmp)); in ip_frag() 812 IPH_LEN_SET(iphdr, htons(cop + IP_HLEN)); in ip_frag()
|
/lk-master/external/lib/lwip/netif/ppp/ |
A D | vj.c | 113 (f) = htons(tmp); \ 117 (f) = htons(tmp); \ 123 (f) = htons(((u_short)cp[1] << 8) | cp[2]); \ 126 (f) = htons((u_short)*cp++); \ 504 th->chksum = htons((*cp << 8) | cp[1]); in vj_uncompress_tcp() 552 IPH_ID_SET(&cs->cs_ip, htons(IPH_ID(&cs->cs_ip))); in vj_uncompress_tcp() 573 IPH_LEN_SET(&cs->cs_ip, htons((u_short)tmp)); in vj_uncompress_tcp() 575 IPH_LEN_SET(&cs->cs_ip, htons(n0->tot_len - vjlen + cs->cs_hlen)); in vj_uncompress_tcp()
|
/lk-master/external/lib/lwip/core/ipv6/ |
A D | icmp6.c | 84 if (iecho->chksum >= htons(0xffff - (ICMP6_ECHO << 8))) { in icmp_input() 85 iecho->chksum += htons(ICMP6_ECHO << 8) + 1; in icmp_input() 87 iecho->chksum += htons(ICMP6_ECHO << 8); in icmp_input()
|
A D | inet6.c | 67 acc += htons((u16_t)(*(u8_t *)dataptr) << 8); in chksum() 112 acc += (u16_t)htons((u16_t)proto); in inet_chksum_pseudo()
|
/lk-master/tools/ |
A D | network.c | 61 sa.sin_port = htons(port); in inet_listen() 82 sa.sin_port = htons(port); in inet_connect()
|
/lk-master/external/lib/lwip/include/ipv6/lwip/ |
A D | inet.h | 55 u16_t htons(u16_t n);
|
/lk-master/external/lib/lwip/core/ |
A D | dns.c | 583 hdr->id = htons(id); in dns_send() 765 i = htons(hdr->id); in dns_recv() 775 nquestions = htons(hdr->numquestions); in dns_recv() 776 nanswers = htons(hdr->numanswers); in dns_recv() 822 pHostname = pHostname + SIZEOF_DNS_ANSWER + htons(ans.len); in dns_recv()
|
A D | tcp_out.c | 103 tcphdr->src = htons(pcb->local_port); in tcp_output_alloc_header() 104 tcphdr->dest = htons(pcb->remote_port); in tcp_output_alloc_header() 108 tcphdr->wnd = htons(pcb->rcv_ann_wnd); in tcp_output_alloc_header() 192 seg->tcphdr->src = htons(pcb->local_port); in tcp_create_segment() 193 seg->tcphdr->dest = htons(pcb->remote_port); in tcp_create_segment() 1063 seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); in tcp_output_segment() 1210 tcphdr->src = htons(local_port); in tcp_rst() 1211 tcphdr->dest = htons(remote_port); in tcp_rst()
|
A D | udp.c | 613 udphdr->src = htons(pcb->local_port); 614 udphdr->dest = htons(dst_port); 669 udphdr->len = htons(chklen_hdr); 699 udphdr->len = htons(q->tot_len);
|
/lk-master/lib/libc/include/ |
A D | endian.h | 51 #define htons(h) BE16(h) macro
|
/lk-master/external/lib/lwip/include/netif/ |
A D | etharp.h | 106 #define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
|
/lk-master/external/lib/lwip/netif/ |
A D | ethernetif.c | 238 switch (htons(ethhdr->type)) {
|
A D | etharp.c | 780 hdr->opcode = htons(ARP_REPLY); 830 …UG | LWIP_DBG_TRACE, ("etharp_arp_input: ARP unknown opcode type %"S16_F"\n", htons(hdr->opcode))); 1206 hdr->opcode = htons(opcode); 1300 (unsigned)htons(ethhdr->type))); 1329 netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type));
|
/lk-master/platform/armemu/ |
A D | net.c | 280 switch (htons(ethhdr->type)) { in ethernetif_input()
|
/lk-master/external/lib/lwip/api/ |
A D | netdb.c | 325 sa->sin_port = htons((u16_t)port_nr); in lwip_getaddrinfo()
|