Home
last modified time | relevance | path

Searched refs:lwip_htons (Results 1 - 25 of 26) sorted by relevance

12

/third_party/lwip/src/include/lwip/prot/
H A Dtcp.h89 #define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLAGS(phdr))
90 #define TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lwip_htons(flags))
91 #define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = (u16_t)(lwip_htons((u16_t)((len) << 12) | (flags)))
93 #define TCPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | lwip_htons(flags))
94 #define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~lwip_htons(flags))
H A Dethernet.h108 #define VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF)
H A Dip6.h107 #define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen)
/third_party/lwip/src/include/lwip/
H A Ddef.h86 #define lwip_htons(x) ((u16_t)(x)) macro
95 #ifndef lwip_htons
96 u16_t lwip_htons(u16_t x);
98 #define lwip_ntohs(x) lwip_htons(x)
119 #define htons(x) lwip_htons(x)
/third_party/lwip/src/netif/ppp/
H A Dvj.c110 (f) = lwip_htons(tmp_); \
114 (f) = lwip_htons(tmp_); \
120 (f) = lwip_htons(((u16_t)cp[1] << 8) | cp[2]); \
123 (f) = lwip_htons((u16_t)*cp++); \
537 th->chksum = lwip_htons((*cp << 8) | cp[1]); in vj_uncompress_tcp()
585 IPH_ID_SET(&cs->cs_ip, lwip_htons(IPH_ID(&cs->cs_ip))); in vj_uncompress_tcp()
606 IPH_LEN_SET(&cs->cs_ip, lwip_htons((u16_t)tmp)); in vj_uncompress_tcp()
608 IPH_LEN_SET(&cs->cs_ip, lwip_htons(n0->tot_len - vjlen + cs->cs_hlen)); in vj_uncompress_tcp()
H A Dpppoe.c734 ethhdr->type = lwip_htons(etype); in pppoe_output()
/third_party/lwip/src/netif/
H A Dethernet.c111 lwip_htons(ethhdr->type)));
143 netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, lwip_htons(type));
274 u16_t eth_type_be = lwip_htons(eth_type);
288 vlanhdr->prio_vid = lwip_htons((u16_t)vlan_prio_vid);
H A Dlowpan6_common.c729 udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
730 udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset + 3]); in lowpan6_decompress_hdr()
733 udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
734 udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); in lowpan6_decompress_hdr()
737 udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); in lowpan6_decompress_hdr()
738 udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset + 2]); in lowpan6_decompress_hdr()
741 udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); in lowpan6_decompress_hdr()
742 udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); in lowpan6_decompress_hdr()
746 udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
752 udphdr->len = lwip_htons(datagram_siz in lowpan6_decompress_hdr()
[all...]
H A Dzepif.c197 zep->device_id = lwip_htons(1); /* whatever */ in zepif_linkoutput()
/third_party/lwip/test/unit/ip4/
H A Dtest_ip4.c32 IPH_LEN_SET(iphdr, lwip_htons(p->tot_len)); in create_ip4_input_fragment()
33 IPH_ID_SET(iphdr, lwip_htons(ip_id)); in create_ip4_input_fragment()
35 IPH_OFFSET_SET(iphdr, lwip_htons(start / 8)); in create_ip4_input_fragment()
37 IPH_OFFSET_SET(iphdr, lwip_htons((start / 8) | IP_MF)); in create_ip4_input_fragment()
/third_party/lwip/src/core/
H A Ddef.c10 * \#define lwip_htons(x) your_htons
68 #if !defined(lwip_htons)
76 lwip_htons(u16_t n) in lwip_htons() function
80 #endif /* lwip_htons */
H A Dinet_chksum.c110 /* This maybe a little confusing: reorder sum using lwip_htons() in lwip_standard_chksum()
113 return lwip_htons((u16_t)acc); in lwip_standard_chksum()
285 acc += (u32_t)lwip_htons((u16_t)proto); in inet_cksum_pseudo_base()
286 acc += (u32_t)lwip_htons(proto_len); in inet_cksum_pseudo_base()
431 acc += (u32_t)lwip_htons((u16_t)proto); in inet_cksum_pseudo_partial_base()
432 acc += (u32_t)lwip_htons(proto_len); in inet_cksum_pseudo_partial_base()
H A Ddns.c828 hdr.id = lwip_htons(entry->txid); in dns_send()
1287 txid = lwip_htons(hdr.id); in dns_recv()
1295 nquestions = lwip_htons(hdr.numquestions); in dns_recv()
1296 nanswers = lwip_htons(hdr.numanswers); in dns_recv()
1438 if ((int)(res_idx + lwip_htons(ans.len)) > 0xFFFF) { in dns_recv()
1441 res_idx = (u16_t)(res_idx + lwip_htons(ans.len)); in dns_recv()
H A Dudp.c831 udphdr->src = lwip_htons(pcb->local_port);
832 udphdr->dest = lwip_htons(dst_port);
865 udphdr->len = lwip_htons(chklen_hdr);
896 udphdr->len = lwip_htons(q->tot_len);
H A Dtcp_out.c209 seg->tcphdr->src = lwip_htons(pcb->local_port); in tcp_create_segment()
210 seg->tcphdr->dest = lwip_htons(pcb->remote_port); in tcp_create_segment()
1497 seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd)); in tcp_output_segment()
1501 seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); in tcp_output_segment()
1843 tcphdr->src = lwip_htons(src_port); in tcp_output_alloc_header_common()
1844 tcphdr->dest = lwip_htons(dst_port); in tcp_output_alloc_header_common()
1848 tcphdr->wnd = lwip_htons(wnd); in tcp_output_alloc_header_common()
/third_party/lwip/src/apps/tftp/
H A Dtftp_server.c131 payload[1] = lwip_htons(code); in send_error()
151 payload[1] = lwip_htons(blknum); in send_ack()
190 payload[1] = lwip_htons(tftp_state.blknum); in send_data()
/third_party/lwip/src/apps/mdns/
H A Dmdns.c877 jump = lwip_htons(DOMAIN_JUMP | jump_offset); in mdns_write_domain()
929 field16 = lwip_htons(type); in mdns_add_question()
940 field16 = lwip_htons(klass); in mdns_add_question()
1034 field16 = lwip_htons(reply->write_offset - answer_offset); in mdns_add_answer()
1251 srvdata[0] = lwip_htons(SRV_PRIORITY); in mdns_add_srv_answer()
1252 srvdata[1] = lwip_htons(SRV_WEIGHT); in mdns_add_srv_answer()
1253 srvdata[2] = lwip_htons(service->port); in mdns_add_srv_answer()
1477 hdr.numquestions = lwip_htons(outpkt->questions); in mdns_send_outpacket()
1478 hdr.numanswers = lwip_htons(outpkt->answers); in mdns_send_outpacket()
1479 hdr.numauthrr = lwip_htons(outpk in mdns_send_outpacket()
[all...]
/third_party/lwip/src/include/lwip/distributed_net/
H A Ddistributed_net.h57 (addr)->sin_port = lwip_htons(port); \
/third_party/lwip/test/unit/udp/
H A Dtest_udp.c195 uh->dest = uh->src = lwip_htons(port); in test_udp_create_test_packet()
196 uh->len = lwip_htons(p->tot_len); in test_udp_create_test_packet()
203 ih->_len = lwip_htons(p->tot_len); in test_udp_create_test_packet()
/third_party/lwip/src/api/
H A Dnetdb.c381 sa6->sin6_port = lwip_htons((u16_t)port_nr); in lwip_getaddrinfo()
393 sa4->sin_port = lwip_htons((u16_t)port_nr); in lwip_getaddrinfo()
H A Dsockets.c100 (sin)->sin_port = lwip_htons((port)); \
112 (sin6)->sin6_port = lwip_htons((port)); \
/third_party/lwip/src/core/ipv4/
H A Dip4_frag.c649 IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); in ip4_reass()
880 IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); in ip4_frag()
881 IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); in ip4_frag()
H A Detharp.c768 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode)));
1167 hdr->opcode = lwip_htons(opcode);
H A Dip4.c966 IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
971 IPH_ID_SET(iphdr, lwip_htons(ip_id));
/third_party/lwip/src/core/ipv6/
H A Dip6_frag.c641 iphdr_ptr->_plen = lwip_htons(ipr->datagram_len); in ip6_reass()
856 frag_hdr->_fragment_offset = lwip_htons((u16_t)((fragment_offset & IP6_FRAG_OFFSET_MASK) | (last ? 0 : IP6_FRAG_MORE_FLAG))); in ip6_frag()

Completed in 35 milliseconds

12