| /freebsd-12-stable/tests/sys/netgraph/ |
| 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-12-stable/sbin/ipf/ipsend/ |
| D | iptests.c | 117 u->uh_sport = htons(1); in ip_test1() 118 u->uh_dport = htons(9); in ip_test1() 120 u->uh_ulen = htons(sizeof(*u) + 4); in ip_test1() 202 ip->ip_id = htons(id++); in ip_test1() 213 ip->ip_id = htons(id++); in ip_test1() 232 ip->ip_id = htons(id++); in ip_test1() 245 ip->ip_id = htons(id++); in ip_test1() 263 ip->ip_off = htons(IP_MF); in ip_test1() 271 ip->ip_off = htons(IP_MF); in ip_test1() 279 ip->ip_off = htons(0xa000); in ip_test1() [all …]
|
| D | ip.c | 72 eh->ether_type = htons(ETHERTYPE_IP); in send_ether() 115 eh->ether_type = htons(ETHERTYPE_IP); in send_ip() 120 ip->ip_len = htons(iplen); in send_ip() 125 ip->ip_id = htons(id++); in send_ip() 197 ip->ip_off |= htons(IP_MF); in send_ip() 203 ip->ip_off ^= htons(IP_MF); in send_ip() 208 ip->ip_off &= htons(0xe000); in send_ip() 209 ip->ip_off |= htons(sent >> 3); in send_ip() 211 ip->ip_len = htons(ts); in send_ip() 222 else if (!(ip->ip_off & htons(0x1fff))) in send_ip() [all …]
|
| /freebsd-12-stable/contrib/sendmail/libsm/ |
| 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-stable/sys/compat/linuxkpi/common/include/linux/ |
| 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-stable/stand/libsa/ |
| 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 …]
|
| 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()
|
| 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() 339 h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff)); in tftp_makereq() 340 h->iodesc->destport = htons(IPPORT_TFTP); in tftp_makereq() [all …]
|
| /freebsd-12-stable/sys/netgraph/netflow/ |
| D | netflow_v9.c | 143 *p++ = htons(flowset_size); /* Total FlowSet length */ in generate_v9_templates() 148 *p++ = htons(NETFLOW_V9_MAX_RESERVED_FLOWSET + NETFLOW_V9_FLOW_V4_L4); in generate_v9_templates() 151 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_id); in generate_v9_templates() 152 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_length); in generate_v9_templates() 154 *template_fields_cnt = htons(cnt); in generate_v9_templates() 159 *p++ = htons(NETFLOW_V9_MAX_RESERVED_FLOWSET + NETFLOW_V9_FLOW_V6_L4); in generate_v9_templates() 162 *p++ = htons(_netflow_v9_record_ipv6_tcp[cnt].field_id); in generate_v9_templates() 163 *p++ = htons(_netflow_v9_record_ipv6_tcp[cnt].field_length); in generate_v9_templates() 165 *template_fields_cnt = htons(cnt); in generate_v9_templates() 192 *flowset_length = htons(len); in close_flowset() [all …]
|
| /freebsd-12-stable/usr.sbin/bhyve/ |
| D | rfb.c | 214 sinfo.width = htons(gc_image->width); in rfb_send_server_init_msg() 215 sinfo.height = htons(gc_image->height); in rfb_send_server_init_msg() 220 sinfo.pixfmt.red_max = htons(255); in rfb_send_server_init_msg() 221 sinfo.pixfmt.green_max = htons(255); in rfb_send_server_init_msg() 222 sinfo.pixfmt.blue_max = htons(255); in rfb_send_server_init_msg() 240 supdt_msg.numrects = htons(1); in rfb_send_resize_update_msg() 244 srect_hdr.x = htons(0); in rfb_send_resize_update_msg() 245 srect_hdr.y = htons(0); in rfb_send_resize_update_msg() 246 srect_hdr.width = htons(rc->width); in rfb_send_resize_update_msg() 247 srect_hdr.height = htons(rc->height); in rfb_send_resize_update_msg() [all …]
|
| /freebsd-12-stable/lib/libsdp/ |
| 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-stable/tests/sys/netinet/ |
| 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-stable/sbin/ipf/libipf/ |
| D | ipft_tx.c | 245 tcp->th_sport = htons(tx_portnum(last)); in parseline() 247 tcp->th_win = htons(4096); in parseline() 265 tcp->th_dport = htons(tx_portnum(last)); in parseline() 282 tcp->th_urp = htons(1); in parseline() 307 ic->icmp_id = htons(getpid()); in parseline() 329 ip->ip_len = htons(ip->ip_len); in parseline() 405 tcp->th_sport = htons(tx_portnum(last)); in parseipv6() 407 tcp->th_win = htons(4096); in parseipv6() 430 tcp->th_dport = htons(tx_portnum(last)); in parseipv6() 453 tcp->th_urp = htons(1); in parseipv6() [all …]
|
| /freebsd-12-stable/contrib/tcp_wrappers/ |
| 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-stable/usr.bin/talk/ |
| 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-stable/contrib/traceroute/ |
| D | traceroute.c | 788 outip->ip_len = htons(packlen); in main() 789 outip->ip_off = htons(off); in main() 1304 outip->ip_id = htons(ident + seq); in send_probe() 1473 icmpheader->icmp_id = htons(ident); in icmp_prep() 1474 icmpheader->icmp_seq = htons(outdata->seq); in icmp_prep() 1486 return (icmpheader->icmp_id == htons(ident) in icmp_check() 1487 && icmpheader->icmp_seq == htons(seq)); in icmp_check() 1495 outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); in udp_prep() 1496 outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); in udp_prep() 1497 outudp->uh_ulen = htons((u_short)protlen); in udp_prep() [all …]
|
| /freebsd-12-stable/libexec/tftpd/ |
| 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-stable/tools/tools/net80211/wesside/dics/ |
| 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-stable/usr.sbin/traceroute6/ |
| D | traceroute6.c | 408 ident = htons(getpid() & 0xffff); /* same as ping6 */ in main() 844 Nxt.sin6_port = htons(DUMMY_PORT); in main() 870 Src.sin6_port = htons(0); in main() 1072 Dst.sin6_port = htons(port + seq); in send_probe() 1082 icp->icmp6_seq = htons(seq); in send_probe() 1092 sctp->src_port = htons(ident); in send_probe() 1093 sctp->dest_port = htons(port + seq); in send_probe() 1113 init->ch.chunk_length = htons((u_int16_t)(datalen - in send_probe() 1118 init->init.num_outbound_streams = htons(1); in send_probe() 1119 init->init.num_inbound_streams = htons(1); in send_probe() [all …]
|
| /freebsd-12-stable/share/examples/find_interface/ |
| 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-stable/libexec/rbootd/ |
| 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() 445 req->r_rrq.rmp_size = htons(RMPREADDATA); in SendReadRepl() 566 rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr)); in SendPacket() 571 rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP); in SendPacket() 572 rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP); in SendPacket()
|
| /freebsd-12-stable/sys/dev/mlx4/mlx4_core/ |
| 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-stable/tests/sys/netinet/libalias/ |
| 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()
|
| 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-12-stable/sys/net/ |
| D | if_infiniband.c | 185 etype = htons(ETHERTYPE_IP); in infiniband_requestencap() 188 etype = htons(ETHERTYPE_IPV6); in infiniband_requestencap() 192 ah->ar_hrd = htons(ARPHRD_INFINIBAND); in infiniband_requestencap() 197 etype = htons(ETHERTYPE_REVARP); in infiniband_requestencap() 202 etype = htons(ETHERTYPE_ARP); in infiniband_requestencap() 248 ih->ib_protocol = htons(ETHERTYPE_IP); in infiniband_resolve_addr() 261 ih->ib_protocol = htons(ETHERTYPE_IPV6); in infiniband_resolve_addr() 463 case htons(ETHERTYPE_IP): in infiniband_input() 467 case htons(ETHERTYPE_ARP): in infiniband_input() 477 case htons(ETHERTYPE_IPV6): in infiniband_input()
|