Home
last modified time | relevance | path

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

12

/components/net/lwip/lwip-2.1.2/src/apps/netbiosns/
A Dnetbiosns.c373 if (netbios_question_hdr->type == PP_HTONS(NETB_QTYPE_NB)) { in netbiosns_recv()
385 resp->resp_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | in netbiosns_recv()
390 resp->resp_hdr.answerRRs = PP_HTONS(1); in netbiosns_recv()
400 …resp->resp_name.datalen = PP_HTONS(sizeof(resp->resp_name.flags) + sizeof(resp->resp_name.add… in netbiosns_recv()
401 resp->resp_name.flags = PP_HTONS(NETB_NFLAG_NODETYPE_BNODE); in netbiosns_recv()
412 } else if (netbios_question_hdr->type == PP_HTONS(NETB_QTYPE_NBSTAT)) { in netbiosns_recv()
431 …resp->answer_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | NETB_HFLAG_OPCODE_NAME_QUERY | N… in netbiosns_recv()
434 resp->answer_hdr.answerRRs = PP_HTONS(1); in netbiosns_recv()
442 resp->packet_type = PP_HTONS(0x21); in netbiosns_recv()
444 resp->cls = PP_HTONS(1); in netbiosns_recv()
[all …]
/components/net/lwip/lwip-2.0.3/src/apps/tftp/
A Dtftp_server.c130 payload[0] = PP_HTONS(TFTP_ERROR); in send_error()
150 payload[0] = PP_HTONS(TFTP_ACK); in send_ack()
189 payload[0] = PP_HTONS(TFTP_DATA); in send_data()
225 case PP_HTONS(TFTP_RRQ): /* fall through */ in recv()
226 case PP_HTONS(TFTP_WRQ): in recv()
257 tftp_state.handle = tftp_state.ctx->open(filename, mode, opcode == PP_HTONS(TFTP_WRQ)); in recv()
265 …LWIP_DEBUGF(TFTP_DEBUG | LWIP_DBG_STATE, ("tftp: %s request from ", (opcode == PP_HTONS(TFTP_WRQ))… in recv()
272 if (opcode == PP_HTONS(TFTP_WRQ)) { in recv()
283 case PP_HTONS(TFTP_DATA): in recv()
315 case PP_HTONS(TFTP_ACK): in recv()
/components/net/lwip/lwip-2.1.2/src/apps/tftp/
A Dtftp_server.c130 payload[0] = PP_HTONS(TFTP_ERROR); in send_error()
150 payload[0] = PP_HTONS(TFTP_ACK); in send_ack()
189 payload[0] = PP_HTONS(TFTP_DATA); in send_data()
225 case PP_HTONS(TFTP_RRQ): /* fall through */ in recv()
226 case PP_HTONS(TFTP_WRQ): { in recv()
256 tftp_state.handle = tftp_state.ctx->open(filename, mode, opcode == PP_HTONS(TFTP_WRQ)); in recv()
264 …LWIP_DEBUGF(TFTP_DEBUG | LWIP_DBG_STATE, ("tftp: %s request from ", (opcode == PP_HTONS(TFTP_WRQ))… in recv()
271 if (opcode == PP_HTONS(TFTP_WRQ)) { in recv()
282 case PP_HTONS(TFTP_DATA): { in recv()
322 case PP_HTONS(TFTP_ACK): { in recv()
/components/net/lwip/lwip-2.0.3/src/netif/
A Dethernet.c109 if (type == PP_HTONS(ETHTYPE_VLAN)) {
167 case PP_HTONS(ETHTYPE_IP):
184 case PP_HTONS(ETHTYPE_ARP):
204 case PP_HTONS(ETHTYPE_PPPOEDISC): /* PPP Over Ethernet Discovery Stage */
208 case PP_HTONS(ETHTYPE_PPPOE): /* PPP Over Ethernet Session Stage */
214 case PP_HTONS(ETHTYPE_IPV6): /* IPv6 */
285 eth_type_be = PP_HTONS(ETHTYPE_VLAN);
/components/net/lwip/lwip-2.1.2/src/netif/
A Dethernet.c115 if (type == PP_HTONS(ETHTYPE_VLAN)) {
173 case PP_HTONS(ETHTYPE_IP):
190 case PP_HTONS(ETHTYPE_ARP):
210 case PP_HTONS(ETHTYPE_PPPOEDISC): /* PPP Over Ethernet Discovery Stage */
214 case PP_HTONS(ETHTYPE_PPPOE): /* PPP Over Ethernet Session Stage */
220 case PP_HTONS(ETHTYPE_IPV6): /* IPv6 */
290 eth_type_be = PP_HTONS(ETHTYPE_VLAN);
/components/net/lwip/lwip-1.4.1/src/include/lwip/
A Ddef.h88 #define PP_HTONS(x) (x) macro
108 #define PP_HTONS(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
109 #define PP_NTOHS(x) PP_HTONS(x)
/components/net/lwip/lwip-2.0.3/src/include/lwip/
A Ddef.h79 #define PP_HTONS(x) (x) macro
97 #define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8))
98 #define PP_NTOHS(x) PP_HTONS(x)
/components/net/lwip/lwip-2.1.2/src/include/lwip/
A Ddef.h90 #define PP_HTONS(x) ((u16_t)(x)) macro
108 #define PP_HTONS(x) ((u16_t)((((x) & (u16_t)0x00ffU) << 8) | (((x) & (u16_t)0xff00U) >> 8)))
109 #define PP_NTOHS(x) PP_HTONS(x)
/components/net/lwip/lwip-2.0.3/src/apps/netbiosns/
A Dnetbiosns.c284 resp->resp_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | in netbiosns_recv()
289 resp->resp_hdr.answerRRs = PP_HTONS(1); in netbiosns_recv()
299 …resp->resp_name.datalen = PP_HTONS(sizeof(resp->resp_name.flags)+sizeof(resp->resp_name.addr)… in netbiosns_recv()
300 resp->resp_name.flags = PP_HTONS(NETB_NFLAG_NODETYPE_BNODE); in netbiosns_recv()
/components/net/lwip/lwip-1.4.1/src/netif/
A Detharp.c423 ethhdr->type = PP_HTONS(ETHTYPE_IP); in etharp_send_ip()
651 if (ethhdr->type == PP_HTONS(ETHTYPE_VLAN)) {
725 (hdr->proto != PP_HTONS(ETHTYPE_IP))) {
767 case PP_HTONS(ARP_REQUEST):
818 case PP_HTONS(ARP_REPLY):
1231 hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET);
1232 hdr->proto = PP_HTONS(ETHTYPE_IP);
1237 ethhdr->type = PP_HTONS(ETHTYPE_ARP);
1304 if (type == PP_HTONS(ETHTYPE_VLAN)) {
1349 case PP_HTONS(ETHTYPE_IP):
[all …]
/components/net/lwip/lwip-1.4.1/src/core/ipv4/
A Dicmp.c195 if (iecho->chksum >= PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { in icmp_input()
196 iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; in icmp_input()
198 iecho->chksum += PP_HTONS(ICMP_ECHO << 8); in icmp_input()
A Dip.c253 if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) { in ip_forward()
254 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1); in ip_forward()
256 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100)); in ip_forward()
527 if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
530 …ntohs(IPH_ID(iphdr)), p->tot_len, ntohs(IPH_LEN(iphdr)), !!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), …
/components/net/lwip/lwip-2.0.3/src/core/
A Ddns.c787 hdr.numquestions = PP_HTONS(1); in dns_send()
810 qry.type = PP_HTONS(DNS_RRTYPE_AAAA); in dns_send()
812 qry.type = PP_HTONS(DNS_RRTYPE_A); in dns_send()
814 qry.cls = PP_HTONS(DNS_RRCLASS_IN); in dns_send()
1215 if ((qry.cls != PP_HTONS(DNS_RRCLASS_IN)) || in dns_recv()
1216 … (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || in dns_recv()
1217 … (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { in dns_recv()
1241 if (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) { in dns_recv()
1243 … if ((ans.type == PP_HTONS(DNS_RRTYPE_A)) && (ans.len == PP_HTONS(sizeof(ip4_addr_t)))) { in dns_recv()
1262 … if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_t)))) { in dns_recv()
A Ddef.c78 return (u16_t)PP_HTONS(n); in lwip_htons()
/components/net/lwip/lwip-2.1.2/src/core/
A Ddns.c822 hdr.numquestions = PP_HTONS(1); in dns_send()
849 qry.type = PP_HTONS(DNS_RRTYPE_AAAA); in dns_send()
851 qry.type = PP_HTONS(DNS_RRTYPE_A); in dns_send()
853 qry.cls = PP_HTONS(DNS_RRCLASS_IN); in dns_send()
1290 if ((qry.cls != PP_HTONS(DNS_RRCLASS_IN)) || in dns_recv()
1291 … (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || in dns_recv()
1292 … (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { in dns_recv()
1336 if (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) { in dns_recv()
1338 … if ((ans.type == PP_HTONS(DNS_RRTYPE_A)) && (ans.len == PP_HTONS(sizeof(ip4_addr_t)))) { in dns_recv()
1357 … if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_p_t)))) { in dns_recv()
A Ddef.c78 return PP_HTONS(n); in lwip_htons()
/components/net/lwip/lwip-1.4.1/src/core/
A Ddns.c599 hdr->numquestions = PP_HTONS(1); in dns_send()
619 qry.type = PP_HTONS(DNS_RRTYPE_A); in dns_send()
620 qry.cls = PP_HTONS(DNS_RRCLASS_IN); in dns_send()
817 if((ans.type == PP_HTONS(DNS_RRTYPE_A)) && (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) && in dns_recv()
818 (ans.len == PP_HTONS(sizeof(ip_addr_t))) ) { in dns_recv()
/components/net/lwip/lwip-2.0.3/src/core/ipv4/
A Dicmp.c212 if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { in icmp_input()
213 iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; in icmp_input()
215 iecho->chksum += PP_HTONS(ICMP_ECHO << 8); in icmp_input()
A Detharp.c653 if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) ||
656 (hdr->proto != PP_HTONS(ETHTYPE_IP))) {
698 case PP_HTONS(ARP_REQUEST):
722 case PP_HTONS(ARP_REPLY):
1141 hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET);
1142 hdr->proto = PP_HTONS(ETHTYPE_IP);
A Dip4.c320 if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) { in ip4_forward()
321 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1); in ip4_forward()
323 IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100)); in ip4_forward()
613 if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
616 …, p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)(…
/components/net/lwip/lwip-2.1.2/src/core/ipv4/
A Dicmp.c219 if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { in icmp_input()
220 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); in icmp_input()
222 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); in icmp_input()
A Detharp.c655 if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
658 (hdr->proto != PP_HTONS(ETHTYPE_IP))) {
700 case PP_HTONS(ARP_REQUEST):
724 case PP_HTONS(ARP_REPLY):
1140 hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
1141 hdr->proto = PP_HTONS(ETHTYPE_IP);
/components/net/lwip/lwip-2.0.3/src/include/lwip/prot/
A Dtcp.h87 …hdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lw…
/components/net/lwip/lwip-2.1.2/src/include/lwip/prot/
A Dtcp.h90 …hdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lw…
/components/net/netdev/include/
A Dnetdev_ipaddr.h73 #define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) macro
74 #define PP_NTOHS(x) PP_HTONS(x)
81 #define htons(x) (uint16_t)PP_HTONS(x)

Completed in 45 milliseconds

12