/openbsd/usr.sbin/tcpdump/ |
H A D | print-l2tp.c | 223 printf("%u", ntohs(*dat)); in print_short() 252 printf("%d", ntohs(*ptr)); in l2tp_result_code_print() 254 printf("%d/%d", ntohs(*ptr), ntohs(*(ptr+1))); in l2tp_result_code_print() 256 printf("%u/%u ", ntohs(*ptr), ntohs(*(ptr+1))); in l2tp_result_code_print() 462 switch (ntohs(*ptr)) { in l2tp_proxy_auth_type_print() 586 if (ntohs(*ptr)) { /* IETF == 0 */ in l2tp_avp_print() 595 (l2tp_avp[ntohs(*ptr)].print) in l2tp_avp_print() 644 if (ntohs(val) & L2TP_FLAG_TYPE) { in l2tp_print() 690 printf("Ns=%d,", ntohs(val)); in l2tp_print() 695 printf("Nr=%d", ntohs(val)); in l2tp_print() [all …]
|
H A D | print-lwres.c | 315 l = ntohs(ap->length); in lwres_printaddr() 356 v = ntohs(np->version); in lwres_print() 372 v = ntohs(np->pktflags); in lwres_print() 411 l = ntohs(gabn->namelen); in lwres_print() 492 ntohs(gabn->naddrs)); in lwres_print() 500 na = ntohs(gabn->naliases); in lwres_print() 509 na = ntohs(gabn->naddrs); in lwres_print() 559 ntohs(grbn->rdtype))); in lwres_print() 566 ntohs(grbn->nsigs)); in lwres_print() 577 na = ntohs(grbn->nrdatas); in lwres_print() [all …]
|
H A D | print-ofp.c | 125 hetype = ntohs(he->he_type); in ofp_print_hello() 126 helen = ntohs(he->he_length); in ofp_print_hello() 188 ntohs(err->err_code)); in ofp_print_error() 229 ntohs(cfg->cfg_flags), in ofp_print_setconfig() 351 ntohs(fr->fr_idle_timeout), ntohs(fr->fr_hard_timeout), in ofp_print_flowremoved() 462 ntohs(fm->fm_idle_timeout), ntohs(fm->fm_hard_timeout), in ofp_print_flowmod() 467 ntohs(fm->fm_flags), in ofp_print_flowmod() 634 printf("%#02x", ntohs(*b)); in oxm_print_byte() 636 printf("%u", ntohs(*b)); in oxm_print_byte() 660 printf("%u", ntohs(*h)); in oxm_print_halfword() [all …]
|
H A D | print-gtp.c | 504 len = ntohs(gh->length); in gtp_v0_print() 507 ntohs(gh->length), ntohs(gh->seqno), ntohs(gh->flow), in gtp_v0_print() 550 len = ntohs(gph->length); in gtp_v0_print_prime() 766 len = ntohs(*lenp); in gtp_v0_print_tlv() 843 printf(" %u", ntohs(*seqno)); in gtp_v0_print_tlv() 1043 len = ntohs(gph->length); in gtp_v1_print_prime() 1255 data, ntohs(dps[0]), ntohs(dps[1]), ntohs(dps[2]), in gtp_v1_print_tv() 1256 ntohs(dps[3])); in gtp_v1_print_tv() 1360 len = ntohs(*lenp); in gtp_v1_print_tlv() 1745 printf(" %u", ntohs(*seqno)); in gtp_v1_print_tlv() [all …]
|
H A D | print-ospf.c | 209 j = ntohs(lsap->lsa_un.un_rla.rla_count); in ospf_print_lsa() 252 ntohs(tosp->tos_metric)); in ospf_print_lsa() 384 ntohs(op->ospf_hello.hello_helloint), in ospf_decode_v2() 466 ntohs(lsap->ls_hdr.ls_length)); in ospf_decode_v2() 524 if (length < ntohs(op->ospf_len)) { in ospf_print() 525 printf(" [len %d]", ntohs(op->ospf_len)); in ospf_print() 527 } else if (length > ntohs(op->ospf_len)) { in ospf_print() 528 printf(" %d[%d]:", ntohs(op->ospf_len), length); in ospf_print() 529 length = ntohs(op->ospf_len); in ospf_print() 546 switch (ntohs(op->ospf_authtype)) { in ospf_print() [all …]
|
H A D | print-ospf6.c | 269 switch (ntohs(lsap->ls_hdr.ls_type)) { in ospf6_print_lsa() 309 printf(" metric %d", ntohs(rlp->link_metric)); in ospf6_print_lsa() 436 ntohs(lsap->lsa_un.un_intra_ap.intra_ap_lstype), in ospf6_print_lsa() 457 ntohs(lsap->ls_hdr.ls_type)); in ospf6_print_lsa() 495 ntohs(op->ospf6_hello.hello_helloint), in ospf6_decode_v3() 496 ntohs(op->ospf6_hello.hello_deadint)); in ospf6_decode_v3() 536 printf(" mtu %u S %X", ntohs(op->ospf6_db.db_mtu), in ospf6_decode_v3() 557 ospf6_print_ls_type(ntohs(lsrp->ls_type), in ospf6_decode_v3() 577 ntohs(lsap->ls_hdr.ls_length)); in ospf6_decode_v3() 622 if (length != ntohs(op->ospf6_len)) { in ospf6_print() [all …]
|
/openbsd/usr.sbin/ospf6d/ |
H A D | rde_lsdb.c | 84 v->type = ntohs(lsa->hdr.type); in vertex_get() 160 a16 = ntohs(a->ls_chksum); in lsa_newer() 161 b16 = ntohs(b->ls_chksum); in lsa_newer() 168 a16 = ntohs(a->age); in lsa_newer() 169 b16 = ntohs(b->age); in lsa_newer() 217 switch (ntohs(lsa->hdr.type)) { in lsa_check() 351 npref = ntohs(iap->numprefix); in lsa_intra_a_pref_check() 564 age = ntohs(v->lsa->hdr.age); in lsa_age() 601 key.type = ntohs(type); in lsa_find_tree() 802 ntohs(v->lsa->hdr.len)); in lsa_dump() [all …]
|
/openbsd/usr.sbin/ypserv/ypserv/ |
H A D | ypserv_proc.c | 94 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypproc_domain_2_svc() 146 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypproc_match_2_svc() 179 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypproc_first_2_svc() 210 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypproc_next_2_svc() 252 ntohs(caller->sin_port) >= IPPORT_RESERVED) { in ypproc_xfr_2_svc() 294 if (ntohs(caller->sin_port) >= IPPORT_RESERVED) in ypproc_clear_2_svc() 617 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypoldproc_match_1_svc() 667 inet_ntoa(caller->sin_addr), ntohs(caller->sin_port), in ypoldproc_first_1_svc() 817 if (ntohs(caller->sin_port) >= IPPORT_RESERVED) in ypoldproc_push_1_svc() 862 if (ntohs(caller->sin_port) >= IPPORT_RESERVED) in ypoldproc_pull_1_svc() [all …]
|
/openbsd/usr.sbin/unbound/iterator/ |
H A D | iter_resptype.c | 80 if(ntohs(s->rk.type) == request->qtype && in response_type_from_cache() 81 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_cache() 88 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_cache() 132 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server() 169 ntohs(s->rk.type) == LDNS_RR_TYPE_NS && in response_type_from_server() 170 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server() 183 if(ntohs(s->rk.type) == request->qtype && in response_type_from_server() 184 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server() 197 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server() 220 if(ntohs(s->rk.type) == LDNS_RR_TYPE_SOA && in response_type_from_server() [all …]
|
/openbsd/sbin/unwind/libunbound/iterator/ |
H A D | iter_resptype.c | 80 if(ntohs(s->rk.type) == request->qtype && in response_type_from_cache() 81 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_cache() 88 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_cache() 132 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server() 169 ntohs(s->rk.type) == LDNS_RR_TYPE_NS && in response_type_from_server() 170 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server() 183 if(ntohs(s->rk.type) == request->qtype && in response_type_from_server() 184 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server() 197 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server() 220 if(ntohs(s->rk.type) == LDNS_RR_TYPE_SOA && in response_type_from_server() [all …]
|
/openbsd/usr.sbin/rbootd/ |
H A D | utils.c | 98 rmp->hp_llc.dsap, rmp->hp_llc.ssap, ntohs(rmp->hp_llc.cntrl)); in DispPkt() 102 ntohs(rmp->hp_llc.dxsap), ntohs(rmp->hp_llc.sxsap)); in DispPkt() 112 if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) { in DispPkt() 120 t, ntohs(rmp->r_brq.rmp_session), in DispPkt() 121 ntohs(rmp->r_brq.rmp_version)); in DispPkt() 131 t, ntohs(rmp->r_brpl.rmp_session), in DispPkt() 132 ntohs(rmp->r_brpl.rmp_version)); in DispPkt() 139 t, ntohs(rmp->r_rrq.rmp_session)); in DispPkt() 141 ntohs(rmp->r_rrq.rmp_size)); in DispPkt() 147 t, ntohs(rmp->r_rrpl.rmp_session)); in DispPkt() [all …]
|
H A D | rmpproto.c | 104 if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) { in ProcessPacket() 422 if (ntohs(req->r_rrq.rmp_session) != in SendReadRepl() 423 ((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session): in SendReadRepl() 424 ntohs(rpl->r_rrpl.rmp_session))) { in SendReadRepl() 440 if (ntohs(req->r_rrq.rmp_size) > RMPREADDATA) in SendReadRepl() 459 (int) ntohs(req->r_rrq.rmp_size))) <= 0) { in SendReadRepl() 526 if (ntohs(rconn->rmp.r_rrq.rmp_session) != in BootDone() 527 ((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session): in BootDone() 528 ntohs(rpl->r_rrpl.rmp_session))) { in BootDone()
|
/openbsd/usr.sbin/ospfd/ |
H A D | rde_lsdb.c | 156 a16 = ntohs(a->ls_chksum); in lsa_newer() 157 b16 = ntohs(b->ls_chksum); in lsa_newer() 164 a16 = ntohs(a->age); in lsa_newer() 165 b16 = ntohs(b->age); in lsa_newer() 191 if (ntohs(lsa->hdr.len) != len) { in lsa_check() 203 ntohs(lsa->hdr.age) > MAX_AGE) { in lsa_check() 478 age = ntohs(v->lsa->hdr.age); in lsa_age() 653 ntohs(v->lsa->hdr.len)); in lsa_dump() 721 len = ntohs(v->lsa->hdr.len); in lsa_refresh() 747 lsa, ntohs(lsa->hdr.len)); in lsa_merge() [all …]
|
/openbsd/sbin/dhclient/ |
H A D | packet.c | 69 sum += (uint16_t)ntohs(*((uint16_t *)(buf + i))); in checksum() 147 if (ntohs(ip->ip_len) != buflen) in decode_udp_ip_header() 149 log_procname, ntohs(ip->ip_len), buflen); in decode_udp_ip_header() 152 if (ntohs(ip->ip_len) > buflen) in decode_udp_ip_header() 162 if (ip_len + ntohs(udp->uh_ulen) > buflen) in decode_udp_ip_header() 172 len = ntohs(udp->uh_ulen) - sizeof(*udp); in decode_udp_ip_header() 197 IPPROTO_UDP + (uint32_t)ntohs(udp->uh_ulen))))); in decode_udp_ip_header()
|
/openbsd/gnu/llvm/lldb/source/Host/common/ |
H A D | SocketAddress.cpp | 58 tmp, sizeof(tmp), "%x:%x:%x:%x:%x:%x:%x:%x", ntohs(src16[0]), in inet_ntop() 59 ntohs(src16[1]), ntohs(src16[2]), ntohs(src16[3]), ntohs(src16[4]), in inet_ntop() 60 ntohs(src16[5]), ntohs(src16[6]), ntohs(src16[7])); in inet_ntop() 156 return ntohs(m_socket_addr.sa_ipv4.sin_port); in GetPort() 158 return ntohs(m_socket_addr.sa_ipv6.sin6_port); in GetPort()
|
/openbsd/usr.sbin/dhcpd/ |
H A D | packet.c | 68 sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i))); in checksum() 146 IPPROTO_UDP + (u_int32_t)ntohs(udp.uh_ulen))))); in assemble_udp_ip_header() 211 if (ntohs(ip->ip_len) != buflen) in decode_udp_ip_header() 213 ntohs(ip->ip_len), buflen); in decode_udp_ip_header() 218 if (ntohs(ip->ip_len) > buflen) in decode_udp_ip_header() 228 if (ip_len + ntohs(udp->uh_ulen) > buflen) in decode_udp_ip_header() 238 len = ntohs(udp->uh_ulen) - sizeof(*udp); in decode_udp_ip_header() 262 IPPROTO_UDP + (u_int32_t)ntohs(udp->uh_ulen))))); in decode_udp_ip_header()
|
/openbsd/sys/lib/libsa/ |
H A D | netudp.c | 74 inet_ntoa(d->myip), ntohs(d->myport)); in sendudp() 76 inet_ntoa(d->destip), ntohs(d->destport)); in sendudp() 186 if (n < ntohs(ip->ip_len)) { in readudp() 190 n, ntohs(ip->ip_len)); in readudp() 214 d->myport, ntohs(uh->uh_dport)); in readudp() 220 n = ntohs(uh->uh_ulen) + sizeof(*ip); in readudp() 241 if (ntohs(uh->uh_ulen) < sizeof(*uh)) { in readudp() 245 ntohs(uh->uh_ulen), sizeof(*uh)); in readudp()
|
/openbsd/usr.sbin/ldpd/ |
H A D | init.c | 80 if (ntohs(sess.length) != SESS_PRMS_LEN) { in recv_init() 84 if (ntohs(sess.proto_version) != LDP_VERSION) { in recv_init() 93 ntohs(sess.lspace_id) != 0) { in recv_init() 113 tlv_type = ntohs(tlv.type); in recv_init() 114 tlv_len = ntohs(tlv.length); in recv_init() 194 if (!(ntohs(tlv.type) & UNKNOWN_FLAG)) in recv_init() 205 ntohs(sess.keepalive_time)); in recv_init() 207 max_pdu_len = ntohs(sess.max_pdu_len); in recv_init() 293 tlv_type = ntohs(tlv.type); in recv_capability() 294 tlv_len = ntohs(tlv.length); in recv_capability() [all …]
|
H A D | packet.c | 209 if (ntohs(ldp_hdr.version) != LDP_VERSION) { in disc_recv_packet() 214 if (ntohs(ldp_hdr.lspace_id) != 0) { in disc_recv_packet() 220 pdu_len = ntohs(ldp_hdr.length); in disc_recv_packet() 240 msg_len = ntohs(msg.length); in disc_recv_packet() 250 switch (ntohs(msg.type)) { in disc_recv_packet() 457 if (ntohs(ldp_hdr->version) != LDP_VERSION) { in session_read() 463 pdu_len = ntohs(ldp_hdr->length); in session_read() 495 type = ntohs(msg->type); in session_read() 496 msg_len = ntohs(msg->length); in session_read() 566 if (!(ntohs(msg->type) & UNKNOWN_FLAG)) in session_read() [all …]
|
/openbsd/sys/net/ |
H A D | slcompress.c | 149 (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \ 152 (f) = htons(ntohs(f) + (u_int32_t)*cp++); \ 286 deltaS = ntohs(th->th_urp); in sl_compress_tcp() 296 deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); in sl_compress_tcp() 330 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp() 345 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp() 353 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp() 361 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in sl_compress_tcp() 372 deltaA = ntohs(th->th_sum); in sl_compress_tcp() 540 u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp_core() [all …]
|
/openbsd/usr.sbin/unbound/validator/ |
H A D | val_utils.c | 257 || ntohs(rep->rrsets[i]->rk.type) == in val_find_signer() 273 || ntohs(rep->rrsets[i]->rk.type) == in val_find_signer() 293 ntohs(rep->rrsets[skip]->rk.type) == in val_find_signer() 353 ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 362 ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 367 ntohs(rrset->rk.type), ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 630 ntohs(ds_rrset->rk.rrset_class), in val_verify_new_DNSKEYs() 801 ntohs(dnskey_rrset->rk.rrset_class), in val_verify_new_DNSKEYs_with_ta() 963 if(ntohs(orig->rrsets[i]->rk.type) == in val_fill_reply() 1037 ntohs(rep->rrsets[i]->rk.type) in val_check_nonsecure() [all …]
|
/openbsd/sbin/unwind/libunbound/validator/ |
H A D | val_utils.c | 257 || ntohs(rep->rrsets[i]->rk.type) == in val_find_signer() 273 || ntohs(rep->rrsets[i]->rk.type) == in val_find_signer() 293 ntohs(rep->rrsets[skip]->rk.type) == in val_find_signer() 353 ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 362 ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 367 ntohs(rrset->rk.type), ntohs(rrset->rk.rrset_class)); in val_verify_rrset() 630 ntohs(ds_rrset->rk.rrset_class), in val_verify_new_DNSKEYs() 801 ntohs(dnskey_rrset->rk.rrset_class), in val_verify_new_DNSKEYs_with_ta() 963 if(ntohs(orig->rrsets[i]->rk.type) == in val_fill_reply() 1037 ntohs(rep->rrsets[i]->rk.type) in val_check_nonsecure() [all …]
|
/openbsd/libexec/spamd/ |
H A D | sync.c | 272 len < ntohs(hdr->sh_length)) in sync_recv() 274 len = ntohs(hdr->sh_length); in sync_recv() 294 len < ntohs(tlv->st_length)) in sync_recv() 297 switch (ntohs(tlv->st_type)) { in sync_recv() 301 ntohs(sg->sg_from_length) + in sync_recv() 302 ntohs(sg->sg_to_length) + in sync_recv() 303 ntohs(sg->sg_helo_length)) > in sync_recv() 304 ntohs(tlv->st_length)) in sync_recv() 309 to = from + ntohs(sg->sg_from_length); in sync_recv() 310 helo = to + ntohs(sg->sg_to_length); in sync_recv() [all …]
|
/openbsd/usr.sbin/dhcrelay/ |
H A D | packet.c | 73 sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i))); in checksum() 160 IPPROTO_UDP + (u_int32_t)ntohs(udp.uh_ulen))))); in assemble_udp_ip_header() 265 if (buflen != offset + ntohs(ip->ip_len)) in decode_udp_ip_header() 267 ntohs(ip->ip_len), buflen - offset); in decode_udp_ip_header() 271 if (buflen < offset + ntohs(ip->ip_len)) in decode_udp_ip_header() 281 if (buflen < offset + ip_len + ntohs(udp->uh_ulen)) in decode_udp_ip_header() 291 len = ntohs(udp->uh_ulen) - sizeof(*udp); in decode_udp_ip_header() 315 IPPROTO_UDP + (u_int32_t)ntohs(udp->uh_ulen))))); in decode_udp_ip_header()
|
/openbsd/usr.sbin/vmd/ |
H A D | packet.c | 71 sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i))); in checksum() 158 IPPROTO_UDP + (u_int32_t)ntohs(udp.uh_ulen))))); in assemble_udp_ip_header() 260 if (buflen != offset + ntohs(ip->ip_len)) in decode_udp_ip_header() 262 ntohs(ip->ip_len), buflen - offset); in decode_udp_ip_header() 266 if (buflen < offset + ntohs(ip->ip_len)) in decode_udp_ip_header() 275 if (buflen < offset + ip_len + ntohs(udp->uh_ulen)) in decode_udp_ip_header() 284 len = ntohs(udp->uh_ulen) - sizeof(*udp); in decode_udp_ip_header() 297 IPPROTO_UDP + (u_int32_t)ntohs(udp->uh_ulen))))); in decode_udp_ip_header()
|