| /freebsd-14.2/tests/sys/netgraph/ |
| H A D | vlan_rotate.c | 61 .vlan[0] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(1, 0, 0))}, 62 .vlan[1] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(2, 0, 0))}, 63 .vlan[2] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(3, 0, 0))}, 64 .vlan[3] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(4, 0, 0))}, 65 .vlan[4] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(5, 0, 0))}, 66 .vlan[5] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(6, 0, 0))}, 67 .vlan[6] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(7, 0, 0))}, 68 .vlan[7] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(8, 0, 0))}, 69 .vlan[8] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(9, 0, 0))}, 106 msg.vlan[len].proto = htons(ETHERTYPE_IP); in _basic() [all …]
|
| /freebsd-14.2/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-14.2/sbin/ipf/ipsend/ |
| H A D | iptests.c | 116 u->uh_sport = htons(1); in ip_test1() 117 u->uh_dport = htons(9); in ip_test1() 305 u->uh_dport = htons(9); in ip_test1() 336 u->uh_dport = htons(9); in ip_test1() 376 u->uh_dport = htons(9); in ip_test1() 757 u->uh_sport = htons(1); in ip_test4() 758 u->uh_dport = htons(1); in ip_test4() 912 t->th_sport = htons(1); in ip_test5() 913 t->th_dport = htons(1); in ip_test5() 1082 t->th_dport = htons(i); in ip_test5() [all …]
|
| H A D | ip.c | 71 eh->ether_type = htons(ETHERTYPE_IP); in send_ether() 119 ip->ip_len = htons(iplen); in send_ip() 124 ip->ip_id = htons(id++); in send_ip() 196 ip->ip_off |= htons(IP_MF); in send_ip() 202 ip->ip_off ^= htons(IP_MF); in send_ip() 207 ip->ip_off &= htons(0xe000); in send_ip() 208 ip->ip_off |= htons(sent >> 3); in send_ip() 210 ip->ip_len = htons(ts); in send_ip() 263 t2->th_win = htons(4096); in send_tcp() 276 ip2->ip_len = htons(thlen); in send_tcp() [all …]
|
| /freebsd-14.2/sys/compat/linuxkpi/common/include/linux/ |
| H A D | printk.h | 36 #define GID_PRINT_ARGS(gid_raw) htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\ 37 htons(((u16 *)gid_raw)[2]), htons(((u16 *)gid_raw)[3]),\ 38 htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\ 39 htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7])
|
| /freebsd-14.2/stand/libsa/ |
| H A D | arp.c | 99 ah->arp_hrd = htons(ARPHRD_ETHER); in arpwhohas() 100 ah->arp_pro = htons(ETHERTYPE_IP); in arpwhohas() 103 ah->arp_op = htons(ARPOP_REQUEST); in arpwhohas() 192 if (ah->arp_hrd != htons(ARPHRD_ETHER) || in arprecv() 193 ah->arp_pro != htons(ETHERTYPE_IP) || in arprecv() 205 if (ah->arp_op == htons(ARPOP_REQUEST)) { in arprecv() 215 if (ah->arp_op != htons(ARPOP_REPLY)) { in arprecv() 256 if (arp->arp_hrd != htons(ARPHRD_ETHER) || in arp_reply() 257 arp->arp_pro != htons(ETHERTYPE_IP) || in arp_reply() 268 if (arp->arp_op != htons(ARPOP_REQUEST)) { in arp_reply() [all …]
|
| H A D | rarp.c | 86 ap->arp_hrd = htons(ARPHRD_ETHER); in rarp_getipaddress() 87 ap->arp_pro = htons(ETHERTYPE_IP); in rarp_getipaddress() 90 ap->arp_op = htons(ARPOP_REVREQUEST); in rarp_getipaddress() 174 if (ap->arp_hrd != htons(ARPHRD_ETHER) || in rarprecv() 175 ap->arp_pro != htons(ETHERTYPE_IP) || in rarprecv() 187 if (ap->arp_op != htons(ARPOP_REVREPLY)) { in rarprecv()
|
| H A D | tftp.c | 155 wbuf.t.th_opcode = htons((u_short)ERROR); in tftp_senderr() 156 wbuf.t.th_code = htons(errcode); in tftp_senderr() 175 wbuf.t.th_opcode = htons((u_short)ACK); in tftp_sendack() 177 wbuf.t.th_block = htons(block); in tftp_sendack() 210 if (htons(t->th_block) < (u_short)d->xid) { in recvtftp() 214 tftp_sendack(h, htons(t->th_block)); in recvtftp() 218 if (htons(t->th_block) != (u_short)d->xid) { in recvtftp() 321 wbuf.t.th_opcode = htons((u_short)RRQ); in tftp_makereq() 347 h->iodesc->destport = htons(IPPORT_TFTP); in tftp_makereq() 406 wbuf.t.th_opcode = htons((u_short)ACK); in tftp_getnextblock() [all …]
|
| /freebsd-14.2/sys/netgraph/netflow/ |
| H A D | netflow_v9.c | 139 *p++ = htons(flowset_size); /* Total FlowSet length */ in generate_v9_templates() 147 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_id); in generate_v9_templates() 150 *template_fields_cnt = htons(cnt); in generate_v9_templates() 161 *template_fields_cnt = htons(cnt); in generate_v9_templates() 188 *flowset_length = htons(len); in close_flowset() 222 header->count = htons(t->count); in export9_send() 270 rec->i_ifx = htons(fed->fle_i_ifx); in export9_add() 271 rec->o_ifx = htons(fed->fle_o_ifx); in export9_add() 301 rec->i_ifx = htons(fed6->fle_i_ifx); in export9_add() 302 rec->o_ifx = htons(fed6->fle_o_ifx); in export9_add() [all …]
|
| /freebsd-14.2/lib/libsdp/ |
| H A D | service.c | 69 pdu.tid = htons(++ss->tid); in sdp_register_service() 70 pdu.len = htons(sizeof(uuid) + sizeof(*bdaddr) + datalen); in sdp_register_service() 72 uuid = htons(uuid); in sdp_register_service() 133 pdu.tid = htons(++ss->tid); in sdp_unregister_service() 134 pdu.len = htons(sizeof(handle)); in sdp_unregister_service() 177 pdu.tid = htons(++ss->tid); in sdp_change_service() 178 pdu.len = htons(sizeof(handle) + datalen); in sdp_change_service() 180 handle = htons(handle); in sdp_change_service()
|
| /freebsd-14.2/tests/sys/netinet/ |
| H A D | ip_reass_test.c | 72 ip->ip_sum = htons((uint16_t)cksum); in update_cksum() 93 ip->ip_len = htons(sizeof(*ip) + payloadlen); in alloc_lopacket() 212 ip->ip_off = htons(0x10); in ATF_TC_BODY() 218 ip->ip_off = htons(0x20); in ATF_TC_BODY() 224 ip->ip_off = htons(0x8); in ATF_TC_BODY() 230 ip->ip_off = htons(0x10); in ATF_TC_BODY() 242 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-14.2/contrib/tcp_wrappers/ |
| H A D | rfc931.c | 150 ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT); 151 ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT); 154 ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT); 155 ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT); 165 our_query_sin.sin_port = htons(ANY_PORT); 167 rmt_query_sin.sin_port = htons(RFC931_PORT);
|
| /freebsd-14.2/sbin/ipf/libipf/ |
| H A D | ipft_tx.c | 244 tcp->th_sport = htons(tx_portnum(last)); in parseline() 246 tcp->th_win = htons(4096); in parseline() 264 tcp->th_dport = htons(tx_portnum(last)); in parseline() 281 tcp->th_urp = htons(1); in parseline() 306 ic->icmp_id = htons(getpid()); in parseline() 328 ip->ip_len = htons(ip->ip_len); in parseline() 404 tcp->th_sport = htons(tx_portnum(last)); in parseipv6() 406 tcp->th_win = htons(4096); in parseipv6() 452 tcp->th_urp = htons(1); in parseipv6() 476 ic6->icmp6_id = htons(getpid()); in parseipv6() [all …]
|
| H A D | portname.c | 22 if ((sv = getservbyport(htons(port), "tcp"))) { in portname() 25 sv1 = getservbyport(htons(port), "udp"); in portname() 32 if ((sv = getservbyport(htons(port), p->p_name))) { in portname()
|
| /freebsd-14.2/usr.bin/talk/ |
| H A D | get_iface.c | 56 remote.sin_port = htons(60000); in get_iface() 61 local.sin_port = htons(60000); in get_iface() 71 local.sin_port = htons(ntohs(local.sin_port) + 1); in get_iface() 81 remote.sin_port = htons(ntohs(remote.sin_port) + 1); in get_iface()
|
| /freebsd-14.2/usr.sbin/bhyve/ |
| H A D | rfb.c | 302 supdt_msg.numrects = htons(1); in rfb_send_resize_update_msg() 306 srect_hdr.x = htons(0); in rfb_send_resize_update_msg() 307 srect_hdr.y = htons(0); in rfb_send_resize_update_msg() 323 supdt_msg.numrects = htons(1); in rfb_send_extended_keyevent_update_msg() 327 srect_hdr.x = htons(0); in rfb_send_extended_keyevent_update_msg() 328 srect_hdr.y = htons(0); in rfb_send_extended_keyevent_update_msg() 507 srect_hdr.x = htons(x); in rfb_send_rect() 508 srect_hdr.y = htons(y); in rfb_send_rect() 509 srect_hdr.width = htons(w); in rfb_send_rect() 510 srect_hdr.height = htons(h); in rfb_send_rect() [all …]
|
| /freebsd-14.2/usr.sbin/traceroute6/ |
| H A D | traceroute6.c | 858 Nxt.sin6_port = htons(DUMMY_PORT); in main() 884 Src.sin6_port = htons(0); in main() 1133 Dst.sin6_port = htons(port + seq); in send_probe() 1143 icp->icmp6_seq = htons(seq); in send_probe() 1147 outudp->uh_sport = htons(ident); in send_probe() 1149 outudp->uh_ulen = htons(datalen); in send_probe() 1159 sctp->src_port = htons(ident); in send_probe() 1194 htons((u_int16_t)(datalen - in send_probe() 1208 chk->chunk_length = htons(4); in send_probe() 1225 tcp->th_sport = htons(ident); in send_probe() [all …]
|
| /freebsd-14.2/share/examples/find_interface/ |
| H A D | find_interface.c | 73 remote.sin_port = htons(60000); in main() 78 local.sin_port = htons(60000); in main() 88 local.sin_port = htons(ntohs(local.sin_port) + 1); in main() 96 remote.sin_port = htons(ntohs(remote.sin_port) + 1); in main()
|
| /freebsd-14.2/libexec/tftpd/ |
| H A D | tftp-io.c | 151 tp->th_opcode = htons((u_short)ERROR); in send_error() 152 tp->th_code = htons((u_short)error); in send_error() 191 tp->th_opcode = htons((u_short)WRQ); in send_wrq() 239 tp->th_opcode = htons((u_short)RRQ); in send_rrq() 292 tp->th_opcode = htons((u_short)OACK); in send_oack() 332 tp->th_opcode = htons((u_short)ACK); in send_ack() 333 tp->th_block = htons((u_short)block); in send_ack() 363 pkt->th_opcode = htons((u_short)DATA); in send_data() 364 pkt->th_block = htons((u_short)block); in send_data()
|
| /freebsd-14.2/tools/tools/net80211/wesside/dics/ |
| H A D | dics.c | 171 if ( htons(uh->uh_dport) != DPORT) 201 ph->ippseudo_len = htons(len); in udp_checksum() 239 iph->ip_len = htons(20+8+dlen); in send_stuff() 240 iph->ip_id = htons(666); in send_stuff() 251 dst.sin_port = htons(port); in send_stuff() 257 uh->uh_sport = htons(DPORT); in send_stuff() 258 uh->uh_dport = htons(port); in send_stuff() 259 uh->uh_ulen = htons(8+dlen); in send_stuff() 341 s_in.sin_port = htons(DPORT); in main()
|
| /freebsd-14.2/contrib/traceroute/ |
| H A D | traceroute.c | 797 outip->ip_len = htons(packlen); in main() 798 outip->ip_off = htons(off); in main() 1548 outudp->uh_ulen = htons(8); in udplite_prep() 1572 tcp->th_sport = htons(ident); in tcp_prep() 1602 sctp->src_port = htons(ident); in sctp_prep() 1637 htons((u_int16_t)(protlen - in sctp_prep() 1652 chk->chunk_length = htons(4); in sctp_prep() 1695 gre->flags = htons(0x2001); in gre_prep() 1696 gre->proto = htons(port); in gre_prep() 1715 ptr[0] = htons(ident); in gen_prep() [all …]
|
| /freebsd-14.2/tests/sys/netinet/libalias/ |
| H A D | util.c | 102 p->ip_len = htons(len); in ip_packet() 118 u->uh_sport = htons(sport); in set_udp() 119 u->uh_dport = htons(dport); in set_udp() 120 u->uh_ulen = htons(payload); in set_udp()
|
| H A D | perf.c | 122 int aport = htons(rand_range(1000, 2000)); in main() 123 int sport = htons(rand_range(1000, 2000)); in main() 160 batch[i].aport = htons(u->uh_sport); in main() 163 u->uh_dport == htons(batch[i].dport) && in main() 244 u->uh_sport == htons(batch[k].dport) && in main() 245 u->uh_dport == htons(batch[k].sport) && in main() 258 u->uh_sport == htons(batch[k].aport) && in main() 259 u->uh_dport == htons(batch[k].dport) && in main()
|
| /freebsd-14.2/libexec/rbootd/ |
| H A D | rmpproto.c | 189 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendServerID() 242 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendFileNo() 311 rpl->r_brpl.rmp_session = htons(GenSessID()); in SendBootRepl() 312 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendBootRepl() 443 req->r_rrq.rmp_size = htons(RMPREADDATA); in SendReadRepl() 564 rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr)); in SendPacket() 569 rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP); in SendPacket() 570 rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP); in SendPacket()
|
| /freebsd-14.2/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()
|