Home
last modified time | relevance | path

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

1234567

/f-stack/tools/compat/include/netinet/
H A Dtcp_seq.h50 #define WIN_LT(a,b) (ntohs(a) < ntohs(b))
51 #define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b))
52 #define WIN_GT(a,b) (ntohs(a) > ntohs(b))
53 #define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b))
/f-stack/freebsd/netinet/
H A Dtcp_seq.h50 #define WIN_LT(a,b) (ntohs(a) < ntohs(b))
51 #define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b))
52 #define WIN_GT(a,b) (ntohs(a) > ntohs(b))
53 #define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b))
H A Dip_reass.c241 if (ntohs(ip->ip_len) + ntohs(ip->ip_off) > IP_MAXPACKET) { in ip_reass()
320 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
330 i = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
338 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
368 if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) in ip_reass()
381 i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - in ip_reass()
382 ntohs(ip->ip_off); in ip_reass()
384 if (i >= ntohs(ip->ip_len)) in ip_reass()
402 for (; q != NULL && ntohs(ip->ip_off) + ntohs(ip->ip_len) > in ip_reass()
404 i = (ntohs(ip->ip_off) + ntohs(ip->ip_len)) - in ip_reass()
[all …]
H A Dsctp_asconf.c180 param_type = ntohs(ph->param_type); in sctp_process_asconf_add_ip()
340 param_type = ntohs(ph->param_type); in sctp_process_asconf_delete_ip()
477 param_type = ntohs(ph->param_type); in sctp_process_asconf_set_primary()
628 ntohs(cp->ch.chunk_length)); in sctp_handle_asconf()
892 param_type = ntohs(ph->param_type); in sctp_addr_match()
1589 error_code = ntohs(eh->code); in sctp_asconf_process_error()
1682 ntohs(cp->ch.chunk_length)); in sctp_handle_asconf_ack()
2781 ptype = ntohs(ph->param_type); in sctp_process_initack_addresses()
2782 plen = ntohs(ph->param_length); in sctp_process_initack_addresses()
2929 ptype = ntohs(ph->param_type); in sctp_addr_in_initack()
[all …]
H A Dsiftr.c472 ntohs(pkt_node->tcp_localport), in siftr_process_pkt()
481 ntohs(pkt_node->tcp_foreignport), in siftr_process_pkt()
527 ntohs(pkt_node->tcp_localport), in siftr_process_pkt()
532 ntohs(pkt_node->tcp_foreignport), in siftr_process_pkt()
916 (siftr_port_filter != ntohs(inp->inp_lport)) && in siftr_chkpkt()
917 (siftr_port_filter != ntohs(inp->inp_fport))) { in siftr_chkpkt()
983 th->th_sum = in_cksum_skip(*m, ntohs(ip->ip_len), in siftr_chkpkt()
1407 ntohs(lport), in siftr_manage_ops()
1416 ntohs(fport)); in siftr_manage_ops()
1433 ntohs(lport), in siftr_manage_ops()
[all …]
/f-stack/freebsd/netinet/libalias/
H A Dalias_nbt.c495 bcount = ntohs(q->rdlen); in AliasHandleResourceNB()
572 bcount = ntohs(q->rdlen); in AliasHandleResourceA()
631 bcount = ntohs(q->rdlen); in AliasHandleResourceNULL()
666 bcount = ntohs(q->rdlen); in AliasHandleResourceNS()
699 bcount = ntohs(q->rdlen); in AliasHandleResourceNBSTAT()
766 ntohs(q->type) in AliasHandleResource()
820 ntohs(nsh->qdcount), in AliasHandleUdpNbtNS()
821 ntohs(nsh->ancount), in AliasHandleUdpNbtNS()
822 ntohs(nsh->nscount), in AliasHandleUdpNbtNS()
823 ntohs(nsh->arcount), in AliasHandleUdpNbtNS()
[all …]
H A Dalias_smedia.c141 ntohs(*ah->dport) == TFTP_PORT_NUMBER) in fingerprint()
146 if (ntohs(*ah->dport) == RTSP_CONTROL_PORT_NUMBER_1 in fingerprint()
158 if (ntohs(*ah->dport) == TFTP_PORT_NUMBER) in protohandler()
257 tlen = ntohs(pip->ip_len); in alias_rtsp_out()
333 base_alias = ntohs(salias); in alias_rtsp_out()
367 sprintf(stemp, "%d", ntohs(salias)); in alias_rtsp_out()
376 sprintf(stemp, "%d", ntohs(ealias)); in alias_rtsp_out()
448 if (ntohs(msg_id) == 0) { in alias_pna_out()
452 if ((ntohs(msg_id) == 1) || (ntohs(msg_id) == 7)) { in alias_pna_out()
474 work += ntohs(msg_len); in alias_pna_out()
[all …]
H A Dalias_ftp.c116 if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || in fingerprint_out()
117 ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) in fingerprint_out()
128 if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || in fingerprint_in()
129 ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) in fingerprint_in()
237 tlen = ntohs(pip->ip_len); in AliasHandleFtpOut()
279 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may in AliasHandleFtpOut()
301 tlen = ntohs(pip->ip_len); in AliasHandleFtpIn()
329 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may in AliasHandleFtpIn()
677 tlen = ntohs(pip->ip_len); in NewFtpMessage()
722 a1, a2, a3, a4, ntohs(alias_port)); in NewFtpMessage()
[all …]
H A Dalias_skinny.c67 if (la->skinnyPort != 0 && (ntohs(*ah->sport) == la->skinnyPort || in fingerprint()
68 ntohs(*ah->dport) == la->skinnyPort)) in fingerprint()
260 port_msg->stationIpPort = (u_int32_t) ntohs(GetAliasPort(lnk)); in alias_skinny_port_msg()
292 opnrcvch_ack->port = (u_int32_t) ntohs(GetAliasPort(opnrcv_lnk)); in alias_skinny_opnrcvch_ack()
316 tlen = ntohs(pip->ip_len); in AliasHandleSkinny()
326 if (ntohs(tc->th_dport) == la->skinnyPort) { in AliasHandleSkinny()
328 } else if (ntohs(tc->th_sport) == la->skinnyPort) { in AliasHandleSkinny()
H A Dalias_sctp.c747 if (ntohs(pip->ip_off) & IP_MF) { in SctpAlias()
1006 ntohs(sctp_hdr->dest_port), in TxAbortErrorM()
1062 bytes_left = ntohs(pip->ip_len) - (pip->ip_hl << 2); in sctp_PktParser()
1278 param_size = SCTP_SIZE32(ntohs(param->param_length)); in GetAsconfVtags()
1282 if (ntohs(param->param_type) == SCTP_VTAG_PARAM) { in GetAsconfVtags()
1390 switch (ntohs(param->param_type)) { in AddGlobalIPAddresses()
1604 param_size = SCTP_SIZE32(ntohs(param->param_length)); in IsASCONFack()
1613 if (ntohs(param->param_type) == SCTP_SUCCESS_REPORT) in IsASCONFack()
1657 param_size = SCTP_SIZE32(ntohs(param->param_length)); in IsADDorDEL()
2624 ntohl(assoc->l_vtag), ntohs(assoc->l_port), in logsctpassoc()
[all …]
H A Dalias_dummy.c79 if (ntohs(*ah->dport) == 123 in fingerprint()
80 || ntohs(*ah->sport) == 456) in fingerprint()
H A Dalias_pptp.c87 if (ntohs(*ah->dport) == PPTP_CONTROL_PORT_NUMBER in fingerprint()
88 || ntohs(*ah->sport) == PPTP_CONTROL_PORT_NUMBER) in fingerprint()
446 tlen = ntohs(pip->ip_len); in AliasVerifyPptp()
457 *ptype = ntohs(hptr->type); in AliasVerifyPptp()
460 if ((ntohs(hptr->msgType) != PPTP_CTRL_MSG_TYPE) || in AliasVerifyPptp()
/f-stack/freebsd/net/
H A Dif_spppfr.c192 if (ntohs (*(short*) (h+2)) == ETHERTYPE_IP) { in sppp_fr_input()
224 proto = ntohs (*(short*) (h+8)); in sppp_fr_input()
413 if ((ntohs (req->htype) != ARPHRD_FRELAY || in sppp_fr_arp()
415 ntohs (req->ptype) != ETHERTYPE_IP) { in sppp_fr_arp()
419 ntohs (req->htype), ntohs (req->ptype)); in sppp_fr_arp()
429 switch (ntohs (req->op)) { in sppp_fr_arp()
433 SPP_ARGS(ifp), ntohs (req->op)); in sppp_fr_arp()
441 my_hardware_address = ntohs (req->htarget); in sppp_fr_arp()
443 ntohs (req->psource2); in sppp_fr_arp()
445 ntohs (req->ptarget2); in sppp_fr_arp()
[all …]
H A Dslcompress.c126 (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
129 (f) = htons(ntohs(f) + (u_int32_t)*cp++); \
278 deltaS = ntohs(th->th_urp); in sl_compress_tcp()
288 deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); in sl_compress_tcp()
321 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp()
336 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
344 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
352 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in sl_compress_tcp()
363 deltaA = ntohs(th->th_sum); in sl_compress_tcp()
529 u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp_core()
[all …]
H A Ddebugnet_inet.c152 ip->ip_len = ntohs(ip->ip_len); in debugnet_handle_ip()
172 ip->ip_off = ntohs(ip->ip_off); in debugnet_handle_ip()
299 if (ntohs(ah->ar_hrd) != ARPHRD_ETHER) { in debugnet_handle_arp()
304 if (ntohs(ah->ar_pro) != ETHERTYPE_IP) { in debugnet_handle_arp()
306 ntohs(ah->ar_pro)); in debugnet_handle_arp()
320 op = ntohs(ah->ar_op); in debugnet_handle_arp()
H A Dieee8023ad_lacp.c622 req->actor_prio = ntohs(la->la_actor.lip_systemid.lsi_prio); in lacp_req()
625 req->actor_key = ntohs(la->la_actor.lip_key); in lacp_req()
633 req->partner_key = ntohs(la->la_partner.lip_key); in lacp_req()
649 req->actor_prio = ntohs(lp->lp_actor.lip_systemid.lsi_prio); in lacp_portreq()
652 req->actor_key = ntohs(lp->lp_actor.lip_key); in lacp_portreq()
653 req->actor_portprio = ntohs(lp->lp_actor.lip_portid.lpi_prio); in lacp_portreq()
660 req->partner_key = ntohs(lp->lp_partner.lip_key); in lacp_portreq()
2099 ntohs(sysid->lsi_prio), in lacp_format_systemid()
2109 ntohs(portid->lpi_prio), in lacp_format_portid()
2110 ntohs(portid->lpi_portno)); in lacp_format_portid()
[all …]
/f-stack/freebsd/netpfil/ipfw/
H A Dip_fw_log.c337 ntohs(tcp->th_sport), in ipfw_log()
339 ntohs(tcp->th_dport)); in ipfw_log()
351 ntohs(udp->uh_sport), in ipfw_log()
353 ntohs(udp->uh_dport)); in ipfw_log()
395 ntohs(ip6->ip6_plen) - hlen, in ipfw_log()
396 ntohs(offset) << 3, ip6f_mf ? "+" : ""); in ipfw_log()
401 ipoff = ntohs(ip->ip_off); in ipfw_log()
402 iplen = ntohs(ip->ip_len); in ipfw_log()
406 ntohs(ip->ip_id), iplen - (ip->ip_hl << 2), in ipfw_log()
/f-stack/freebsd/contrib/ipfilter/netinet/
H A Dip_dns_pxy.c50 #define DNS_QR(x) ((ntohs(x) & 0x8000) >> 15)
51 #define DNS_OPCODE(x) ((ntohs(x) & 0x7800) >> 11)
52 #define DNS_AA(x) ((ntohs(x) & 0x0400) >> 10)
53 #define DNS_TC(x) ((ntohs(x) & 0x0200) >> 9)
54 #define DNS_RD(x) ((ntohs(x) & 0x0100) >> 8)
55 #define DNS_RA(x) ((ntohs(x) & 0x0080) >> 7)
56 #define DNS_Z(x) ((ntohs(x) & 0x0070) >> 4)
57 #define DNS_RCODE(x) ((ntohs(x) & 0x000f) >> 0)
H A Dip_nat6.c558 port = ntohs(sport) + l;
612 port = ntohs(sport);
678 fin->fin_data[1] = ntohs(port);
894 fin->fin_data[0] = ntohs(nport);
1184 sum1 += ntohs(nat->nat_osport);
1186 sum2 += ntohs(nat->nat_nsport);
1191 sum1 += ntohs(nat->nat_odport);
1767 sum4 = ntohs(tcp->th_sport);
1769 sum2 = ntohs(tcp->th_dport);
1775 sum2 = ntohs(tcp->th_dport);
[all …]
/f-stack/freebsd/mips/include/
H A Din_cksum.h58 __tmpsum = (int)ntohs(ip->ip_sum) + 256; in in_cksum_update()
67 __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
/f-stack/freebsd/netinet6/
H A Dmld6.h57 #define MLD_MRC_EXP(x) ((ntohs((x)) >> 12) & 0x0007)
58 #define MLD_MRC_MANT(x) (ntohs((x)) & 0x0fff)
/f-stack/freebsd/amd64/include/
H A Din_cksum.h61 __tmpsum = (int)ntohs(ip->ip_sum) + 256; in in_cksum_update()
70 __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
/f-stack/freebsd/kern/
H A Duipc_mbufhash.c172 etype = ntohs(eh->ether_type); in m_ether_tcpip_hash()
188 etype = ntohs(vlan->evl_proto); in m_ether_tcpip_hash()
206 etype = ntohs(ibh->ib_protocol); in m_infiniband_tcpip_hash()
/f-stack/freebsd/i386/include/
H A Din_cksum.h91 __tmpsum = (int)ntohs(ip->ip_sum) + 256; in in_cksum_update()
132 __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
/f-stack/freebsd/contrib/openzfs/lib/libspl/include/os/linux/sys/
H A Dbyteorder.h62 #define ntohs(x) (x) macro
82 extern uint16_t ntohs(uint16_t);
87 extern in_port_t ntohs(in_port_t);

1234567