| /freebsd-12.1/contrib/ipfilter/ipsend/ |
| H A D | iptests.c | 128 u->uh_sport = htons(1); 129 u->uh_dport = htons(9); 317 u->uh_dport = htons(9); 348 u->uh_dport = htons(9); 388 u->uh_dport = htons(9); 777 u->uh_sport = htons(1); 778 u->uh_dport = htons(1); 936 t->th_sport = htons(1); 937 t->th_dport = htons(1); 1106 t->th_dport = htons(i); [all …]
|
| H A D | ip.c | 75 eh->ether_type = htons(ETHERTYPE_IP); 126 ip->ip_len = htons(iplen); 131 ip->ip_id = htons(id++); 203 ip->ip_off |= htons(IP_MF); 209 ip->ip_off ^= htons(IP_MF); 214 ip->ip_off &= htons(0xe000); 215 ip->ip_off |= htons(sent >> 3); 217 ip->ip_len = htons(ts); 272 t2->th_win = htons(4096); 285 ip2->ip_len = htons(thlen); [all …]
|
| /freebsd-12.1/contrib/sendmail/libsm/ |
| H A D | inet6_ntop.c | 45 , htons(u16[0]) 46 , htons(u16[1]) 47 , htons(u16[2]) 48 , htons(u16[3]) 49 , htons(u16[4]) 50 , htons(u16[5]) 51 , htons(u16[6]) 52 , htons(u16[7])
|
| /freebsd-12.1/sys/compat/linuxkpi/common/include/linux/ |
| H A D | printk.h | 38 #define GID_PRINT_ARGS(gid_raw) htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\ 39 htons(((u16 *)gid_raw)[2]), htons(((u16 *)gid_raw)[3]),\ 40 htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\ 41 htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7])
|
| /freebsd-12.1/stand/libsa/ |
| H A D | arp.c | 104 ah->arp_hrd = htons(ARPHRD_ETHER); in arpwhohas() 105 ah->arp_pro = htons(ETHERTYPE_IP); in arpwhohas() 108 ah->arp_op = htons(ARPOP_REQUEST); in arpwhohas() 197 if (ah->arp_hrd != htons(ARPHRD_ETHER) || in arprecv() 198 ah->arp_pro != htons(ETHERTYPE_IP) || in arprecv() 210 if (ah->arp_op == htons(ARPOP_REQUEST)) { in arprecv() 220 if (ah->arp_op != htons(ARPOP_REPLY)) { in arprecv() 261 if (arp->arp_hrd != htons(ARPHRD_ETHER) || in arp_reply() 262 arp->arp_pro != htons(ETHERTYPE_IP) || in arp_reply() 273 if (arp->arp_op != htons(ARPOP_REQUEST)) { in arp_reply() [all …]
|
| H A D | rarp.c | 91 ap->arp_hrd = htons(ARPHRD_ETHER); in rarp_getipaddress() 92 ap->arp_pro = htons(ETHERTYPE_IP); in rarp_getipaddress() 95 ap->arp_op = htons(ARPOP_REVREQUEST); in rarp_getipaddress() 179 if (ap->arp_hrd != htons(ARPHRD_ETHER) || in rarprecv() 180 ap->arp_pro != htons(ETHERTYPE_IP) || in rarprecv() 192 if (ap->arp_op != htons(ARPOP_REVREPLY)) { in rarprecv()
|
| H A D | tftp.c | 153 wbuf.t.th_opcode = htons((u_short)ERROR); in tftp_senderr() 154 wbuf.t.th_code = htons(errcode); in tftp_senderr() 173 wbuf.t.th_opcode = htons((u_short)ACK); in tftp_sendack() 175 wbuf.t.th_block = htons(block); in tftp_sendack() 207 if (htons(t->th_block) < (u_short)d->xid) { in recvtftp() 211 tftp_sendack(h, htons(t->th_block)); in recvtftp() 215 if (htons(t->th_block) != (u_short)d->xid) { in recvtftp() 314 wbuf.t.th_opcode = htons((u_short)RRQ); in tftp_makereq() 340 h->iodesc->destport = htons(IPPORT_TFTP); in tftp_makereq() 398 wbuf.t.th_opcode = htons((u_short)ACK); in tftp_getnextblock() [all …]
|
| /freebsd-12.1/sys/netgraph/netflow/ |
| H A D | netflow_v9.c | 143 *p++ = htons(flowset_size); /* Total FlowSet length */ in generate_v9_templates() 151 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_id); in generate_v9_templates() 154 *template_fields_cnt = htons(cnt); in generate_v9_templates() 165 *template_fields_cnt = htons(cnt); in generate_v9_templates() 192 *flowset_length = htons(len); in close_flowset() 226 header->count = htons(t->count); in export9_send() 276 rec->i_ifx = htons(fed->fle_i_ifx); in export9_add() 277 rec->o_ifx = htons(fed->fle_o_ifx); in export9_add() 307 rec->i_ifx = htons(fed6->fle_i_ifx); in export9_add() 308 rec->o_ifx = htons(fed6->fle_o_ifx); in export9_add() [all …]
|
| /freebsd-12.1/usr.sbin/bhyve/ |
| H A D | rfb.c | 238 supdt_msg.numrects = htons(1); in rfb_send_resize_update_msg() 242 srect_hdr.x = htons(0); in rfb_send_resize_update_msg() 243 srect_hdr.y = htons(0); in rfb_send_resize_update_msg() 329 supdt_msg.numrects = htons(1); in rfb_send_rect() 337 srect_hdr.x = htons(x); in rfb_send_rect() 338 srect_hdr.y = htons(y); in rfb_send_rect() 339 srect_hdr.width = htons(w); in rfb_send_rect() 340 srect_hdr.height = htons(h); in rfb_send_rect() 418 supdt_msg.numrects = htons(1); in rfb_send_all() 636 updt_msg.x = htons(updt_msg.x); in rfb_recv_update_msg() [all …]
|
| /freebsd-12.1/lib/libsdp/ |
| H A D | service.c | 70 pdu.tid = htons(++ss->tid); in sdp_register_service() 71 pdu.len = htons(sizeof(uuid) + sizeof(*bdaddr) + datalen); in sdp_register_service() 73 uuid = htons(uuid); in sdp_register_service() 134 pdu.tid = htons(++ss->tid); in sdp_unregister_service() 135 pdu.len = htons(sizeof(handle)); in sdp_unregister_service() 178 pdu.tid = htons(++ss->tid); in sdp_change_service() 179 pdu.len = htons(sizeof(handle) + datalen); in sdp_change_service() 181 handle = htons(handle); in sdp_change_service()
|
| /freebsd-12.1/tests/sys/netinet/ |
| H A D | ip_reass_test.c | 74 ip->ip_sum = htons((uint16_t)cksum); in update_cksum() 95 ip->ip_len = htons(sizeof(*ip) + payloadlen); in alloc_lopacket() 214 ip->ip_off = htons(0x10); in ATF_TC_BODY() 220 ip->ip_off = htons(0x20); in ATF_TC_BODY() 226 ip->ip_off = htons(0x8); in ATF_TC_BODY() 232 ip->ip_off = htons(0x10); in ATF_TC_BODY() 244 packet2->hdr.ip_off = htons(IP_MF | 0x20); in ATF_TC_BODY() 295 ip->ip_off = htons(IP_MF | 0x10); in ATF_TC_BODY() 301 ip->ip_off = htons(0x10); in ATF_TC_BODY() 347 ip->ip_off = htons(IP_MF | 0x1fff); in ATF_TC_BODY() [all …]
|
| /freebsd-12.1/contrib/tcp_wrappers/ |
| H A D | rfc931.c | 156 ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT); 157 ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT); 160 ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT); 161 ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT); 171 our_query_sin.sin_port = htons(ANY_PORT); 173 rmt_query_sin.sin_port = htons(RFC931_PORT);
|
| /freebsd-12.1/contrib/ipfilter/lib/ |
| H A D | ipft_tx.c | 252 tcp->th_sport = htons(tx_portnum(last)); 254 tcp->th_win = htons(4096); 272 tcp->th_dport = htons(tx_portnum(last)); 289 tcp->th_urp = htons(1); 314 ic->icmp_id = htons(getpid()); 336 ip->ip_len = htons(ip->ip_len); 415 tcp->th_sport = htons(tx_portnum(last)); 417 tcp->th_win = htons(4096); 463 tcp->th_urp = htons(1); 487 ic6->icmp6_id = htons(getpid()); [all …]
|
| H A D | portname.c | 23 if ((sv = getservbyport(htons(port), "tcp"))) { in portname() 26 sv1 = getservbyport(htons(port), "udp"); in portname() 33 if ((sv = getservbyport(htons(port), p->p_name))) { in portname()
|
| /freebsd-12.1/usr.sbin/traceroute6/ |
| H A D | traceroute6.c | 830 Nxt.sin6_port = htons(DUMMY_PORT); in main() 856 Src.sin6_port = htons(0); in main() 1062 Dst.sin6_port = htons(port + seq); in send_probe() 1072 icp->icmp6_seq = htons(seq); in send_probe() 1082 sctp->src_port = htons(ident); in send_probe() 1117 htons((u_int16_t)(datalen - in send_probe() 1131 chk->chunk_length = htons(4); in send_probe() 1148 tcp->th_sport = htons(ident); in send_probe() 1149 tcp->th_dport = htons(port + seq); in send_probe() 1352 icmp->icmp6_seq == htons(seq)) in packet_ok() [all …]
|
| /freebsd-12.1/usr.bin/talk/ |
| H A D | get_iface.c | 59 remote.sin_port = htons(60000); in get_iface() 64 local.sin_port = htons(60000); in get_iface() 74 local.sin_port = htons(ntohs(local.sin_port) + 1); in get_iface() 84 remote.sin_port = htons(ntohs(remote.sin_port) + 1); in get_iface()
|
| /freebsd-12.1/contrib/traceroute/ |
| H A D | traceroute.c | 788 outip->ip_len = htons(packlen); in main() 789 outip->ip_off = htons(off); in main() 1523 outudp->uh_ulen = htons(8); in udplite_prep() 1547 tcp->th_sport = htons(ident); in tcp_prep() 1577 sctp->src_port = htons(ident); in sctp_prep() 1612 htons((u_int16_t)(protlen - in sctp_prep() 1627 chk->chunk_length = htons(4); in sctp_prep() 1670 gre->flags = htons(0x2001); in gre_prep() 1671 gre->proto = htons(port); in gre_prep() 1690 ptr[0] = htons(ident); in gen_prep() [all …]
|
| /freebsd-12.1/share/examples/find_interface/ |
| H A D | find_interface.c | 75 remote.sin_port = htons(60000); in main() 80 local.sin_port = htons(60000); in main() 90 local.sin_port = htons(ntohs(local.sin_port) + 1); in main() 98 remote.sin_port = htons(ntohs(remote.sin_port) + 1); in main()
|
| /freebsd-12.1/tools/tools/net80211/wesside/dics/ |
| H A D | dics.c | 173 if ( htons(uh->uh_dport) != DPORT) 203 ph->ippseudo_len = htons(len); in udp_checksum() 241 iph->ip_len = htons(20+8+dlen); in send_stuff() 242 iph->ip_id = htons(666); in send_stuff() 253 dst.sin_port = htons(port); in send_stuff() 259 uh->uh_sport = htons(DPORT); in send_stuff() 260 uh->uh_dport = htons(port); in send_stuff() 261 uh->uh_ulen = htons(8+dlen); in send_stuff() 343 s_in.sin_port = htons(DPORT); in main()
|
| /freebsd-12.1/libexec/tftpd/ |
| H A D | tftp-io.c | 154 tp->th_opcode = htons((u_short)ERROR); in send_error() 155 tp->th_code = htons((u_short)error); in send_error() 196 tp->th_opcode = htons((u_short)WRQ); in send_wrq() 244 tp->th_opcode = htons((u_short)RRQ); in send_rrq() 297 tp->th_opcode = htons((u_short)OACK); in send_oack() 338 tp->th_opcode = htons((u_short)ACK); in send_ack() 339 tp->th_block = htons((u_short)block); in send_ack() 369 pkt->th_opcode = htons((u_short)DATA); in send_data() 370 pkt->th_block = htons((u_short)block); in send_data()
|
| /freebsd-12.1/libexec/rbootd/ |
| H A D | rmpproto.c | 191 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendServerID() 244 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendFileNo() 313 rpl->r_brpl.rmp_session = htons(GenSessID()); in SendBootRepl() 314 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendBootRepl() 444 req->r_rrq.rmp_size = htons(RMPREADDATA); in SendReadRepl() 565 rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr)); in SendPacket() 570 rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP); in SendPacket() 571 rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP); in SendPacket()
|
| /freebsd-12.1/sys/dev/mlx4/mlx4_core/ |
| H A D | mlx4_fw_qos.c | 134 htons(MLX4_RATELIMIT_100M_UNITS); in mlx4_SET_PORT_SCHEDULER() 138 htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER() 140 tc->max_bw_value = htons(r); in mlx4_SET_PORT_SCHEDULER() 142 tc->max_bw_value = htons(MLX4_RATELIMIT_DEFAULT); in mlx4_SET_PORT_SCHEDULER() 143 tc->max_bw_units = htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER() 146 tc->pg = htons(pg[i]); in mlx4_SET_PORT_SCHEDULER() 147 tc->bw_precentage = htons(tc_tx_bw[i]); in mlx4_SET_PORT_SCHEDULER()
|
| /freebsd-12.1/lib/libc/resolv/ |
| H A D | res_mkquery.c | 128 hp->id = htons(statp->id); in res_nmkquery() 154 hp->qdcount = htons(1); in res_nmkquery() 175 hp->arcount = htons(1); in res_nmkquery() 197 hp->ancount = htons(1); in res_nmkquery() 255 hp->arcount = htons(ntohs(hp->arcount) + 1); in res_nopt()
|
| /freebsd-12.1/sbin/dhclient/ |
| H A D | packet.c | 90 return (htons(sum)); in wrapsum() 106 eh.ether_type = htons(ETHERTYPE_IP); in assemble_hw_header() 122 ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len); in assemble_udp_ip_header() 135 udp.uh_sport = htons(LOCAL_PORT); /* XXX */ in assemble_udp_ip_header() 137 udp.uh_ulen = htons(sizeof(udp) + len); in assemble_udp_ip_header()
|
| /freebsd-12.1/include/protocols/ |
| H A D | routed.h | 72 #define RIP_AF_INET htons(AF_INET) 89 #define RIP_AUTH_PW htons(2) /* password type */ 90 #define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */
|