Home
last modified time | relevance | path

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

12345678910>>...18

/illumos-gate/usr/src/uts/common/inet/sctp/
H A Dsctp_init.c60 sph->sph_type = htons(PARM_SUPP_ADDRS); in sctp_supaddr_param()
64 *addrtype++ = htons(PARM_ADDR4); in sctp_supaddr_param()
66 sph->sph_len = htons(sizeof (*sph) + sizeof (*addrtype)); in sctp_supaddr_param()
69 *addrtype++ = htons(PARM_ADDR6); in sctp_supaddr_param()
71 *addrtype = htons(PARM_ADDR4); in sctp_supaddr_param()
72 sph->sph_len = htons(sizeof (*sph) + in sctp_supaddr_param()
76 sph->sph_len = htons(sizeof (*sph) + in sctp_supaddr_param()
114 sph->sph_type = htons(PARM_FORWARD_TSN); in sctp_options_param()
115 sph->sph_len = htons(sizeof (*sph)); in sctp_options_param()
134 sph->sph_type = htons(PARM_ADAPT_LAYER_IND); in sctp_adaptation_code_param()
[all …]
H A Dsctp_asconf.c161 wph->sph_type = htons(PARM_ERROR_IND); in sctp_asconf_prepend_errwrap()
162 wph->sph_len = htons(msgdsize(mp) + sizeof (*wph) + sizeof (cid)); in sctp_asconf_prepend_errwrap()
296 ch->sch_len = htons(msgdsize(mp)); in sctp_asconf_send()
469 if (oph->sph_type == htons(PARM_ADD_IP)) in sctp_input_asconf()
471 if (oph->sph_type == htons(PARM_DEL_IP)) in sctp_input_asconf()
544 htons(PARM_ADD_IP)) { in sctp_input_asconf()
551 htons(PARM_DEL_IP)) { in sctp_input_asconf()
586 ach->sch_len = htons(msgdsize(hmp) - sctp->sctp_hdr_len); in sctp_input_asconf()
588 ach->sch_len = htons(msgdsize(hmp) - sctp->sctp_hdr6_len); in sctp_input_asconf()
708 if (oph->sph_type == htons(PARM_ADD_IP) || in sctp_input_asconf_ack()
[all …]
H A Dsctp_error.c73 acp->sch_len = htons(alen); in sctp_link_abort()
84 eph->sph_type = htons(serror); in sctp_link_abort()
85 eph->sph_len = htons(len + sizeof (*eph)); in sctp_link_abort()
276 ahiph->ipha_length = htons(ixa->ixa_pktlen); in sctp_send_abort()
280 ahip6h->ip6_plen = htons(ixa->ixa_pktlen - IPV6_HDR_LEN); in sctp_send_abort()
372 ipha->ipha_length = htons(ahlen); in sctp_ootb_send_abort()
396 ip6h->ip6_plen = htons(ahlen - IPV6_HDR_LEN); in sctp_ootb_send_abort()
427 ipha->ipha_length = htons(ixas.ixa_pktlen); in sctp_ootb_send_abort()
429 ip6h->ip6_plen = htons(ixas.ixa_pktlen - IPV6_HDR_LEN); in sctp_ootb_send_abort()
494 ecp->sch_len = htons(elen); in sctp_make_err()
[all …]
/illumos-gate/usr/src/boot/libsa/
H A Darp.c103 ah->arp_hrd = htons(ARPHRD_ETHER); in arpwhohas()
104 ah->arp_pro = htons(ETHERTYPE_IP); in arpwhohas()
107 ah->arp_op = htons(ARPOP_REQUEST); in arpwhohas()
194 if (ah->arp_hrd != htons(ARPHRD_ETHER) || in arprecv()
195 ah->arp_pro != htons(ETHERTYPE_IP) || in arprecv()
206 if (ah->arp_op == htons(ARPOP_REQUEST)) { in arprecv()
216 if (ah->arp_op != htons(ARPOP_REPLY)) { in arprecv()
255 if (arp->arp_hrd != htons(ARPHRD_ETHER) || in arp_reply()
256 arp->arp_pro != htons(ETHERTYPE_IP) || in arp_reply()
266 if (arp->arp_op != htons(ARPOP_REQUEST)) { in arp_reply()
[all …]
H A Drarp.c90 ap->arp_hrd = htons(ARPHRD_ETHER); in rarp_getipaddress()
91 ap->arp_pro = htons(ETHERTYPE_IP); in rarp_getipaddress()
94 ap->arp_op = htons(ARPOP_REVREQUEST); in rarp_getipaddress()
178 if (ap->arp_hrd != htons(ARPHRD_ETHER) || in rarprecv()
179 ap->arp_pro != htons(ETHERTYPE_IP) || in rarprecv()
191 if (ap->arp_op != htons(ARPOP_REVREPLY)) { in rarprecv()
H A Dtftp.c151 wbuf.t.th_opcode = htons((ushort_t)ERROR); in tftp_senderr()
152 wbuf.t.th_code = htons(errcode); in tftp_senderr()
171 wbuf.t.th_opcode = htons((ushort_t)ACK); in tftp_sendack()
173 wbuf.t.th_block = htons(block); in tftp_sendack()
205 if (htons(t->th_block) < (ushort_t)d->xid) { in recvtftp()
209 tftp_sendack(h, htons(t->th_block)); in recvtftp()
213 if (htons(t->th_block) != (ushort_t)d->xid) { in recvtftp()
312 wbuf.t.th_opcode = htons((ushort_t)RRQ); in tftp_makereq()
337 h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff)); in tftp_makereq()
338 h->iodesc->destport = htons(IPPORT_TFTP); in tftp_makereq()
[all …]
/illumos-gate/usr/src/lib/print/libipp-core/common/
H A Dwrite.c141 length = (uint16_t)htons(strlen(name)); in ipp_write_attribute()
149 length = (uint16_t)htons(0); in ipp_write_attribute()
166 length = (uint16_t)htons(strlen(name)); in ipp_write_attribute()
174 length = (uint16_t)htons(0); in ipp_write_attribute()
196 length = (uint16_t)htons(str_length); in ipp_write_attribute()
209 length = (uint16_t)htons(1); in ipp_write_attribute()
219 length = (uint16_t)htons(4); in ipp_write_attribute()
231 length = (uint16_t)htons(8); in ipp_write_attribute()
245 length = (uint16_t)htons(9); in ipp_write_attribute()
264 length = (uint16_t)htons(11); in ipp_write_attribute()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/traceroute/
H A Dtraceroute_aux.c116 outip->ip_len = htons(plen - optlen); in set_buffers()
117 outip->ip_off = htons(off); in set_buffers()
127 outicmp->icmp_id = htons(ident); in set_buffers()
133 outudp->uh_sport = htons(ident); in set_buffers()
135 htons((ushort_t)(plen - (sizeof (struct ip) + optlen))); in set_buffers()
229 outip->ip_id = htons(ident + seq); in send_probe()
263 outicmp->icmp_seq = htons(seq); in send_probe()
265 outudp->uh_dport = htons((port + seq) % (MAX_PORT + 1)); in send_probe()
370 icp->icmp_id == htons(ident) && in check_reply()
371 icp->icmp_seq == htons(seq)) in check_reply()
[all …]
H A Dtraceroute_aux6.c100 outicmp->icmp_id = htons(ident); in set_buffers6()
108 outudp->uh_ulen = htons((ushort_t)(plen - in set_buffers6()
342 outicmp->icmp_seq = htons(seq); in send_probe6()
345 to6->sin6_port = htons((port + seq) % (MAX_PORT + 1)); in send_probe6()
456 icp6->icmp6_id == htons(ident) && in check_reply6()
457 icp6->icmp6_seq == htons(seq)) { in check_reply6()
466 hicmp6->icmp6_id == htons(ident) && in check_reply6()
467 hicmp6->icmp6_seq == htons(seq)) { in check_reply6()
483 up->uh_sport == htons(ident) && in check_reply6()
484 up->uh_dport == htons((port + seq) % in check_reply6()
/illumos-gate/usr/src/lib/libresolv/
H A Dres_mkquery.c100 ns_sin.sin_port = htons(NAMESERVER_PORT); in _confcheck()
170 hp->id = htons(++_res.id);
197 hp->qdcount = htons(1);
217 hp->arcount = htons(1);
243 hp->ancount = htons(1);
283 hp->ancount = htons(0);
310 hp->ancount = htons(0);
/illumos-gate/usr/src/lib/libresolv2/common/resolv/
H A Dres_mkquery.c153 hp->id = htons(statp->id); in res_nmkquery()
179 hp->qdcount = htons(1); in res_nmkquery()
200 hp->arcount = htons(1); in res_nmkquery()
222 hp->ancount = htons(1); in res_nmkquery()
278 hp->arcount = htons(ntohs(hp->arcount) + 1); in res_nopt()
361 ns_sin.sin_port = htons(NAMESERVER_PORT); in _confcheck()
/illumos-gate/usr/src/head/protocols/
H A Drouted.h75 #define RIP_AF_INET htons(AF_INET)
92 #define RIP_AUTH_TRAILER htons(1) /* authentication data */
93 #define RIP_AUTH_PW htons(2) /* password type */
94 #define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */
/illumos-gate/usr/src/cmd/ipf/lib/
H A Dportname.c20 if ((sv = getservbyport(htons(port), "tcp"))) {
23 sv1 = getservbyport(htons(port), "udp");
30 if ((sv = getservbyport(htons(port), p->p_name))) {
/illumos-gate/usr/src/cmd/bhyve/common/
H A Drfb.c456 c->rc_sinfo.rsi_width = htons(gci->width); in rfb_handshake_init_message()
457 c->rc_sinfo.rsi_height = htons(gci->height); in rfb_handshake_init_message()
565 msg.re_numencs = htons(msg.re_numencs); in rfb_recv_set_encodings()
672 msg.rpe_x = htons(msg.rpe_x); in rfb_recv_pointer_event()
673 msg.rpe_y = htons(msg.rpe_y); in rfb_recv_pointer_event()
760 msg.rss_numrects = htons(numrects); in rfb_send_update_header()
775 rect.rr_x = htons(0); in rfb_send_resize_update_msg()
776 rect.rr_y = htons(0); in rfb_send_resize_update_msg()
777 rect.rr_width = htons(c->rc_width); in rfb_send_resize_update_msg()
778 rect.rr_height = htons(c->rc_height); in rfb_send_resize_update_msg()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/tftp/
H A Dtftp.c155 dp->th_opcode = htons((ushort_t)DATA); in tftp_sendfile()
156 dp->th_block = htons((ushort_t)block); in tftp_sendfile()
278 ap->th_opcode = htons((ushort_t)ACK); in tftp_recvfile()
279 ap->th_block = htons((ushort_t)(block)); in tftp_recvfile()
339 ap->th_opcode = htons((ushort_t)ACK); in tftp_recvfile()
340 ap->th_block = htons(0); in tftp_recvfile()
391 ap->th_opcode = htons((ushort_t)ACK); in tftp_recvfile()
392 ap->th_block = htons((ushort_t)block); in tftp_recvfile()
414 tp->th_opcode = htons((ushort_t)request); in makerequest()
628 tp->th_opcode = htons((ushort_t)ERROR); in nak()
[all …]
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipnat_y.y282 nat->in_dport = htons($3);
407 dport: | IPNY_PORT portspec { nat->in_pmin = htons($2);
408 nat->in_pmax = htons($2); }
409 | IPNY_PORT portspec '-' portspec { nat->in_pmin = htons($2);
410 nat->in_pmax = htons($4); }
411 | IPNY_PORT portspec ':' portspec { nat->in_pmin = htons($2);
412 nat->in_pmax = htons($4); }
415 nport: IPNY_PORT portspec { nat->in_pnext = htons($2); }
416 | IPNY_PORT '=' portspec { nat->in_pnext = htons($3);
492 { nat->in_pmin = htons($3);
[all …]
/illumos-gate/usr/src/stand/lib/xdr/
H A Dbyteorder.c76 htons(uint16_t in) in htons() function
89 return (htons(in)); in ntohs()
120 htons(uint16_t in) in htons() function
/illumos-gate/usr/src/cmd/cmd-inet/sbin/dhcpagent/
H A Dpacket.c256 v4->flags = htons(BCAST_MASK); in init_pkt()
304 opt_type = htons(opt_type); in remove_pkt_opt()
396 optval.d6o_len = htons(adjust); in update_v6opt_len()
483 d6o.d6o_code = htons(opt_type); in encode_dhcp_opt()
484 d6o.d6o_len = htons(opt_len); in encode_dhcp_opt()
558 d6o.d6o_len = htons(olen); in add_pkt_subopt()
575 d6o.d6o_code = htons(opt_type); in add_pkt_subopt()
576 d6o.d6o_len = htons(opt_len); in add_pkt_subopt()
642 prl[len] = htons(dsmp->dsm_prl[len]); in add_pkt_prl()
748 *statusopt = htons(status); in add_pkt_lif()
[all …]
/illumos-gate/usr/src/grub/grub-0.97/netboot/
H A Dnic.c288 if (arpreply->opcode != htons(ARP_REPLY)) in await_arp()
336 arpreq.hwtype = htons(1); in ip_transmit()
337 arpreq.protocol = htons(IP); in ip_transmit()
340 arpreq.opcode = htons(ARP_REQUEST); in ip_transmit()
369 ip->len = htons(len); in build_ip_hdr()
410 udp->src = htons(srcsock); in build_udp_hdr()
411 udp->dest = htons(destsock); in build_udp_hdr()
412 udp->len = htons(len - sizeof(struct iphdr)); in build_udp_hdr()
464 if (arpreply->opcode != htons(RARP_REPLY)) in await_rarp()
489 rarpreq.hwtype = htons(1); in rarp()
[all …]
H A Dfsys_tftp.c101 tp.opcode = htons(TFTP_RRQ); in tftp_file_read()
172 tp.opcode = htons(TFTP_ERROR); in tftp_file_read()
198 else if (tr->opcode == htons(TFTP_DATA)) { in tftp_file_read()
209 tp.u.ack.block = htons(block = prevblock); in tftp_file_read()
211 tp.opcode = htons(TFTP_ACK); in tftp_file_read()
349 tp.opcode = htons (TFTP_ERROR); in buf_fill()
400 tp.u.ack.block = htons (block = prevblock); in buf_fill()
403 tp.opcode = abort ? htons (TFTP_ERROR) : htons (TFTP_ACK); in buf_fill()
616 tp.opcode = htons (TFTP_RRQ); in tftp_dir()
/illumos-gate/usr/src/cmd/fm/eversholt/common/
H A Deftwrite.c154 hdr.major = htons(hdr.major); in eftwrite()
155 hdr.minor = htons(hdr.minor); in eftwrite()
156 hdr.cmajor = htons(hdr.cmajor); in eftwrite()
157 hdr.cminor = htons(hdr.cminor); in eftwrite()
/illumos-gate/usr/src/uts/sun4v/io/
H A Dvnet_common.c86 evhp->ether_tpid = htons(ETHERTYPE_VLAN); in vnet_vlan_insert_tag()
87 evhp->ether_tci = htons(VLAN_TCI(pri, ETHER_CFI, vid)); in vnet_vlan_insert_tag()
109 evhp->ether_tpid = htons(ETHERTYPE_VLAN); in vnet_vlan_insert_tag()
110 evhp->ether_tci = htons(VLAN_TCI(pri, ETHER_CFI, vid)); in vnet_vlan_insert_tag()
/illumos-gate/usr/src/uts/common/sys/
H A Dbyteorder.h64 #define htons(x) (x) macro
84 extern uint16_t htons(uint16_t);
89 extern in_port_t htons(in_port_t);
115 #define BSWAP_16(x) htons(x)
180 #define BE_IN16(xa) htons(*((uint16_t *)(void *)(xa)))
/illumos-gate/usr/src/uts/common/io/ppp/spppcomp/
H A Dvjcompress.c140 (f) = htons(tmp); \
144 (f) = htons(tmp); \
150 (f) = htons((cp[1] << 8) | cp[2]); \
153 (f) = htons((uint32_t)*cp++); \
178 if ((ip->ip_off & htons(0x3fff)) || mlen < 40) { in vj_compress_tcp()
576 th->th_sum = htons((*cp << 8) | cp[1]); in vj_uncompress_tcp()
641 cs->cs_ip.ip_id = htons(cs->cs_ip.ip_id); in vj_uncompress_tcp()
660 cs->cs_ip.ip_len = htons(total_len); in vj_uncompress_tcp()
/illumos-gate/usr/src/cmd/smbsrv/smbd/
H A Dsmbd_krb5lookup.c72 port = htons(KRB5_DEFAULT_PORT); in _krb5_override_service_locator()
75 port = htons(DEFAULT_KADM5_PORT); in _krb5_override_service_locator()
78 port = htons(DEFAULT_KPASSWD_PORT); in _krb5_override_service_locator()

12345678910>>...18