Searched refs:ntohs (Results 101 - 125 of 577) sorted by relevance

1234567891011>>

/freebsd-11-stable/sys/netgraph/
H A Dng_pppoe.c318 + ntohs(ph->length));
340 ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
412 tlen = ntohs((*tag)->tag_len) + sizeof(**tag);
458 if (neg->service_len != ntohs(tag->tag_len))
462 ntohs(tag->tag_len)) == 0)
585 uint16_t session = ntohs(wh->ph.sid);
619 if (sp->neg->host_uniq_len == ntohs(tag->tag_len) &&
1307 tlen = min(NG_HOOKSIZ - 1, ntohs(tag->tag_len));
1350 maxp->data = ntohs(((const struct maxptag *)tag)->data);
1371 tlen = min(PPPOE_PADM_VALUE_SIZE - 1, ntohs(ta
[all...]
/freebsd-11-stable/contrib/libpcap/
H A Dnametoaddr.c148 #define NTOHS(x) (x) = ntohs(x)
347 tcp_port = ntohs(in4->sin_port);
353 tcp_port = ntohs(in6->sin6_port);
391 udp_port = ntohs(in4->sin_port);
397 udp_port = ntohs(in6->sin6_port);
H A Dpcap-dag.c421 rlen = ntohs(header->rlen);
443 pd->stat.ps_drop += ntohs(header->lctr);
468 packet_len = ntohs(header->wlen) + dag_record_size;
507 packet_len = ntohs(header->wlen);
517 packet_len = ntohs(header->wlen);
556 packet_len = ntohs(header->wlen);
575 packet_len = ntohs(header->wlen);
594 packet_len = ntohs(header->wlen);
624 packet_len = ntohs(header->wlen);
637 packet_len = ntohs(heade
[all...]
/freebsd-11-stable/contrib/unbound/util/data/
H A Dpacked_rrset.c166 uint16_t t = ntohs(key->type);
201 if(ntohs(rrset->rk.type) != LDNS_RR_TYPE_CNAME &&
202 ntohs(rrset->rk.type) != LDNS_RR_TYPE_DNAME)
269 ntohs(rrset->rk.type), ntohs(rrset->rk.rrset_class));
H A Dmsgreply.c736 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME &&
737 ntohs(s->rk.rrset_class) == qinfo->qclass &&
757 if(ntohs(s->rk.type) == qinfo->qtype &&
758 ntohs(s->rk.rrset_class) == qinfo->qclass &&
764 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME &&
765 ntohs(s->rk.rrset_class) == qinfo->qclass &&
780 if(ntohs(s->rk.type) == type &&
781 ntohs(s->rk.rrset_class) == dclass &&
796 if(ntohs(s->rk.type) == type &&
797 ntohs(
[all...]
/freebsd-11-stable/sbin/routed/
H A Dinput.c386 ntohs(n->n_family),
485 if (ntohs(from->sin_port) > IPPORT_RESERVED) {
513 if (from->sin_port != ntohs(RIP_PORT)) {
517 ntohs(from->sin_port), naddr_ntoa(FROM_NADDR));
981 len = ntohs(NA->au.a_md5.md5_pkt_len);
1013 if (na2->a_type != ntohs(1))
1017 na2->a_type, ntohs(1),
H A Dtrace.c623 (void)fprintf(ftrace, "tag=%#x ", ntohs(rts->rts_tag));
904 ntohs(who->sin_port),
911 naddr_ntoa(who->sin_addr.s_addr), ntohs(who->sin_port),
942 ntohs(n->n_tag));
966 ntohs(NA->au.a_md5.md5_pkt_len),
970 (int)ntohs(NA->au.a_md5.rsvd[0]),
971 (int)ntohs(NA->au.a_md5.rsvd[1]));
976 ntohs(NA->a_type));
990 ntohs(n->n_family),
1011 ntohs(
[all...]
/freebsd-11-stable/sys/netinet/libalias/
H A Dalias_sctp.c210 #define SN_SCTP_NEXTCHUNK(chunkhead) (struct sctp_chunkhdr *)(((char *)chunkhead) + SCTP_SIZE32(ntohs(chunkhead->chunk_length)))
213 #define SN_SCTP_NEXTPARAM(param) (struct sctp_paramhdr *)(((char *)param) + SCTP_SIZE32(ntohs(param->param_length)))
729 if (ntohs(pip->ip_off) & IP_MF) {
908 if (ntohs(sm->ip_hdr->ip_len) < ip_size) { /* short packet, cannot send error cause */
986 (include_error_cause ? ntohs(error_cause->code) : 0),
988 ntohs(sctp_hdr->dest_port),
1044 bytes_left = ntohs(pip->ip_len) - (pip->ip_hl << 2);
1066 chunk_length = SCTP_SIZE32(ntohs(chunk_hdr->chunk_length));
1145 if (ntohs(param_hdr->param_type) == SCTP_IPV4_ADDRESS) {
1211 chunk_length = SCTP_SIZE32(ntohs(chunk_hd
[all...]
H A Dalias_proxy.c196 *port = (u_int) ntohs(se->s_port);
310 (u_int) ntohs(GetProxyPort(lnk)));
325 if ((int)(ntohs(pip->ip_len) + strlen(buffer)) > maxpacketsize)
335 dlen = ntohs(pip->ip_len) - hlen;
365 pip->ip_len = htons(ntohs(pip->ip_len) + slen);
409 memcpy(ptr + OPTION_LEN_BYTES, ptr, ntohs(pip->ip_len) - 20);
439 pip->ip_len = htons(ntohs(pip->ip_len) + OPTION_LEN_BYTES);
H A Dalias_irc.c101 if (ntohs(*ah->dport) == IRC_CONTROL_PORT_NUMBER_1
102 || ntohs(*ah->dport) == IRC_CONTROL_PORT_NUMBER_2)
182 tlen = ntohs(pip->ip_len);
/freebsd-11-stable/stand/libsa/
H A Dtftp.c202 extra->rtype = ntohs(t->th_opcode);
203 switch (ntohs(t->th_opcode)) {
236 if ((unsigned)ntohs(t->th_code) > TFTP_MAX_ERRCODE) {
237 printf("illegal tftp error %d\n", ntohs(t->th_code));
241 printf("tftp-error %d\n", ntohs(t->th_code));
243 errno = tftperrors[ntohs(t->th_code)];
281 printf("tftp type %d not handled\n", ntohs(t->th_opcode));
/freebsd-11-stable/sys/netinet/
H A Dsctp_input.c101 if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) {
153 offset + ntohs(cp->ch.chunk_length))) {
312 if (asoc->pre_open_streams > ntohs(init->num_inbound_streams)) {
319 newcnt = ntohs(init->num_inbound_streams);
400 if (asoc->max_inbound_streams > ntohs(init->num_outbound_streams)) {
401 asoc->streamincnt = ntohs(init->num_outbound_streams);
502 initack_limit = offset + ntohs(cp->ch.chunk_length);
576 if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_heartbeat_chunk)) {
801 len = ntohs(abort->ch.chunk_length);
810 error = ntohs(caus
[all...]
H A Dsiftr.c464 ntohs(pkt_node->tcp_localport),
473 ntohs(pkt_node->tcp_foreignport),
519 ntohs(pkt_node->tcp_localport),
524 ntohs(pkt_node->tcp_foreignport),
970 th->th_sum = in_cksum_skip(*m, ntohs(ip->ip_len),
1371 ntohs(lport),
1380 ntohs(fport));
1397 ntohs(lport),
1402 ntohs(fport));
H A Dip_icmp.c257 if (ntohs(oip->ip_len) < oiphlen + tcphlen)
265 ntohs(oip->ip_len) - oiphlen));
270 if (ntohs(oip->ip_len) < oiphlen + sizeof(struct sctphdr))
280 min(V_icmp_quotelen, ntohs(oip->ip_len) - oiphlen));
283 ntohs(oip->ip_len) >= oiphlen +
296 min(V_icmp_quotelen, ntohs(oip->ip_len) -
301 stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs(oip->ip_len) -
398 int icmplen = ntohs(ip->ip_len) - *offp;
927 icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);
/freebsd-11-stable/contrib/ipfilter/ipsend/
H A Diptests.c125 ip->ip_len = sizeof(*ip) + ntohs(u->uh_ulen);
138 for (i = 0; i < ((sizeof(*ip) + ntohs(u->uh_ulen)) >> 2); i++) {
154 for (; i < ((sizeof(*ip) * 2 + ntohs(u->uh_ulen)) >> 2); i++) {
783 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
785 for (i = ntohs(u->uh_ulen) * 2; i > sizeof(*u) + 4; i--) {
800 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
802 for (i = ntohs(u->uh_ulen) * 2; i > sizeof(*u) + 4; i--) {
818 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
857 u->uh_ulen = ntohs(sizeof(*u) + 4);
859 ip->ip_len = (IP_HL(ip) << 2) + ntohs(
[all...]
/freebsd-11-stable/contrib/unbound/validator/
H A Dval_neg.c330 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NSEC) {
570 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_SOA)
584 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NSEC) {
687 if(ntohs(nsec->rk.type) == LDNS_RR_TYPE_NSEC) {
763 nsec->rk.dname, ntohs(nsec->rk.type),
764 ntohs(nsec->rk.rrset_class));
818 if(ntohs(nsec->rk.type) == LDNS_RR_TYPE_NSEC3) {
859 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NSEC ||
860 ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NSEC3) {
868 *dclass = ntohs(re
[all...]
/freebsd-11-stable/sys/contrib/ipfilter/netinet/
H A Dip_nat6.c558 port = ntohs(sport) + l;
612 port = ntohs(sport);
678 fin->fin_data[1] = ntohs(port);
863 nport = ntohs(dport) - np->in_odport + np->in_dpmax;
894 fin->fin_data[0] = ntohs(nport);
1169 sum1 += ntohs(nat->nat_oicmpid);
1171 sum2 += ntohs(nat->nat_nicmpid);
1184 sum1 += ntohs(nat->nat_osport);
1186 sum2 += ntohs(nat->nat_nsport);
1191 sum1 += ntohs(na
[all...]
H A Dip_fil_freebsd.c144 ip->ip_len = ntohs(ip->ip_len);
145 ip->ip_off = ntohs(ip->ip_off);
461 fnew.fin_plen = ntohs(ip->ip_len);
480 fnew.fin_plen = ntohs(ip6->ip6_plen) + hlen;
549 switch (ntohs(fin->fin_data[0]) >> 8)
826 if (ntohs(ip->ip_len) <= ifp->if_mtu) {
838 ip_off = ntohs(ip->ip_off);
859 for (off = hlen + len; off < ntohs(ip->ip_len); off += len) {
879 if (off + len >= ntohs(ip->ip_len))
880 len = ntohs(i
[all...]
/freebsd-11-stable/contrib/ntp/lib/isc/
H A Dsockaddr.c130 snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sockaddr->type.sin.sin_port));
133 snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sockaddr->type.sin6.sin6_port));
218 p = ntohs(sockaddr->type.sin.sin_port);
230 p = ntohs(sockaddr->type.sin6.sin6_port);
429 port = ntohs(sockaddr->type.sin.sin_port);
432 port = ntohs(sockaddr->type.sin6.sin6_port);
/freebsd-11-stable/lib/libsdp/
H A Dsearch.c196 xpdu.pdu.tid = ntohs(xpdu.pdu.tid);
197 xpdu.pdu.len = ntohs(xpdu.pdu.len);
198 xpdu.len = ntohs(xpdu.len);
/freebsd-11-stable/contrib/unbound/sldns/
H A Dkeyraw.c70 exp = ntohs(int16);
117 ac16 = ntohs(ac16);
281 exp = ntohs(int16);
/freebsd-11-stable/contrib/netbsd-tests/kernel/
H A Dt_kauth_pr_47598.c138 printf("port is %d\n", ntohs(sa.sin_port));
/freebsd-11-stable/lib/libc/net/
H A Drcmdsh.c88 (unsigned int)ntohs(rport));
/freebsd-11-stable/sbin/natd/
H A Dicmp.c54 if (ntohs (failedDgram->ip_off) & ~(IP_MF | IP_DF))
/freebsd-11-stable/crypto/openssh/openbsd-compat/
H A Dgetrrsetbyname.c401 resp->header.qdcount = ntohs(resp->header.qdcount);
402 resp->header.ancount = ntohs(resp->header.ancount);
403 resp->header.nscount = ntohs(resp->header.nscount);
404 resp->header.arcount = ntohs(resp->header.arcount);

Completed in 226 milliseconds

1234567891011>>