Home
last modified time | relevance | path

Searched refs:ntohs (Results 1 – 25 of 429) sorted by relevance

12345678910>>...18

/illumos-gate/usr/src/cmd/ipf/lib/
H A Dprintpacket6.c20 plen = ntohs(*((u_short *)buf +2));
25 ntohs(addrs[0]), ntohs(addrs[1]), ntohs(addrs[2]),
26 ntohs(addrs[3]), ntohs(addrs[4]), ntohs(addrs[5]),
27 ntohs(addrs[6]), ntohs(addrs[7]));
30 (void)printf(",%d", ntohs(tcp->th_sport));
34 ntohs(addrs[0]), ntohs(addrs[1]), ntohs(addrs[2]),
35 ntohs(addrs[3]), ntohs(addrs[4]), ntohs(addrs[5]),
36 ntohs(addrs[6]), ntohs(addrs[7]));
39 (void)printf(",%d", ntohs(tcp->th_dport));
H A Dprintpacket.c25 len = ntohs(((u_short *)ip)[2]) + 40;
27 off = ntohs(ip->ip_off);
28 len = ntohs(ip->ip_len);
53 printf("ip %d(%d) %d", ntohs(ip->ip_len), IP_HL(ip) << 2, ip->ip_p);
59 printf(",%d", ntohs(tcp->th_sport));
64 printf(",%d", ntohs(tcp->th_dport));
H A Dprintstate.c34 ntohs(ips.is_sport), ntohs(ips.is_dport),
53 PRINTF(" %hu -> %hu\n", ntohs(ips.is_sport),
54 ntohs(ips.is_dport));
56 PRINTF(" call %hx/%hx\n", ntohs(ips.is_gre.gs_call[0]),
57 ntohs(ips.is_gre.gs_call[1]));
63 PRINTF(" id %hu seq %hu type %d\n", ntohs(ips.is_icmp.ici_id),
64 ntohs(ips.is_icmp.ici_seq), ips.is_icmp.ici_type);
H A Dprintnat.c102 printf(" port %d", ntohs(np->in_pmin));
104 printf("-%d", ntohs(np->in_pmax));
121 printf(" port = %d", ntohs(np->in_pnext));
123 printf(" port %d", ntohs(np->in_pnext));
172 s = portname(np->in_p, ntohs(np->in_dport));
200 ntohs(np->in_pmin),
201 ntohs(np->in_pmax),
204 printf(" %d:%d", ntohs(np->in_pmin),
205 ntohs(np->in_pmax));
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_udp.c68 ntohs(udp->uh_dport), in interpret_udp()
69 ntohs(udp->uh_sport), in interpret_udp()
70 ntohs((ushort_t)udp->uh_ulen)); in interpret_udp()
73 sunrpc = !reservedport(IPPROTO_UDP, ntohs(udp->uh_dport)) && in interpret_udp()
74 !reservedport(IPPROTO_UDP, ntohs(udp->uh_sport)) && in interpret_udp()
86 pname = getportname(IPPROTO_UDP, ntohs(udp->uh_dport)); in interpret_udp()
96 ntohs(udp->uh_dport), pname); in interpret_udp()
99 ntohs((ushort_t)udp->uh_ulen), in interpret_udp()
105 ntohs(udp->uh_sum), in interpret_udp()
114 ntohs(udp->uh_sport), in interpret_udp()
[all …]
H A Dsnoop_aarp.c63 switch (ntohs(ap->arp_op)) { in interpret_aarp()
96 ntohs(ap->arp_hrd)); in interpret_aarp()
99 ntohs(ap->arp_pro), in interpret_aarp()
100 print_ethertype(ntohs(ap->arp_pro))); in interpret_aarp()
109 ntohs(ap->arp_op), in interpret_aarp()
110 aarp_opname[ntohs(ap->arp_op)]); in interpret_aarp()
112 if (ntohs(ap->arp_hrd) == ARPHRD_ETHER && in interpret_aarp()
113 ntohs(ap->arp_pro) == ETHERTYPE_AT) { in interpret_aarp()
122 (ntohs(ap->arp_op) == AARP_REQ || in interpret_aarp()
123 ntohs(ap->arp_op) == AARP_PROBE) ? "?" : in interpret_aarp()
[all …]
H A Dsnoop_tftp.c54 switch (ntohs(tftp->th_opcode)) { in interpret_tftp()
77 switch (ntohs(tftp->th_opcode)) { in interpret_tftp()
93 ntohs(tftp->th_block), blocksize, in interpret_tftp()
98 ntohs(tftp->th_block)); in interpret_tftp()
102 tftperror(ntohs(tftp->th_code))); in interpret_tftp()
120 show_type(ntohs(tftp->th_opcode))); in interpret_tftp()
122 switch (ntohs(tftp->th_opcode)) { in interpret_tftp()
138 "Data block = %d%s", ntohs(tftp->th_block), in interpret_tftp()
148 "Acknowledge block = %d", ntohs(tftp->th_block)); in interpret_tftp()
154 "Error = %d (%s)", ntohs(tftp->th_code), in interpret_tftp()
[all …]
H A Dsnoop_ntp.c110 ntohs(ntpc->sequence), in interpret_ntp()
111 ntohs(ntpc->status), in interpret_ntp()
112 ntohs(ntpc->associd)); in interpret_ntp()
163 ntohs(ntp->distance.int_part), in interpret_ntp()
272 ntohs(ntpc->sequence)); in interpret_ntp()
276 ntohs(ntpc->status)); in interpret_ntp()
280 ntohs(ntpc->associd)); in interpret_ntp()
284 ntohs(ntpc->offset)); in interpret_ntp()
288 ntohs(ntpc->count)); in interpret_ntp()
441 a = ntohs(t->fraction); in s_fixed_to_double()
[all …]
H A Dsnoop_tcp.c98 ntohs(tcp->th_dport), ntohs(tcp->th_sport)); in interpret_tcp()
111 ntohs(tcp->th_urp)); in interpret_tcp()
125 ntohs(tcp->th_win)); in interpret_tcp()
131 !reservedport(IPPROTO_TCP, ntohs(tcp->th_sport)) && in interpret_tcp()
144 pname = getportname(IPPROTO_TCP, ntohs(tcp->th_dport)); in interpret_tcp()
154 ntohs(tcp->th_dport), pname); in interpret_tcp()
192 4, 1), "Window = %d", ntohs(tcp->th_win)); in interpret_tcp()
195 4, 1), "Checksum = 0x%04x", ntohs(tcp->th_sum)); in interpret_tcp()
197 4, 1), "Urgent pointer = %d", ntohs(tcp->th_urp)); in interpret_tcp()
214 ntohs(tcp->th_sport), in interpret_tcp()
[all …]
H A Dsnoop_trill.c62 ntohs(trillhdr->th_egressnick)); in interpret_trill()
65 ntohs(trillhdr->th_ingressnick)); in interpret_trill()
95 ntohs(inner_ethhdr->ether_type)); in interpret_trill()
100 ethertype = ntohs(inner_ethvlanhdr->ether_type); in interpret_trill()
105 ntohs(trillhdr->th_egressnick), in interpret_trill()
106 ntohs(trillhdr->th_ingressnick), in interpret_trill()
H A Dsnoop_sctp.c461 switch (ntohs(*type)) { in parse_suppaddr_param()
584 plen = ntohs(hdr->sph_len); in interpret_params()
592 ptype = ntohs(hdr->sph_type); in interpret_params()
651 ntohs(ftsn_entry->ftsn_ssn)); in parse_ftsn_chunk()
767 ntohs(dcp->sdc_sid), ntohs(dcp->sdc_ssn), ppid)); in parse_data_chunk()
825 numdups = ntohs(scp->ssc_numdups); in parse_sack_chunk()
842 ntohs(frag->ssf_start), ntohs(frag->ssf_end)); in parse_sack_chunk()
865 ntohs(scp->ssc_numdups))); in parse_sack_chunk()
994 clen = ntohs(cp->sch_len); in interpret_chunks()
1101 sport = ntohs(sctp->sh_sport); in interpret_sctp()
[all …]
H A Dsnoop_icmp.c87 ntohs(icmp->icmp_id), ntohs(icmp->icmp_seq)); in interpret_icmp()
130 ntohs(orig_uhdr->uh_dport)); in interpret_icmp()
136 ntohs(orig_uhdr->uh_dport)); in interpret_icmp()
151 ntohs(icmp->icmp_nextmtu)); in interpret_icmp()
223 ntohs(icmp->icmp_id), ntohs(icmp->icmp_seq)); in interpret_icmp()
393 ntohs(icmp->icmp_cksum)); in interpret_icmp()
545 ntohs(icmp6->icmp6_id), ntohs(icmp6->icmp6_seq));
551 ntohs(icmp6->icmp6_id), ntohs(icmp6->icmp6_seq));
607 ntohs(icmp6->icmp6_cksum));
922 srccnt = ntohs(qry->mld2q_numsrc); in interpret_mldv2qry()
[all …]
H A Dsnoop_rip.c96 len >= ntohs(nap->au.a_md5.md5_auth_len)) in interpret_rip()
97 len -= ntohs(nap->au.a_md5. in interpret_rip()
188 ntohs(nap->au.a_md5. in interpret_rip()
193 ntohs(nap->au.a_md5. in interpret_rip()
196 ntohs(nap->au.a_md5. in interpret_rip()
198 len -= ntohs(nap->au. in interpret_rip()
208 ntohs(nap->a_type)); in interpret_rip()
223 ntohs(nip->n_family)); in interpret_rip()
260 ntohs(nip->n_tag), in interpret_rip()
330 ntohs(rep->rip_metric)); in interpret_rip()
[all …]
H A Dsnoop_arp.c73 arpop = ntohs(ap->ar_op); in interpret_arp()
75 if (ntohs(ap->ar_pro) == ETHERTYPE_IP) in interpret_arp()
138 "Hardware type = %d (%s)", ntohs(ap->ar_hrd), in interpret_arp()
139 arp_htype(ntohs(ap->ar_hrd))); in interpret_arp()
141 "Protocol type = %04x (%s)", ntohs(ap->ar_pro), in interpret_arp()
142 print_ethertype(ntohs(ap->ar_pro))); in interpret_arp()
H A Dsnoop_mip.c220 ext_len = ntohs(gen_exthdr->length); in interpret_extensions()
545 if (ntohs(rreq->lifetime) == 0xffff) { in interpret_mip_cntrlmsg()
558 ntohs(rreq->lifetime)); in interpret_mip_cntrlmsg()
590 if (ntohs(rrep->lifetime) == 0xffff) { in interpret_mip_cntrlmsg()
606 ntohs(rrep->lifetime)); in interpret_mip_cntrlmsg()
639 ntohs(spi_hi), ntohs(spi_low)); in spi_ext()
660 alg = ntohs(alg); in key_ext()
684 ntohs(spi_hi), ntohs(spi_low)); in key_ext()
692 hafa, ntohs(spi_hi), ntohs(spi_low)); in key_ext()
766 ntohs(adv_ext->sequence_num)); in ma_ext()
[all …]
/illumos-gate/usr/src/boot/libsa/
H A Dudp.c71 inet_ntoa(d->myip), ntohs(d->myport)); in sendudp()
73 inet_ntoa(d->destip), ntohs(d->destport)); in sendudp()
123 if (n == -1 || n < sizeof (*uh) || n != ntohs(uh->uh_ulen)) { in readudp()
132 d->myport, ntohs(uh->uh_dport)); in readudp()
144 n = ntohs(uh->uh_ulen) + sizeof (struct ip); in readudp()
169 if (ntohs(uh->uh_ulen) < sizeof (*uh)) { in readudp()
173 ntohs(uh->uh_ulen), (int)sizeof (*uh)); in readudp()
179 n = (n > (ntohs(uh->uh_ulen) - sizeof (*uh))) ? in readudp()
180 ntohs(uh->uh_ulen) - sizeof (*uh) : n; in readudp()
H A Dip.c99 inet_ntoa(d->myip), ntohs(d->myport)); in sendip()
161 if ((ntohs(p->ipq_hdr->ip_off) & IP_OFFMASK) < in ip_reasm_add()
162 (ntohs(ip->ip_off) & IP_OFFMASK)) { in ip_reasm_add()
252 if (n < ntohs(ip->ip_len)) { in readipv4()
256 (int)n, ntohs(ip->ip_len)); in readipv4()
273 if ((ntohs(ip->ip_off) & IP_MF) == 0 && in readipv4()
274 (ntohs(ip->ip_off) & IP_OFFMASK) == 0) { in readipv4()
283 n = (n > (ntohs(ip->ip_len) - sizeof(*ip))) ? in readipv4()
284 ntohs(ip->ip_len) - sizeof(*ip) : n; in readipv4()
321 if ((ntohs(ip->ip_off) & IP_MF) == 0) { in readipv4()
[all …]
/illumos-gate/usr/src/grub/grub-0.97/netboot/
H A Dfsys_tftp.c76 if (ntohs(udp->dest) != ival) in await_tftp()
142 if (tr->opcode == ntohs(TFTP_ERROR)) in tftp_file_read()
145 ntohs(tr->u.err.errcode), in tftp_file_read()
150 if (tr->opcode == ntohs(TFTP_OACK)) { in tftp_file_read()
187 iport, ntohs(tr->udp.src), in tftp_file_read()
212 oport = ntohs(tr->udp.src); in tftp_file_read()
291 if (tr->opcode == ntohs (TFTP_ERROR)) in buf_fill()
294 ntohs (tr->u.err.errcode), in buf_fill()
299 if (tr->opcode == ntohs (TFTP_OACK)) in buf_fill()
357 iport, ntohs (tr->udp.src), in buf_fill()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/
H A Dilbadm_nat.c61 INET6_ADDRSTRLEN), ntohs(info->nat_out_global_port)); in print_nat_info()
64 INET6_ADDRSTRLEN), ntohs(info->nat_in_global_port)); in print_nat_info()
68 INET6_ADDRSTRLEN), ntohs(info->nat_out_local_port)); in print_nat_info()
71 INET6_ADDRSTRLEN), ntohs(info->nat_in_local_port)); in print_nat_info()
75 ntohs(info->nat_out_global_port)); in print_nat_info()
78 ntohs(info->nat_in_global_port)); in print_nat_info()
82 ntohs(info->nat_out_local_port)); in print_nat_info()
85 ntohs(info->nat_in_local_port)); in print_nat_info()
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Dcong.c314 NIPQUAD(map->m_addr), ntohs(port), map); in rdsv3_cong_set_bit()
316 i = ntohs(port) / RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_set_bit()
317 off = ntohs(port) % RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_set_bit()
329 NIPQUAD(map->m_addr), ntohs(port), map); in rdsv3_cong_clear_bit()
331 i = ntohs(port) / RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_clear_bit()
332 off = ntohs(port) % RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_clear_bit()
342 i = ntohs(port) / RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_test_bit()
343 off = ntohs(port) % RDSV3_CONG_MAP_PAGE_BITS; in rdsv3_cong_test_bit()
346 ntohs(port), i, off); in rdsv3_cong_test_bit()
403 RDS_CONG_MONITOR_MASK(ntohs(port)); in rdsv3_cong_wait()
[all …]
/illumos-gate/usr/src/uts/common/io/ppp/spppcomp/
H A Dvjcompress.c139 ushort_t tmp = ntohs(f) + ((cp[1] << 8) | cp[2]); \
143 ushort_t tmp = ntohs(f) + (uint32_t)*cp++; \
299 deltaS = ntohs(th->th_urp); in vj_compress_tcp()
316 if ((deltaS = (ushort_t)(ntohs(th->th_win) - ntohs(oth->th_win))) > 0) { in vj_compress_tcp()
354 ntohs(cs->cs_ip.ip_len) == thlen) { in vj_compress_tcp()
373 deltaS == ntohs(cs->cs_ip.ip_len) - thlen) { in vj_compress_tcp()
386 if (deltaS == ntohs(cs->cs_ip.ip_len) - thlen) { in vj_compress_tcp()
398 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in vj_compress_tcp()
413 deltaA = ntohs(th->th_sum); in vj_compress_tcp()
594 i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in vj_uncompress_tcp()
[all …]
/illumos-gate/usr/src/lib/libdtrace/common/
H A Dtcp.d.in158 tcp_sport = ntohs(*(uint16_t *)T->th_lport);
159 tcp_dport = ntohs(*(uint16_t *)T->th_fport);
164 tcp_window = ntohs(*(uint16_t *)T->th_win);
165 tcp_checksum = ntohs(*(uint16_t *)T->th_sum);
166 tcp_urgent = ntohs(*(uint16_t *)T->th_urp);
173 T != NULL ? ntohs(*(uint16_t *)((tcph_t *)T)->th_lport) :
180 T != NULL ? ntohs(*(uint16_t *)((tcph_t *)T)->th_fport) :
204 tcp_window = T != NULL ? ntohs(*(uint16_t *)((tcph_t *)T)->th_win) :
206 tcp_checksum = T != NULL ? ntohs(*(uint16_t *)((tcph_t *)T)->th_sum) :
225 ntohs(T->tcp_connp->u_port.connu_ports.connu_lport) : 0;
[all …]
H A Dudp.d.in55 udp_sport = ntohs(U->uha_src_port);
56 udp_dport = ntohs(U->uha_dst_port);
57 udp_length = ntohs(U->uha_length);
58 udp_checksum = ntohs(U->uha_checksum);
66 ntohs(U->udp_connp->u_port.connu_ports.connu_lport) : 0;
68 ntohs(U->udp_connp->u_port.connu_ports.connu_fport) : 0;
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ping/
H A Dping_aux.c359 ntohs(up->uh_dport)); in check_reply()
538 if (ntohs(icp->icmp_id) == ident) { in check_reply()
559 ntohs(icp->icmp_seq)); in check_reply()
573 ntohs(icp->icmp_seq)) && in check_reply()
623 ntohs(icp->icmp_seq), &dst_addr); in check_reply()
735 Printf(" port %d", ntohs(up->uh_dport)); in check_reply()
796 Printf(" port %d", ntohs(up->uh_dport)); in check_reply()
849 if (ntohs(icp->icmp_id) == ident) { in check_reply()
870 ntohs(icp->icmp_seq)); in check_reply()
884 ntohs(icp->icmp_seq)) && in check_reply()
[all …]
/illumos-gate/usr/src/lib/librstp/common/
H A Dtimes.c49 v->MessageAge = ntohs (*((unsigned short*) b->message_age)) >> 8; in STP_get_times()
51 v->MaxAge = ntohs (*((unsigned short*) b->max_age)) >> 8; in STP_get_times()
53 v->ForwardDelay = ntohs (*((unsigned short*) b->forward_delay)) >> 8; in STP_get_times()
55 v->HelloTime = ntohs (*((unsigned short*) b->hello_time)) >> 8; in STP_get_times()

12345678910>>...18