Home
last modified time | relevance | path

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

12345678910>>...27

/freebsd-11-stable/tests/sys/netgraph/
HDvlan_rotate.c61 .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-11-stable/contrib/ipfilter/ipsend/
HDiptests.c121 u->uh_sport = htons(1);
122 u->uh_dport = htons(9);
124 u->uh_ulen = htons(sizeof(*u) + 4);
206 ip->ip_id = htons(id++);
217 ip->ip_id = htons(id++);
236 ip->ip_id = htons(id++);
249 ip->ip_id = htons(id++);
267 ip->ip_off = htons(IP_MF);
275 ip->ip_off = htons(IP_MF);
283 ip->ip_off = htons(0xa000);
[all …]
HDip.c75 eh->ether_type = htons(ETHERTYPE_IP);
121 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);
228 else if (!(ip->ip_off & htons(0x1fff)))
[all …]
/freebsd-11-stable/contrib/sendmail/libsm/
HDinet6_ntop.c45 , 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-11-stable/sys/compat/linuxkpi/common/include/linux/
HDprintk.h38 #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-11-stable/stand/libsa/
HDarp.c104 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 …]
HDrarp.c91 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()
HDtftp.c153 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-11-stable/sys/netgraph/netflow/
HDnetflow_v9.c141 *p++ = htons(flowset_size); /* Total FlowSet length */ in generate_v9_templates()
146 *p++ = htons(NETFLOW_V9_MAX_RESERVED_FLOWSET + NETFLOW_V9_FLOW_V4_L4); in generate_v9_templates()
149 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_id); in generate_v9_templates()
150 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_length); in generate_v9_templates()
152 *template_fields_cnt = htons(cnt); in generate_v9_templates()
157 *p++ = htons(NETFLOW_V9_MAX_RESERVED_FLOWSET + NETFLOW_V9_FLOW_V6_L4); in generate_v9_templates()
160 *p++ = htons(_netflow_v9_record_ipv6_tcp[cnt].field_id); in generate_v9_templates()
161 *p++ = htons(_netflow_v9_record_ipv6_tcp[cnt].field_length); in generate_v9_templates()
163 *template_fields_cnt = htons(cnt); in generate_v9_templates()
190 *flowset_length = htons(len); in close_flowset()
[all …]
/freebsd-11-stable/usr.sbin/bhyve/
HDrfb.c210 sinfo.width = htons(gc_image->width); in rfb_send_server_init_msg()
211 sinfo.height = htons(gc_image->height); in rfb_send_server_init_msg()
216 sinfo.pixfmt.red_max = htons(255); in rfb_send_server_init_msg()
217 sinfo.pixfmt.green_max = htons(255); in rfb_send_server_init_msg()
218 sinfo.pixfmt.blue_max = htons(255); in rfb_send_server_init_msg()
236 supdt_msg.numrects = htons(1); in rfb_send_resize_update_msg()
240 srect_hdr.x = htons(0); in rfb_send_resize_update_msg()
241 srect_hdr.y = htons(0); in rfb_send_resize_update_msg()
242 srect_hdr.width = htons(rc->width); in rfb_send_resize_update_msg()
243 srect_hdr.height = htons(rc->height); in rfb_send_resize_update_msg()
[all …]
/freebsd-11-stable/lib/libsdp/
HDservice.c68 pdu.tid = htons(++ss->tid); in sdp_register_service()
69 pdu.len = htons(sizeof(uuid) + sizeof(*bdaddr) + datalen); in sdp_register_service()
71 uuid = htons(uuid); in sdp_register_service()
132 pdu.tid = htons(++ss->tid); in sdp_unregister_service()
133 pdu.len = htons(sizeof(handle)); in sdp_unregister_service()
176 pdu.tid = htons(++ss->tid); in sdp_change_service()
177 pdu.len = htons(sizeof(handle) + datalen); in sdp_change_service()
179 handle = htons(handle); in sdp_change_service()
/freebsd-11-stable/contrib/tcp_wrappers/
HDrfc931.c156 ((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-11-stable/contrib/ipfilter/lib/
HDipft_tx.c252 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);
440 tcp->th_dport = htons(tx_portnum(last));
463 tcp->th_urp = htons(1);
[all …]
HDportname.c23 if ((sv = getservbyport(htons(port), "tcp"))) {
26 sv1 = getservbyport(htons(port), "udp");
33 if ((sv = getservbyport(htons(port), p->p_name))) {
/freebsd-11-stable/contrib/traceroute/
HDtraceroute.c787 outip->ip_len = htons(packlen); in main()
788 outip->ip_off = htons(off); in main()
1301 outip->ip_id = htons(ident + seq); in send_probe()
1470 icmpheader->icmp_id = htons(ident); in icmp_prep()
1471 icmpheader->icmp_seq = htons(outdata->seq); in icmp_prep()
1483 return (icmpheader->icmp_id == htons(ident) in icmp_check()
1484 && icmpheader->icmp_seq == htons(seq)); in icmp_check()
1492 outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); in udp_prep()
1493 outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); in udp_prep()
1494 outudp->uh_ulen = htons((u_short)protlen); in udp_prep()
[all …]
/freebsd-11-stable/usr.bin/talk/
HDget_iface.c59 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-11-stable/usr.sbin/traceroute6/
HDtraceroute6.c405 ident = htons(getpid() & 0xffff); /* same as ping6 */ in main()
849 Nxt.sin6_port = htons(DUMMY_PORT); in main()
875 Src.sin6_port = htons(0); in main()
1081 Dst.sin6_port = htons(port + seq); in send_probe()
1091 icp->icmp6_seq = htons(seq); in send_probe()
1101 sctp->src_port = htons(ident); in send_probe()
1102 sctp->dest_port = htons(port + seq); in send_probe()
1122 init->ch.chunk_length = htons((u_int16_t)(datalen - in send_probe()
1127 init->init.num_outbound_streams = htons(1); in send_probe()
1128 init->init.num_inbound_streams = htons(1); in send_probe()
[all …]
/freebsd-11-stable/tools/tools/net80211/wesside/dics/
HDdics.c173 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-11-stable/libexec/tftpd/
HDtftp-io.c152 tp->th_opcode = htons((u_short)ERROR); in send_error()
153 tp->th_code = htons((u_short)error); in send_error()
194 tp->th_opcode = htons((u_short)WRQ); in send_wrq()
242 tp->th_opcode = htons((u_short)RRQ); in send_rrq()
295 tp->th_opcode = htons((u_short)OACK); in send_oack()
336 tp->th_opcode = htons((u_short)ACK); in send_ack()
337 tp->th_block = htons((u_short)block); in send_ack()
367 pkt->th_opcode = htons((u_short)DATA); in send_data()
368 pkt->th_block = htons((u_short)block); in send_data()
/freebsd-11-stable/share/examples/find_interface/
HDfind_interface.c75 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-11-stable/libexec/rbootd/
HDrmpproto.c189 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-11-stable/sys/dev/mlx4/mlx4_core/
HDmlx4_fw_qos.c134 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-11-stable/lib/libc/resolv/
HDres_mkquery.c126 hp->id = htons(statp->id); in res_nmkquery()
152 hp->qdcount = htons(1); in res_nmkquery()
173 hp->arcount = htons(1); in res_nmkquery()
195 hp->ancount = htons(1); in res_nmkquery()
253 hp->arcount = htons(ntohs(hp->arcount) + 1); in res_nopt()
/freebsd-11-stable/sbin/dhclient/
HDpacket.c88 return (htons(sum)); in wrapsum()
104 eh.ether_type = htons(ETHERTYPE_IP); in assemble_hw_header()
120 ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len); in assemble_udp_ip_header()
133 udp.uh_sport = htons(LOCAL_PORT); /* XXX */ in assemble_udp_ip_header()
135 udp.uh_ulen = htons(sizeof(udp) + len); in assemble_udp_ip_header()
/freebsd-11-stable/include/protocols/
HDrouted.h70 #define RIP_AF_INET htons(AF_INET)
87 #define RIP_AUTH_PW htons(2) /* password type */
88 #define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */

12345678910>>...27