Home
last modified time | relevance | path

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

12

/busybox-1.35.0/networking/
Ddnsd.c181 if (type == htons(REQ_A)) { in table_lookup()
402 if (head->flags & htons(0x8000)) { /* QR bit */ in process_packet()
423 outr_flags = htons(0x8000 | 4); in process_packet()
427 if ((head->flags & htons(0x7800)) != 0) { in process_packet()
432 if (class != htons(1)) { /* not class INET? */ in process_packet()
437 if (type != htons(REQ_A) && type != htons(REQ_PTR)) { in process_packet()
451 if (answstr && type == htons(REQ_PTR)) { in process_packet()
462 outr_flags = htons(0x8000 | 0x0400 | 3); in process_packet()
471 move_to_unaligned16((uint16_t *)answb, htons(outr_rlen)); in process_packet()
485 outr_flags = htons(0x8000 | 0x0400 | 0); in process_packet()
[all …]
Darping.c121 ah->ar_hrd = htons(ARPHRD_ETHER); in send_pack()
122 ah->ar_pro = htons(ETH_P_IP); in send_pack()
125 ah->ar_op = option_mask32 & ADVERT ? htons(ARPOP_REPLY) : htons(ARPOP_REQUEST); in send_pack()
206 if (ah->ar_op != htons(ARPOP_REQUEST) && ah->ar_op != htons(ARPOP_REPLY)) in recv_pack()
210 if (ah->ar_hrd != htons(FROM->sll_hatype) in recv_pack()
211 && (FROM->sll_hatype != ARPHRD_FDDI || ah->ar_hrd != htons(ARPHRD_ETHER))) in recv_pack()
215 if (ah->ar_pro != htons(ETH_P_IP) in recv_pack()
256 ah->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest", in recv_pack()
284 if (ah->ar_op == htons(ARPOP_REQUEST)) in recv_pack()
369 G.probe_saddr.sin_port = htons(1025); in arping_main()
[all …]
Dzcip.c149 p.eth.ether_type = htons(ETHERTYPE_ARP); in send_arp_request()
154 p.arp.arp_hrd = htons(ARPHRD_ETHER); in send_arp_request()
155 p.arp.arp_pro = htons(ETHERTYPE_IP); in send_arp_request()
158 p.arp.arp_op = htons(op); in send_arp_request()
265 xmove_fd(xsocket(AF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)), sock_fd); in zcip_main()
478 if (p.eth.ether_type != htons(ETHERTYPE_ARP)) in zcip_main()
480 if (p.arp.arp_op != htons(ARPOP_REQUEST) in zcip_main()
481 && p.arp.arp_op != htons(ARPOP_REPLY) in zcip_main()
501 if (p.arp.arp_op == htons(ARPOP_REQUEST) in zcip_main()
Dpscan.c44 server = getservbyport(htons(port), NULL); in port_name()
102 set_nport(&lsap->u.sa, htons(port)); in pscan_main()
Dtraceroute.c525 icp->icmp_seq = htons(seq); in send_probe()
578 set_nport(&dest_lsa->u.sa, htons(port + seq)); in send_probe()
681 && icp->icmp_seq == htons(seq) in packet4_ok()
708 && hicmp->icmp_seq == htons(seq) in packet4_ok()
721 && up->dest == htons(port + seq) in packet4_ok()
724 && up->uh_dport == htons(port + seq) in packet4_ok()
760 && icp->icmp6_seq == htons(seq) in packet6_ok()
1040 ident = htons(ident); in traceroute_init()
1088 set_nport(&dest_lsa->u.sa, htons(port)); in traceroute_init()
Dnbd-client.c204 ro = !!(old_nbd_header.flags & htons(2)); in nbdclient_main()
236 ro = !!(new_nbd_header.transmission_flags & htons(2)); in nbdclient_main()
Dping.c381 G.myid = htons(G.myid); in common_ping_main()
568 pkt->icmp_seq = htons(G.ntransmitted); /* don't ++ here, it can be a macro */ in sendping4()
591 pkt->icmp6_seq = htons(G.ntransmitted); /* don't ++ here, it can be a macro */ in sendping6()
980 myid = htons(myid); in common_ping_main()
Dftpgetput.c166 set_nport(&lsa->u.sa, htons(port_num)); in xconnect_ftpdata()
Dnc_bloaty.c512 set_nport(&themaddr->u.sa, htons(SLEAZE_PORT)); in udptest()
850 set_nport(&ouraddr->u.sa, htons(o_lport)); in nc_main()
Dtftp.c520 *((uint16_t*)cp) = htons(block_nr);
538 *((uint16_t*)xbuf) = htons(opcode); /* fill in opcode part */
Dtcpudp.c486 set_nport(&localp->u.sa, htons(local_port)); in tcpudpsvd_main()
/busybox-1.35.0/networking/udhcp/
Darpping.c55 s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)); in arpping()
70 arp.h_proto = htons(ETH_P_ARP); /* protocol type (Ethernet) */ in arpping()
71 arp.htype = htons(ARPHRD_ETHER); /* hardware type */ in arpping()
72 arp.ptype = htons(ETH_P_IP); /* protocol type (ARP message) */ in arpping()
75 arp.operation = htons(ARPOP_REQUEST); /* ARP op code */ in arpping()
110 && arp.operation == htons(ARPOP_REPLY) in arpping()
Dd6_packet.c66 fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); in d6_send_raw_packet_from_client_data_ifindex()
77 dest_sll.sll_protocol = htons(ETH_P_IPV6); in d6_send_raw_packet_from_client_data_ifindex()
93 packet.udp.source = htons(source_port); in d6_send_raw_packet_from_client_data_ifindex()
94 packet.udp.dest = htons(dest_port); in d6_send_raw_packet_from_client_data_ifindex()
96 packet.udp.len = htons(sizeof(struct udphdr) + d6_pkt_size); in d6_send_raw_packet_from_client_data_ifindex()
149 sa.sin6_port = htons(source_port); in d6_send_kernel_packet_from_client_data_ifindex()
158 sa.sin6_port = htons(dest_port); in d6_send_kernel_packet_from_client_data_ifindex()
Dpacket.c118 fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in udhcp_send_raw_packet()
129 dest_sll.sll_protocol = htons(ETH_P_IP); in udhcp_send_raw_packet()
162 packet.udp.source = htons(source_port); in udhcp_send_raw_packet()
163 packet.udp.dest = htons(dest_port); in udhcp_send_raw_packet()
165 packet.udp.len = htons(UDP_DHCP_SIZE - padding); in udhcp_send_raw_packet()
171 packet.ip.tot_len = htons(IP_UDP_DHCP_SIZE - padding); in udhcp_send_raw_packet()
226 sa.sin_port = htons(source_port); in udhcp_send_kernel_packet()
235 sa.sin_port = htons(dest_port); in udhcp_send_kernel_packet()
Dsocket.c105 addr.sin_port = htons(port); in udhcp_listen_socket()
Dd6_socket.c126 addr.sin6_port = htons(port); in d6_listen_socket()
Ddhcpc.c614 packet->secs = (secs < 0xffff) ? htons(secs) : 0xffff; in init_packet()
623 udhcp_add_simple_option(packet, DHCP_MAX_SIZE, htons(IP_UDP_DHCP_SIZE)); in add_client_options()
644 packet->flags |= htons(BROADCAST_FLAG); in add_client_options()
932 || packet.udp.dest != htons(CLIENT_PORT) in d4_recv_raw_packet()
1019 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in udhcp_raw_socket()
1027 sock.sll_protocol = htons(ETH_P_IP); in udhcp_raw_socket()
Dd6_dhcpc.c502 *((uint16_t*)ptr) = (secs < 0xffff) ? htons(secs) : 0xffff; in init_d6_packet()
935 || packet.udp.dest != htons(CLIENT_PORT6) in d6_recv_raw_packet()
1046 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); in d6_raw_socket()
1050 sock.sll_protocol = htons(ETH_P_IPV6); in d6_raw_socket()
Ddhcprelay.c279 server_addr.sin_port = htons(SERVER_PORT); in dhcprelay_main()
/busybox-1.35.0/archival/
Dlzop.c964 h_version = htons(h->version_be16); in read_header()
967 h_version_needed_to_extract = htons(h->version_needed_to_extract_be16); in read_header()
1069 h->version_be16 = htons(LZOP_VERSION & 0xffff); in do_lzo_compress()
1070 h->version_needed_to_extract_be16 = htons(0x0940); in do_lzo_compress()
1071 h->lib_version_be16 = htons(lzo_version() & 0xffff); in do_lzo_compress()
/busybox-1.35.0/networking/libiproute/
Diptunnel.c19 #define __constant_htons htons
196 p->iph.frag_off = htons(IP_DF); in parse_args()
275 p->iph.frag_off = htons(IP_DF); in parse_args()
437 if (!(p->iph.frag_off & htons(IP_DF))) in print_tunnel()
Dll_proto.c181 *id = htons(i); in ll_proto_a2n()
Diplink.c195 me.sll_protocol = htons(ETH_P_LOOP); in get_address()
554 proto = htons(ETH_P_8021Q); in vlan_parse_opt()
556 proto = htons(ETH_P_8021AD); in vlan_parse_opt()
/busybox-1.35.0/libbb/
Dxconnect.c304 set_nport(&r->u.sa, htons(port));
392 set_nport(&lsa->u.sa, htons(port)); in create_and_bind_or_die()
/busybox-1.35.0/util-linux/
Dmount.c1670 mount_server_addr.sin_port = htons(pm_mnt.pm_port); in nfsmount()
1682 mount_server_addr.sin_port = htons(pm_mnt.pm_port); in nfsmount()
1816 server_addr.sin_port = htons(port); in nfsmount()

12