Home
last modified time | relevance | path

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

/lib/liblwip/src/include/lwip/
Ddef.h64 #ifdef htons
65 #undef htons
77 #define htons(x) lwip_htons(x) macro
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_…
/lib/liblwip/src/core/ipv4/
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()
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()
Dip.c734 IPH_LEN_SET(iphdr, htons(p->tot_len));
739 IPH_ID_SET(iphdr, htons(ip_id));
/lib/liblwip/src/netif/ppp/
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()
Dppp_oe.c650 ethhdr->type = htons(etype); in pppoe_output()
Dppp.c1707 protocol = htons(protocol); in pppInput()
/lib/liblwip/src/core/ipv6/
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()
Dinet6.c67 acc += htons((u16_t)(*(u8_t *)dataptr) << 8); in chksum()
112 acc += (u16_t)htons((u16_t)proto); in inet_chksum_pseudo()
Dip6.c284 iphdr->len = htons(p->tot_len - IP_HLEN); in ip_output_if()
/lib/liblwip/test/unit/etharp/
Dtest_etharp.c89 ethhdr->type = htons(ETHTYPE_ARP); in create_arp_response()
91 etharphdr->hwtype = htons(/*HWTYPE_ETHERNET*/ 1); in create_arp_response()
92 etharphdr->proto = htons(ETHTYPE_IP); in create_arp_response()
95 etharphdr->opcode = htons(ARP_REPLY); in create_arp_response()
/lib/liblwip/test/unit/tcp/
Dtcp_helper.c69 IPH_LEN_SET(iphdr, htons(p->tot_len)); in tcp_create_segment_wnd()
76 tcphdr->src = htons(src_port); in tcp_create_segment_wnd()
77 tcphdr->dest = htons(dst_port); in tcp_create_segment_wnd()
82 tcphdr->wnd = htons(wnd); in tcp_create_segment_wnd()
/lib/liblwip/src/include/ipv6/lwip/
Dinet.h55 u16_t htons(u16_t n);
/lib/liblwip/src/core/
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()
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()
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);
/lib/liblwip/src/netif/
Dethernetif.c238 switch (htons(ethhdr->type)) {
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));
/lib/liblwip/src/include/netif/
Detharp.h106 #define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
/lib/liblwip/src/arch/
Detherif.c268 switch (htons(ethhdr->type)) { in ethernetif_input()
/lib/liblwip/src/api/
Dnetdb.c325 sa->sin_port = htons((u16_t)port_nr); in lwip_getaddrinfo()
Dsockets.c367 sin.sin_port = htons(port); in lwip_accept()
682 sin.sin_port = htons(port); in lwip_recvfrom()
1430 sin.sin_port = htons(sin.sin_port);
/lib/liblwip/doc/
Drawapi.txt471 assembly or inline replacements for htons() and htonl()
/lib/liblwip/
DCHANGELOG2879 * ip.h Corrected IPH_TOS() macro: returns a byte, so doesn't need htons().