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

1234567891011>>

/freebsd-9.3-release/tools/tools/net80211/wesside/dics/
H A Ddics.c156 *port = ntohs(s_in.sin_port);
181 *port = ntohs(uh->uh_sport);
272 iph->ip_len = ntohs(iph->ip_len);
278 ntohs(dst.sin_port));
/freebsd-9.3-release/contrib/libpcap/
H A Dnametoaddr.c91 #define NTOHS(x) (x) = ntohs(x)
184 if (sp != NULL) tcp_port = ntohs(sp->s_port);
186 if (sp != NULL) udp_port = ntohs(sp->s_port);
H A Dpcap-dag.c311 rlen = ntohs(header->rlen);
333 if (p->md.stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
336 p->md.stat.ps_drop += ntohs(header->lctr);
362 packet_len = ntohs(header->wlen) + dag_record_size;
401 packet_len = ntohs(header->wlen);
411 packet_len = ntohs(header->wlen);
443 packet_len = ntohs(header->wlen);
456 packet_len = ntohs(header->wlen);
466 packet_len = ntohs(header->wlen);
492 packet_len = ntohs(heade
[all...]
/freebsd-9.3-release/sys/ofed/drivers/infiniband/ulp/sdp/
H A Dsdp_dbg.h13 (sk) && sdp_sk(sk) ? ntohs(sdp_sk(sk)->lport) : -1, \
14 (sk) && sdp_sk(sk) ? ntohs(sdp_sk(sk)->fport) : -1, ## arg); \
71 l->sk_dport = (sk) ? ntohs(inet_sk(sk)->dport) : -1; \
/freebsd-9.3-release/sys/ofed/drivers/net/mlx4/
H A Den_frag.c136 ip_len = ntohs(iph->ip_len);
139 offset = ntohs(iph->ip_off);
173 if (!(ntohs(iph->ip_off) & IP_MF))
/freebsd-9.3-release/sys/contrib/ipfilter/netinet/
H A Dip_nat.c551 sum1 = (~ntohs(*sp)) & 0xffff;
588 sum1 = (~ntohs(*sp)) & 0xffff;
613 /* processing like hardware cksum or ntohs processing have been done by the */
626 sum1 = (~ntohs(*sp)) & 0xffff;
1022 n->in_pnext = ntohs(n->in_pmin);
1026 if (ntohs(n->in_pmax) >= ntohs(n->in_pmin)) {
1027 n->in_space *= (ntohs(n->in_pmax) -
1028 ntohs(n->in_pmin) + 1);
1500 fin.fin_data[0] = ntohs(na
[all...]
/freebsd-9.3-release/libexec/rlogind/
H A Drlogind.c217 fromp->su_port = ntohs((u_short)fromp->su_port);
327 w.ws_row = ntohs(w.ws_row);
328 w.ws_col = ntohs(w.ws_col);
329 w.ws_xpixel = ntohs(w.ws_xpixel);
330 w.ws_ypixel = ntohs(w.ws_ypixel);
/freebsd-9.3-release/lib/libstand/
H A Dtftp.c198 *rtype = ntohs(t->th_opcode);
199 switch (ntohs(t->th_opcode)) {
221 if ((unsigned) ntohs(t->th_code) > TFTP_MAX_ERRCODE) {
222 printf("illegal tftp error %d\n", ntohs(t->th_code));
226 printf("tftp-error %d\n", ntohs(t->th_code));
228 errno = tftperrors[ntohs(t->th_code)];
261 printf("tftp type %d not handled\n", ntohs(t->th_opcode));
/freebsd-9.3-release/sys/netinet/
H A Dip_divert.c213 ip->ip_len = ntohs(ip->ip_len);
220 ip->ip_len = ntohs(ip->ip_len);
390 ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
397 ip->ip_len = ntohs(ip->ip_len);
398 ip->ip_off = ntohs(ip->ip_off);
406 if (((u_short)ntohs(ip6->ip6_plen) > m->m_pkthdr.len)) {
412 ip6->ip6_plen = ntohs(ip6->ip6_plen);
H A Dsctp_input.c99 if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) {
151 offset + ntohs(cp->ch.chunk_length))) {
306 if (asoc->pre_open_streams > ntohs(init->num_inbound_streams)) {
313 newcnt = ntohs(init->num_inbound_streams);
396 if (asoc->max_inbound_streams > ntohs(init->num_outbound_streams)) {
397 asoc->streamincnt = ntohs(init->num_outbound_streams);
463 initack_limit = offset + ntohs(cp->ch.chunk_length);
578 if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_heartbeat_chunk)) {
781 len = ntohs(abort->ch.chunk_length);
790 error = ntohs(nat
[all...]
/freebsd-9.3-release/sys/netinet/libalias/
H A Dalias_proxy.c196 *port = (u_int) ntohs(se->s_port);
308 inet_ntoa(GetProxyAddress(lnk)), (u_int) ntohs(GetProxyPort(lnk)));
323 if ((int)(ntohs(pip->ip_len) + strlen(buffer)) > maxpacketsize)
333 dlen = ntohs(pip->ip_len) - hlen;
363 pip->ip_len = htons(ntohs(pip->ip_len) + slen);
407 memcpy(ptr + OPTION_LEN_BYTES, ptr, ntohs(pip->ip_len) - 20);
437 pip->ip_len = htons(ntohs(pip->ip_len) + OPTION_LEN_BYTES);
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)))
730 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),
987 inet_ntoa(ip->ip_dst),ntohs(sctp_hdr->dest_port),
1043 bytes_left = ntohs(pip->ip_len) - (pip->ip_hl << 2);
1065 chunk_length = SCTP_SIZE32(ntohs(chunk_hdr->chunk_length));
1144 if (ntohs(param_hdr->param_type) == SCTP_IPV4_ADDRESS) {
1210 chunk_length = SCTP_SIZE32(ntohs(chunk_hd
[all...]
H A Dalias_irc.c102 if (ntohs(*ah->dport) == IRC_CONTROL_PORT_NUMBER_1
103 || ntohs(*ah->dport) == IRC_CONTROL_PORT_NUMBER_2)
183 tlen = ntohs(pip->ip_len);
/freebsd-9.3-release/sbin/routed/
H A Dinput.c374 ntohs(n->n_family),
473 if (ntohs(from->sin_port) > IPPORT_RESERVED) {
501 if (from->sin_port != ntohs(RIP_PORT)) {
505 ntohs(from->sin_port), naddr_ntoa(FROM_NADDR));
969 len = ntohs(NA->au.a_md5.md5_pkt_len);
1001 if (na2->a_type != ntohs(1))
1005 na2->a_type, ntohs(1),
H A Dtrace.c617 (void)fprintf(ftrace, "tag=%#x ", ntohs(rts->rts_tag));
898 ntohs(who->sin_port),
905 naddr_ntoa(who->sin_addr.s_addr), ntohs(who->sin_port),
936 ntohs(n->n_tag));
960 ntohs(NA->au.a_md5.md5_pkt_len),
964 (int)ntohs(NA->au.a_md5.rsvd[0]),
965 (int)ntohs(NA->au.a_md5.rsvd[1]));
970 ntohs(NA->a_type));
984 ntohs(n->n_family),
1005 ntohs(
[all...]
/freebsd-9.3-release/contrib/ipfilter/ipsend/
H A Diptests.c152 ip->ip_len = sizeof(*ip) + ntohs(u->uh_ulen);
165 for (i = 0; i < ((sizeof(*ip) + ntohs(u->uh_ulen)) >> 2); i++) {
181 for (; i < ((sizeof(*ip) * 2 + ntohs(u->uh_ulen)) >> 2); i++) {
810 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
812 for (i = ntohs(u->uh_ulen) * 2; i > sizeof(*u) + 4; i--) {
827 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
829 for (i = ntohs(u->uh_ulen) * 2; i > sizeof(*u) + 4; i--) {
845 ip->ip_len = (IP_HL(ip) << 2) + ntohs(u->uh_ulen);
884 u->uh_ulen = ntohs(sizeof(*u) + 4);
886 ip->ip_len = (IP_HL(ip) << 2) + ntohs(
[all...]
/freebsd-9.3-release/sys/netgraph/
H A Dng_pppoe.c294 + ntohs(ph->length));
316 ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
388 tlen = ntohs((*tag)->tag_len) + sizeof(**tag);
434 if (neg->service_len != ntohs(tag->tag_len))
438 ntohs(tag->tag_len)) == 0)
561 uint16_t session = ntohs(wh->ph.sid);
1100 tlen = min(NG_HOOKSIZ - 1, ntohs(tag->tag_len));
1200 session = ntohs(wh->ph.sid);
1201 length = ntohs(wh->ph.length);
1313 length = ntohs(w
[all...]
/freebsd-9.3-release/contrib/bind9/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));
217 p = ntohs(sockaddr->type.sin.sin_port);
228 p = ntohs(sockaddr->type.sin6.sin6_port);
425 port = ntohs(sockaddr->type.sin.sin_port);
428 port = ntohs(sockaddr->type.sin6.sin6_port);
/freebsd-9.3-release/usr.bin/sockstat/
H A Dsockstat.c511 port = ntohs(((struct sockaddr_in *)ss)->sin_port);
517 port = ntohs(((struct sockaddr_in6 *)ss)->sin6_port);
584 port = ntohs(((struct sockaddr_in *)(&s->laddr))->sin_port);
586 port = ntohs(((struct sockaddr_in6 *)(&s->laddr))->sin6_port);
590 port = ntohs(((struct sockaddr_in *)(&s->faddr))->sin_port);
592 port = ntohs(((struct sockaddr_in6 *)(&s->faddr))->sin6_port);
/freebsd-9.3-release/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-9.3-release/lib/libsdp/
H A Dsearch.c195 xpdu.pdu.tid = ntohs(xpdu.pdu.tid);
196 xpdu.pdu.len = ntohs(xpdu.pdu.len);
197 xpdu.len = ntohs(xpdu.len);
/freebsd-9.3-release/contrib/ofed/libmlx4/src/
H A Dcq.c251 wqe_index = ntohs(cqe->wqe_index);
330 wc->slid = ntohs(cqe->rlid);
429 mlx4_free_srq_wqe(srq, ntohs(cqe->wqe_index));
433 mlx4_free_srq_wqe(srq, ntohs(cqe->wqe_index));
/freebsd-9.3-release/contrib/tcpdump/
H A Din_cksum.c196 shouldbe += ntohs(computed_sum);
/freebsd-9.3-release/contrib/wpa/wpa_supplicant/
H A Dctrl_iface_udp.c74 inet_ntoa(from->sin_addr), ntohs(from->sin_port));
96 ntohs(from->sin_port));
121 ntohs(from->sin_port));
375 ntohs(dst->addr.sin_port));
/freebsd-9.3-release/crypto/heimdal/lib/roken/
H A Dmini_inetd.c139 snprintf (portstr, sizeof(portstr), "%d", ntohs(port));

Completed in 186 milliseconds

1234567891011>>