Home
last modified time | relevance | path

Searched refs:htons (Results 1 – 25 of 30) sorted by relevance

12

/lk-master/lib/minip/
A Dchksum.c23 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 Dminip.c107 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 Darp.c139 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 Dudp.c139 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 Dtcp.c359 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 Dtftp.c70 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 Dethernet.h111 #ifndef htons
112 #define htons(a) \ macro
118 #define ntohs(a) htons((a))
/lk-master/external/lib/lwip/include/lwip/
A Ddef.h64 #ifdef htons
65 #undef htons
77 #define htons(x) lwip_htons(x) macro
A Dtcp_impl.h177 #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 Dinet_chksum.c114 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 Dip_frag.c578 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 Dvj.c113 (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 Dicmp6.c84 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 Dinet6.c67 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 Dnetwork.c61 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 Dinet.h55 u16_t htons(u16_t n);
/lk-master/external/lib/lwip/core/
A Ddns.c583 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 Dtcp_out.c103 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 Dudp.c613 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 Dendian.h51 #define htons(h) BE16(h) macro
/lk-master/external/lib/lwip/include/netif/
A Detharp.h106 #define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
/lk-master/external/lib/lwip/netif/
A Dethernetif.c238 switch (htons(ethhdr->type)) {
A Detharp.c780 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 Dnet.c280 switch (htons(ethhdr->type)) { in ethernetif_input()
/lk-master/external/lib/lwip/api/
A Dnetdb.c325 sa->sin_port = htons((u16_t)port_nr); in lwip_getaddrinfo()

Completed in 52 milliseconds

12