Home
last modified time | relevance | path

Searched refs:ntohl (Results 1 – 25 of 155) sorted by relevance

1234567

/f-stack/freebsd/contrib/openzfs/lib/libspl/include/os/linux/sys/
H A Dbyteorder.h59 #if defined(_ZFS_BIG_ENDIAN) && !defined(ntohl) && !defined(__lint)
61 #define ntohl(x) (x) macro
66 #elif !defined(ntohl) /* little-endian */
81 extern uint32_t ntohl(uint32_t);
86 extern in_addr_t ntohl(in_addr_t);
151 return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32));
/f-stack/freebsd/netinet/
H A Dip_ecn.c170 inner8 = (ntohl(*inner) >> 20) & 0xff; in ip6_ecn_ingress()
184 outer8 = (ntohl(*outer) >> 20) & 0xff; in ip6_ecn_egress()
185 inner8 = oinner8 = (ntohl(*inner) >> 20) & 0xff; in ip6_ecn_egress()
H A Dip_fastfwd.c142 u_long src = ntohl(ip->ip_src.s_addr); in ip_redir_alloc()
252 ntohl(ip->ip_src.s_addr) == (u_long)INADDR_BROADCAST || in ip_tryforward()
253 ntohl(ip->ip_dst.s_addr) == (u_long)INADDR_BROADCAST || in ip_tryforward()
254 IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || in ip_tryforward()
255 IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || in ip_tryforward()
256 IN_LINKLOCAL(ntohl(ip->ip_src.s_addr)) || in ip_tryforward()
257 IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr)) || in ip_tryforward()
H A Dsiftr.c443 pkt_node->ip_laddr[3] = ntohl(pkt_node->ip_laddr[3]); in siftr_process_pkt()
444 pkt_node->ip_faddr[3] = ntohl(pkt_node->ip_faddr[3]); in siftr_process_pkt()
447 pkt_node->ip_laddr[0] = ntohl(pkt_node->ip_laddr[0]); in siftr_process_pkt()
1385 laddr[3] = ntohl(laddr[3]); in siftr_manage_ops()
1386 faddr[3] = ntohl(faddr[3]); in siftr_manage_ops()
1389 laddr[0] = ntohl(laddr[0]); in siftr_manage_ops()
1390 laddr[1] = ntohl(laddr[1]); in siftr_manage_ops()
1391 laddr[2] = ntohl(laddr[2]); in siftr_manage_ops()
1392 faddr[0] = ntohl(faddr[0]); in siftr_manage_ops()
1393 faddr[1] = ntohl(faddr[1]); in siftr_manage_ops()
[all …]
H A Dtcp_lro.c625 (*ts_ptr != ntohl(TCPOPT_NOP<<24|TCPOPT_NOP<<16| in tcp_set_le_to_m()
632 le->tsval = ntohl(*(ts_ptr + 1)); in tcp_set_le_to_m()
640 le->next_seq = ntohl(th->th_seq) + tcp_data_len; in tcp_set_le_to_m()
782 uint32_t tsval = ntohl(*(ts_ptr + 1)); in tcp_lro_condense()
799 ntohl(th->th_seq), in tcp_lro_condense()
806 if (tcp_data_len || SEQ_GT(ntohl(th->th_ack), ntohl(le->ack_seq))) { in tcp_lro_condense()
820 ntohl(th->th_seq), in tcp_lro_condense()
838 ntohl(th->th_seq), in tcp_lro_condense()
1248 seq = ntohl(th->th_seq); in tcp_lro_rx2()
1307 if (tcp_data_len || SEQ_GT(ntohl(th->th_ack), ntohl(le->ack_seq)) || in tcp_lro_rx2()
[all …]
H A Dsctp_input.c2912 tsn = ntohl(cp->tsn); in sctp_handle_ecn_echo()
3024 cwr_tsn = ntohl(cp->tsn); in sctp_handle_ecn_cwr()
3104 tsn = ntohl(desc->tsn_ifany); in process_chunk_drop()
3656 seq = ntohl(req->request_seq); in sctp_handle_str_reset_request_in()
3722 seq = ntohl(req->request_seq); in sctp_handle_str_reset_request_tsn()
3780 seq = ntohl(req->request_seq); in sctp_handle_str_reset_request_out()
3862 seq = ntohl(str_add->request_seq); in sctp_handle_str_reset_add_strm()
3953 seq = ntohl(str_add->request_seq); in sctp_handle_str_reset_add_out_strm()
4143 seq = ntohl(resp->response_seq); in sctp_handle_stream_reset()
4144 result = ntohl(resp->result); in sctp_handle_stream_reset()
[all …]
H A Din_jail.c78 iaa = ntohl(((const struct in_addr *)ip1)->s_addr); in prison_qcmp_v4()
79 iab = ntohl(((const struct in_addr *)ip2)->s_addr); in prison_qcmp_v4()
307 ia0.s_addr = ntohl(ia->s_addr); in prison_local_ip4()
356 if (ntohl(ia->s_addr) == INADDR_LOOPBACK && in prison_remote_ip4()
H A Din_mcast.c455 find.ims_haddr = ntohl(psa->sin.sin_addr.s_addr); in imo_match_source()
705 find.ims_haddr = ntohl(naddr); in inm_record_source()
757 find.ims_haddr = ntohl(psin->sin_addr.s_addr); in imf_get_source()
799 lims->ims_haddr = ntohl(psin->sin_addr.s_addr); in imf_graft()
824 find.ims_haddr = ntohl(psin->sin_addr.s_addr); in imf_prune()
1240 ntohl(gina->s_addr), ifp, ifp->if_xname); in in_joingroup_locked()
1328 inm, ntohl(inm->inm_addr.s_addr), in in_leavegroup_locked()
1384 KASSERT(IN_LOCAL_GROUP(ntohl(ap->s_addr)), in in_addmulti()
2558 ntohl(addr.s_addr)); in inp_set_multicast_if()
2934 if (!IN_MULTICAST(ntohl(group.s_addr))) { in sysctl_ip_mcast_filters()
[all …]
H A Dip_mroute.c1066 __func__, ntohl(mfccp->mfcc_origin.s_addr), in add_mfc()
1165 ntohl(origin.s_addr), (u_long)ntohl(mcastgrp.s_addr)); in del_mfc()
1230 ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr), ifp); in X_ip_mforward()
1293 ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr)); in X_ip_mforward()
1470 (u_long)ntohl(rt->mfc_origin.s_addr), in expire_upcalls()
1471 (u_long)ntohl(rt->mfc_mcastgrp.s_addr)); in expire_upcalls()
2675 __func__, ntohl(encap_ip->ip_src.s_addr), in pim_input()
2690 ntohl(encap_ip->ip_dst.s_addr)); in pim_input()
2696 if ((ntohl(*reghdr) & PIM_NULL_REGISTER)) in pim_input()
2747 (u_long)ntohl(encap_ip->ip_src.s_addr), in pim_input()
[all …]
/f-stack/freebsd/contrib/ipfilter/netinet/
H A Dip_sync.c320 td->td_end = ntohl(td->td_end);
347 n->nat_age = ntohl(n->nat_age);
348 n->nat_flags = ntohl(n->nat_flags);
350 n->nat_use = ntohl(n->nat_use);
351 n->nat_dir = ntohl(n->nat_dir);
391 ips->is_hv = ntohl(ips->is_hv);
392 ips->is_die = ntohl(ips->is_die);
459 sh.sm_magic = ntohl(sh.sm_magic);
460 sh.sm_len = ntohl(sh.sm_len);
461 sh.sm_num = ntohl(sh.sm_num);
[all …]
H A Dip_fil.h137 #define IP6_GT(a,b) (ntohl(HI60(a)) > ntohl(HI60(b)) || \
139 (ntohl(HI61(a)) > ntohl(HI61(b)) || \
141 (ntohl(HI62(a)) > ntohl(HI62(b)) || \
143 ntohl(HI63(a)) > ntohl(HI63(b))))))))
144 #define IP6_LT(a,b) (ntohl(HI60(a)) < ntohl(HI60(b)) || \
146 (ntohl(HI61(a)) < ntohl(HI61(b)) || \
148 (ntohl(HI62(a)) < ntohl(HI62(b)) || \
150 ntohl(HI63(a)) < ntohl(HI63(b))))))))
169 if (ntohl(_d->i6[0]) < ntohl(_s->i6[0])) { \
171 if (ntohl(_d->i6[1]) < ntohl(_s->i6[1])) { \
[all …]
H A Dip_pptp_pxy.c165 ipn->in_snip = ntohl(nat->nat_nsrcaddr);
167 ipn->in_dnip = ntohl(nat->nat_ndstaddr);
299 start = ntohl(tcp->th_seq);
342 if (ntohl(hdr->pptph_cookie) != 0x1a2b3c4d) {
541 pptp->pptp_side[1 - rev].pptps_next = ntohl(tcp->th_ack);
542 pptp->pptp_side[1 - rev].pptps_nexthdr = ntohl(tcp->th_ack);
543 pptp->pptp_side[rev].pptps_next = ntohl(tcp->th_seq) + 1;
544 pptp->pptp_side[rev].pptps_nexthdr = ntohl(tcp->th_seq) + 1;
H A Dip_proxy.c1183 seq1 = (u_32_t)ntohl(tcp->th_seq);
1217 seq1 = ntohl(tcp->th_ack);
1236 seq1 = ntohl(tcp->th_seq);
1270 seq1 = ntohl(tcp->th_ack);
1297 (u_32_t)ntohl(tcp->th_seq), (u_32_t)ntohl(tcp->th_ack));
1356 ipn->in_snip = ntohl(nat->nat_odstaddr);
1357 ipn->in_dnip = ntohl(nat->nat_nsrcaddr);
1369 ipn->in_snip = ntohl(nat->nat_odstaddr);
1370 ipn->in_dnip = ntohl(nat->nat_osrcaddr);
1445 ipn->in_snip = ntohl(nat->nat_nsrcaddr);
[all …]
H A Dip_ftp_pxy.c828 a1 = ntohl(data_ip);
1309 thseq = ntohl(tcp->th_seq);
1310 thack = ntohl(tcp->th_ack);
2115 a = ntohl(a6->i6[0]);
2119 a = ntohl(a6->i6[1]);
2123 a = ntohl(a6->i6[2]);
2127 a = ntohl(a6->i6[3]);
2135 a = ntohl(a6->i6[0]);
2138 a = ntohl(a6->i6[1]);
2142 a = ntohl(a6->i6[2]);
[all …]
/f-stack/freebsd/netpfil/ipfw/nat64/
H A Dnat64_translate.h127 if (IN_MULTICAST(ntohl(ia)) || IN_LOOPBACK(ntohl(ia)) || in nat64_check_ip4()
128 IN_LINKLOCAL(ntohl(ia)) || IN_EXPERIMENTAL(ntohl(ia))) in nat64_check_ip4()
/f-stack/freebsd/net/
H A Dslcompress.c117 (f) = htonl(ntohl(f) + ((cp[1] << 8) | cp[2])); \
120 (f) = htonl(ntohl(f) + (u_int32_t)*cp++); \
294 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack); in sl_compress_tcp()
302 deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq); in sl_compress_tcp()
530 th->th_ack = htonl(ntohl(th->th_ack) + i); in sl_uncompress_tcp_core()
531 th->th_seq = htonl(ntohl(th->th_seq) + i); in sl_uncompress_tcp_core()
536 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) in sl_uncompress_tcp_core()
H A Dif_stf.c458 tos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; in stf_output()
522 (ntohl(in->s_addr) & 0xff000000) >> 24 == 10 || in isrfc1918addr()
523 (ntohl(in->s_addr) & 0xfff00000) >> 16 == 172 * 256 + 16 || in isrfc1918addr()
524 (ntohl(in->s_addr) & 0xffff0000) >> 16 == 192 * 256 + 168)) in isrfc1918addr()
540 if (IN_MULTICAST(ntohl(in->s_addr))) in stf_checkaddr4()
542 switch ((ntohl(in->s_addr) & 0xff000000) >> 24) { in stf_checkaddr4()
668 itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; in in_stf_input()
/f-stack/dpdk/examples/ipsec-secgw/
H A Dipip.h39 ds_ecn = ntohl(inip6->ip6_flow) >> 20; in ipip_outbound()
118 if ((ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK) in ip6_ecn_setup()
119 ip6->ip6_flow = htonl(ntohl(ip6->ip6_flow) | in ip6_ecn_setup()
140 set_ecn = ntohl(outip6->ip6_flow) >> 20; in ipip_inbound()
/f-stack/freebsd/sys/
H A Dimgact_aout.h52 (ntohl((ex).a_midmag) & 0xffff)
54 ((ntohl((ex).a_midmag) >> 16) & 0x03ff)
56 ((ntohl((ex).a_midmag) >> 26) & 0x3f)
/f-stack/freebsd/contrib/openzfs/include/os/linux/spl/sys/
H A Dbyteorder.h82 return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32)); in ntohll()
/f-stack/freebsd/netipsec/
H A Dxform_esp.c321 (u_long)ntohl(sav->spi))); in esp_input()
541 (u_long) ntohl(sav->spi))); in esp_input_cb()
570 if (ipsec_updatereplay(ntohl(seq), sav)) { in esp_input_cb()
593 (u_long) ntohl(sav->spi))); in esp_input_cb()
607 (u_long) ntohl(sav->spi))); in esp_input_cb()
619 (u_long) ntohl(sav->spi))); in esp_input_cb()
739 buf, sizeof(buf)), (u_long) ntohl(sav->spi))); in esp_output()
751 (u_long) ntohl(sav->spi), in esp_output()
765 (u_long) ntohl(sav->spi))); in esp_output()
776 sizeof(buf)), (u_long) ntohl(sav->spi))); in esp_output()
[all …]
H A Dxform_ah.c565 ipsec_chkreplay(ntohl(ah->ah_seq), &seqh, sav) == 0) { in ah_input()
586 (u_long) ntohl(sav->spi))); in ah_input()
596 (u_long) ntohl(sav->spi))); in ah_input()
753 (u_long) ntohl(sav->spi))); in ah_input_cb()
779 if (ipsec_updatereplay(ntohl(seq), sav)) { in ah_input_cb()
795 (u_long) ntohl(sav->spi))); in ah_input_cb()
877 (u_long) ntohl(sav->spi))); in ah_output()
886 (u_long) ntohl(sav->spi), in ah_output()
900 (u_long) ntohl(sav->spi))); in ah_output()
912 (u_long) ntohl(sav->spi))); in ah_output()
[all …]
H A Dxform_ipcomp.c354 (u_long) ntohl(sav->spi))); in ipcomp_input_cb()
441 (u_long) ntohl(sav->spi))); in ipcomp_output()
450 (u_long) ntohl(sav->spi), in ipcomp_output()
464 sizeof(buf)), (u_long) ntohl(sav->spi))); in ipcomp_output()
583 sizeof(buf)), (u_long) ntohl(sav->spi))); in ipcomp_output_cb()
604 ipcomp->comp_cpi = htons((u_int16_t) ntohl(sav->spi)); in ipcomp_output_cb()
630 sizeof(buf)), (u_long) ntohl(sav->spi))); in ipcomp_output_cb()
/f-stack/freebsd/contrib/openzfs/include/os/freebsd/spl/sys/
H A Dbyteorder.h98 return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32)); in ntohll()
/f-stack/freebsd/netgraph/
H A Dng_cisco.c495 switch (ntohl(p->type)) { in cisco_input()
499 (long)ntohl(p->type)); in cisco_input()
505 sc->remote_seq = ntohl(p->par1); in cisco_input()
506 if (sc->local_seq == ntohl(p->par2)) { in cisco_input()
535 ntohl(sc->localip.s_addr), in cisco_input()
536 ntohl(sc->localmask.s_addr)); in cisco_input()

1234567