/illumos-gate/usr/src/cmd/ipf/lib/ |
H A D | printpacket6.c | 20 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 D | printpacket.c | 25 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 D | printstate.c | 34 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 D | printnat.c | 102 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 D | snoop_udp.c | 60 udplen = ntohs((ushort_t)udp->uh_ulen) - sizeof (struct udphdr); in interpret_udp() 68 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() 81 dlc_header, 1), "Source port = %d", 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() [all …]
|
H A D | snoop_aarp.c | 63 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 D | snoop_tftp.c | 54 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() 119 dlc_header, 2), "Opcode = %d (%s)", ntohs(tftp->th_opcode), 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() [all …]
|
H A D | snoop_ntp.c | 110 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() 164 ntohs(ntp->distance.fraction), in interpret_ntp() 170 ntohs(ntp->dispersion.int_part), in interpret_ntp() 171 ntohs(ntp->dispersion.fraction), in interpret_ntp() 272 ntohs(ntpc->sequence)); in interpret_ntp() 276 ntohs(ntpc->status)); in interpret_ntp() 280 ntohs(ntpc->associd)); in interpret_ntp() [all …]
|
H A D | snoop_trill.c | 62 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 D | snoop_tcp.c | 101 ntohs(tcp->th_dport), ntohs(tcp->th_sport)); in interpret_tcp() 114 ntohs(tcp->th_urp)); in interpret_tcp() 128 ntohs(tcp->th_win)); in interpret_tcp() 133 sunrpc = !reservedport(IPPROTO_TCP, ntohs(tcp->th_dport)) && in interpret_tcp() 134 !reservedport(IPPROTO_TCP, ntohs(tcp->th_sport)) && in interpret_tcp() 142 dlc_header, 2), "Source port = %d", ntohs(tcp->th_sport)); in interpret_tcp() 147 pname = getportname(IPPROTO_TCP, ntohs(tcp->th_dport)); in interpret_tcp() 157 ntohs(tcp->th_dport), pname); in interpret_tcp() 195 4, 1), "Window = %d", ntohs(tcp->th_win)); in interpret_tcp() 198 4, 1), "Checksum = 0x%04x", ntohs(tcp->th_sum)); in interpret_tcp() [all …]
|
H A D | snoop_sctp.c | 461 switch (ntohs(*type)) { in parse_suppaddr_param() 476 "Unknown Type (%hu)", ntohs(*type)); in parse_suppaddr_param() 584 plen = ntohs(hdr->sph_len); in interpret_params() 592 ptype = ntohs(hdr->sph_type); in interpret_params() 650 "SID = %u : SSN = %u", ntohs(ftsn_entry->ftsn_sid), in parse_ftsn_chunk() 651 ntohs(ftsn_entry->ftsn_ssn)); in parse_ftsn_chunk() 697 ntohl(icp->sic_inittsn), ntohs(icp->sic_outstr), in parse_init_chunk() 698 ntohs(icp->sic_instr), ntohl(icp->sic_a_rwnd))); in parse_init_chunk() 709 "Outbound streams = %hu", ntohs(icp->sic_outstr)); in parse_init_chunk() 711 "Inbound streams = %hu", ntohs(icp->sic_instr)); in parse_init_chunk() [all …]
|
H A D | snoop_icmp.c | 91 ntohs(icmp->icmp_id), ntohs(icmp->icmp_seq)); in interpret_icmp() 134 ntohs(orig_uhdr->uh_dport)); in interpret_icmp() 140 ntohs(orig_uhdr->uh_dport)); in interpret_icmp() 152 if (ntohs(icmp->icmp_nextmtu) != 0) { in interpret_icmp() 155 ntohs(icmp->icmp_nextmtu)); in interpret_icmp() 227 ntohs(icmp->icmp_id), ntohs(icmp->icmp_seq)); in interpret_icmp() 238 ntohs(icmp->icmp_lifetime), icmp->icmp_num_addrs); in interpret_icmp() 396 ntohs(icmp->icmp_cksum)); in interpret_icmp() 483 ntohs(orig_thdr->th_dport)); in interpret_icmpv6() 493 ntohs(orig_uhdr->uh_dport)); in interpret_icmpv6() [all …]
|
H A D | snoop_rip.c | 96 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 D | snoop_arp.c | 73 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 D | snoop_mip.c | 220 ext_len = ntohs(gen_exthdr->length); in interpret_extensions() 545 if (ntohs(rreq->lifetime) == 0xffff) { in interpret_mip_cntrlmsg() 549 } else if (ntohs(rreq->lifetime) == 0) { in interpret_mip_cntrlmsg() 558 ntohs(rreq->lifetime)); in interpret_mip_cntrlmsg() 590 if (ntohs(rrep->lifetime) == 0xffff) { in interpret_mip_cntrlmsg() 594 } else if (ntohs(rrep->lifetime) == 0) { 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() [all …]
|
H A D | snoop_ospf6.c | 110 ntohs(op->ospf6_len)); in interpret_ospf6_hello() 120 ntohs(op->ospf6_hello.hello_helloint)); in interpret_ospf6_hello() 327 ls_end = (uchar_t *)lsa + ntohs(lsa->ls6_hdr.ls6_length); in interpret_ospf6_lsa() 332 switch (ntohs(lsa->ls6_hdr.ls6_type)) { in interpret_ospf6_lsa() 432 ntohs(rl->link_metric)); in interpret_ospf6_lsa() 438 ntohs(rl->link_metric)); in interpret_ospf6_lsa() 543 ntohs(lsa->lsa_un.un_intra_ap.intra_ap_lstype), in interpret_ospf6_lsa() 550 ntohs(lsa->lsa_un.un_intra_ap.intra_ap_nprefix)); in interpret_ospf6_lsa() 555 ntohs(lsa->lsa_un.un_intra_ap.intra_ap_nprefix)); in interpret_ospf6_lsa() 560 j < ntohs(lsa->lsa_un.un_intra_ap.intra_ap_nprefix); j++) { in interpret_ospf6_lsa() [all …]
|
/illumos-gate/usr/src/boot/libsa/ |
H A D | udp.c | 71 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 D | ip.c | 99 inet_ntoa(d->myip), ntohs(d->myport)); in sendip() 101 inet_ntoa(d->destip), ntohs(d->destport)); 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() [all …]
|
/illumos-gate/usr/src/grub/grub-0.97/netboot/ |
H A D | fsys_tftp.c | 76 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() 155 len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 2; in tftp_file_read() 187 iport, ntohs(tr->udp.src), in tftp_file_read() 199 len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 4; in tftp_file_read() 202 block = ntohs(tp.u.ack.block = tr->u.data.block); } in tftp_file_read() 212 oport = ntohs(tr->udp.src); in tftp_file_read() 291 if (tr->opcode == ntohs (TFTP_ERROR)) in buf_fill() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ilbadm/ |
H A D | ilbadm_nat.c | 61 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 D | cong.c | 314 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 D | vjcompress.c | 139 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 D | tcp.d.in | 158 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) : 175 ntohs(((tcp_t *)arg3)->tcp_connp->u_port.connu_ports.connu_lport) : 177 ntohs(((tcp_t *)arg3)->tcp_connp->u_port.connu_ports.connu_fport) : 180 T != NULL ? ntohs(*(uint16_t *)((tcph_t *)T)->th_fport) : 182 ntohs(((tcp_t *)arg3)->tcp_connp->u_port.connu_ports.connu_fport) : [all …]
|
H A D | udp.d.in | 55 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 D | ping_aux.c | 347 ntohs(up->uh_dport)); in check_reply() 360 (MAX_PORT + 1) == ntohs(up->uh_dport)) && in check_reply() 439 Printf("udp_port=%d. ", ntohs(up->uh_dport)); in check_reply() 454 Printf(" port %d ", ntohs(up->uh_dport)); in check_reply() 520 if (ntohs(icp->icmp_id) == ident) { in check_reply() 541 ntohs(icp->icmp_seq)); in check_reply() 555 ntohs(icp->icmp_seq)) && in check_reply() 605 ntohs(icp->icmp_seq), &dst_addr); in check_reply() 649 (void) find_dstaddr(ntohs(icp->icmp_seq), &dst_addr); in check_reply() 655 Printf("icmp_seq=%d. ", ntohs(icp->icmp_seq)); in check_reply() [all …]
|