| /f-stack/freebsd/netgraph/netflow/ |
| H A D | netflow_v9.c | 143 *p++ = htons(flowset_size); /* Total FlowSet length */ in generate_v9_templates() 151 *p++ = htons(_netflow_v9_record_ipv4_tcp[cnt].field_id); in generate_v9_templates() 154 *template_fields_cnt = htons(cnt); in generate_v9_templates() 165 *template_fields_cnt = htons(cnt); in generate_v9_templates() 192 *flowset_length = htons(len); in close_flowset() 226 header->count = htons(t->count); in export9_send() 274 rec->i_ifx = htons(fed->fle_i_ifx); in export9_add() 275 rec->o_ifx = htons(fed->fle_o_ifx); in export9_add() 305 rec->i_ifx = htons(fed6->fle_i_ifx); in export9_add() 306 rec->o_ifx = htons(fed6->fle_o_ifx); in export9_add() [all …]
|
| /f-stack/freebsd/net/ |
| H A D | if_infiniband.c | 185 etype = htons(ETHERTYPE_IP); in infiniband_requestencap() 188 etype = htons(ETHERTYPE_IPV6); in infiniband_requestencap() 192 ah->ar_hrd = htons(ARPHRD_INFINIBAND); in infiniband_requestencap() 197 etype = htons(ETHERTYPE_REVARP); in infiniband_requestencap() 202 etype = htons(ETHERTYPE_ARP); in infiniband_requestencap() 248 ih->ib_protocol = htons(ETHERTYPE_IP); in infiniband_resolve_addr() 261 ih->ib_protocol = htons(ETHERTYPE_IPV6); in infiniband_resolve_addr() 464 case htons(ETHERTYPE_IP): in infiniband_input() 468 case htons(ETHERTYPE_ARP): in infiniband_input() 478 case htons(ETHERTYPE_IPV6): in infiniband_input()
|
| H A D | debugnet_inet.c | 249 ah->ar_hrd = htons(ARPHRD_ETHER); in debugnet_send_arp() 250 ah->ar_pro = htons(ETHERTYPE_IP); in debugnet_send_arp() 253 ah->ar_op = htons(ARPOP_REQUEST); in debugnet_send_arp() 375 ah->ar_op = htons(ARPOP_REPLY); in debugnet_handle_arp() 376 ah->ar_pro = htons(ETHERTYPE_IP); in debugnet_handle_arp() 485 ip->ip_len = htons(m->m_pkthdr.len); in debugnet_ip_output() 487 ip->ip_off = htons(IP_DF); in debugnet_ip_output()
|
| H A D | slcompress.c | 126 (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \ 129 (f) = htons(ntohs(f) + (u_int32_t)*cp++); \ 135 (f) = htons((cp[1] << 8) | cp[2]); \ 138 (f) = htons((u_int32_t)*cp++); \ 172 if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40) in sl_compress_tcp() 519 th->th_sum = htons((*cp << 8) | cp[1]); in sl_uncompress_tcp_core() 557 cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1); in sl_uncompress_tcp_core() 572 cs->cs_ip.ip_len = htons(total_len); in sl_uncompress_tcp_core()
|
| H A D | if_spppfr.c | 343 *(short*) (h+8) = htons(type); in sppp_fr_header() 496 *(short*) (h+8) = htons (ETHERTYPE_ARP); in sppp_fr_arp() 498 reply->htype = htons (ARPHRD_FRELAY); in sppp_fr_arp() 499 reply->ptype = htons (ETHERTYPE_IP); in sppp_fr_arp() 502 reply->op = htons (ARPOP_INVREPLY); in sppp_fr_arp() 503 reply->hsource = htons (my_hardware_address); in sppp_fr_arp() 506 reply->htarget = htons (his_hardware_address); in sppp_fr_arp()
|
| H A D | if_gre.c | 469 udp->uh_dport = htons(GRE_UDPPORT); in gre_update_udphdr() 470 udp->uh_sport = htons(sc->gre_port); in gre_update_udphdr() 501 gh->gre_flags = htons(flags); in gre_update_hdr() 736 proto = htons(ETHERTYPE_IP); 741 proto = htons(ETHERTYPE_IPV6); 768 uh->uh_sport |= htons(V_ipport_hifirstauto) | 770 uh->uh_sport = htons(ntohs(uh->uh_sport) % 772 uh->uh_ulen = htons(m->m_pkthdr.len - len); 774 htons(m->m_pkthdr.len - len + IPPROTO_UDP));
|
| /f-stack/dpdk/examples/bpf/ |
| H A D | t1.c | 41 if (ether_header->ether_type != htons(0x0800)) in entry() 52 if (udphdr->dest != htons(5000)) in entry()
|
| /f-stack/freebsd/mips/include/ |
| H A D | in_cksum.h | 59 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); in in_cksum_update() 68 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
| /f-stack/freebsd/amd64/include/ |
| H A D | in_cksum.h | 62 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); in in_cksum_update() 71 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
| /f-stack/freebsd/netinet/libalias/ |
| H A D | alias_smedia.c | 311 sport = htons(p[0]); in alias_rtsp_out() 312 eport = htons(p[1]); in alias_rtsp_out() 341 htons(base_port + j), htons(base_alias + j), in alias_rtsp_out() 361 ealias = htons(base_alias + (RTSP_PORT_GROUP - 1)); in alias_rtsp_out() 411 new_len = htons(hlen + new_dlen); in alias_rtsp_out()
|
| H A D | alias_util.c | 141 sum += htons((u_short) ntcp); in TcpChecksum() 142 sum += htons((u_short) pip->ip_p); in TcpChecksum()
|
| /f-stack/freebsd/netinet/ |
| H A D | ip_reass.c | 219 ip->ip_len = htons(ntohs(ip->ip_len) - hlen); in ip_reass() 225 if (ip->ip_len == htons(0) || in ip_reass() 226 ((ip->ip_off & htons(IP_MF)) && (ntohs(ip->ip_len) & 0x7) != 0)) { in ip_reass() 232 if (ip->ip_off & htons(IP_MF)) in ip_reass() 236 ip->ip_off = htons(ntohs(ip->ip_off) << 3); in ip_reass() 388 ip->ip_off = htons(ntohs(ip->ip_off) + i); in ip_reass() 389 ip->ip_len = htons(ntohs(ip->ip_len) - i); in ip_reass() 407 GETIP(q)->ip_len = htons(ntohs(GETIP(q)->ip_len) - i); in ip_reass() 408 GETIP(q)->ip_off = htons(ntohs(GETIP(q)->ip_off) + i); in ip_reass() 494 ip->ip_len = htons((ip->ip_hl << 2) + next); in ip_reass()
|
| H A D | sctp_output.c | 1992 paramh->param_length = htons(plen); in sctp_add_addr_to_mbuf() 2007 paramh->param_length = htons(plen); in sctp_add_addr_to_mbuf() 4074 ip->ip_off = htons(IP_DF); in sctp_lowlevel_chunk_output() 4076 ip->ip_off = htons(0); in sctp_lowlevel_chunk_output() 5228 param->param_type = htons(ptype); in sctp_arethere_unrecognized_parameters() 7576 dchkh->dp.sid = htons(strq->sid); in sctp_move_to_outqueue() 7585 ndchkh->dp.reserved = htons(0); in sctp_move_to_outqueue() 11087 ip->ip_off = htons(IP_DF); in sctp_send_resp_msg() 11183 ip->ip_len = htons(len); in sctp_send_resp_msg() 11525 drp->trunc_len = htons(fullsz); in sctp_send_packet_dropped() [all …]
|
| H A D | ip_id.c | 252 if (V_ip_rfc6864 && (ip->ip_off & htons(IP_DF)) == htons(IP_DF)) in ip_fillid() 272 ip->ip_id = htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff); in ip_fillid()
|
| /f-stack/freebsd/contrib/ipfilter/netinet/ |
| H A D | ip_raudio_pxy.c | 289 tcp2->th_win = htons(8192); 291 ip->ip_len = htons(fin->fin_hlen + sizeof(*tcp)); 297 tcp2->th_sport = htons(sp); 298 tcp2->th_dport = htons(dp); 320 tcp2->th_sport = htons(sp);
|
| H A D | ip_fil_freebsd.c | 420 ip6->ip6_plen = htons(sizeof(struct tcphdr)); 431 ip->ip_len = htons(sizeof(struct tcphdr)); 435 ip->ip_len = htons(hlen + sizeof(*tcp2)); 638 icmp->icmp_nextmtu = htons(fin->fin_mtu); 641 icmp->icmp_nextmtu = htons(GETIFMTU_4(ifp)); 655 ip6->ip6_plen = htons(iclen - hlen); 677 ip->ip_len = htons(iclen); 888 mhip->ip_len = htons((u_short)(len + mhlen)); 897 mhip->ip_off = htons((u_short)mhip->ip_off); 907 ip->ip_len = htons((u_short)(hlen + firstlen)); [all …]
|
| /f-stack/freebsd/netipsec/ |
| H A D | ipsec_output.c | 230 ip->ip_len = htons(m->m_pkthdr.len); in ipsec4_perform_request() 416 ia2.s6_addr16[1] = htons(sa->sin6_scope_id); in in6_sa_equal_addrwithscope() 533 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); in ipsec6_perform_request() 727 mtod(m, struct ip *)->ip_len = htons(m->m_pkthdr.len); in ipsec_process_done() 743 htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); in ipsec_process_done() 916 setdf = (ip->ip_off & htons(IP_DF)) != 0; in ipsec_encap() 949 ip->ip_len = htons((*mp)->m_pkthdr.len); in ipsec_encap() 952 ip->ip_off = setdf ? htons(IP_DF): 0; in ipsec_encap() 977 htons(saidx->dst.sin6.sin6_scope_id & 0xffff); in ipsec_encap() 981 htons(saidx->src.sin6.sin6_scope_id & 0xffff); in ipsec_encap() [all …]
|
| H A D | udpencap.c | 237 udp->uh_ulen = htons(m->m_pkthdr.len - hlen); in udp_ipsec_output() 240 ip->ip_len = htons(m->m_pkthdr.len); in udp_ipsec_output() 285 htons(m->m_pkthdr.len - skip + proto)); in udp_ipsec_adjust_cksum()
|
| /f-stack/freebsd/netgraph/ |
| H A D | ng_cisco.c | 370 h->protocol = htons(ETHERTYPE_IP); in cisco_rcvdata() 373 h->protocol = htons(ETHERTYPE_IPV6); in cisco_rcvdata() 376 h->protocol = htons(ETHERTYPE_AT); in cisco_rcvdata() 379 h->protocol = htons(ETHERTYPE_IPX); in cisco_rcvdata() 616 h->protocol = htons(CISCO_KEEPALIVE); in cisco_send() 623 ch->time0 = htons((uint16_t) (t >> 16)); in cisco_send() 624 ch->time1 = htons((uint16_t) t); in cisco_send()
|
| H A D | ng_pppoe.c | 421 wh->ph.length = htons(length); in make_packet() 951 neg->host_uniq.hdr.tag_len = htons(sizeof(sp)); in ng_pppoe_rcvmsg() 1000 htons((uint16_t)ourmsg->data_len); in ng_pppoe_rcvmsg() 1022 htons((uint16_t)ourmsg->data_len); in ng_pppoe_rcvmsg() 1047 htons((uint16_t)ourmsg->data_len); in ng_pppoe_rcvmsg() 1168 tag->tag_len = htons(ourmsg->data_len); in ng_pppoe_rcvmsg() 1213 tag->tag_len = htons(ourmsg->data_len); in ng_pppoe_rcvmsg() 1716 if (neg->ac_name_len != htons(tag->tag_len) || in ng_pppoe_rcvdata_ether() 1795 htons(pppoe_getnewsession(sp)); in ng_pppoe_rcvdata_ether() 2065 tag->tag_len = htons((u_int16_t)msglen); in ng_pppoe_disconnect() [all …]
|
| /f-stack/freebsd/i386/include/ |
| H A D | in_cksum.h | 92 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); in in_cksum_update() 133 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
| /f-stack/dpdk/drivers/net/tap/ |
| H A D | tap_bpf_program.c | 143 if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) { in rss_l3_l4() 152 if (proto == htons(ETH_P_IP)) { in rss_l3_l4() 177 } else if (proto == htons(ETH_P_IPV6)) { in rss_l3_l4()
|
| /f-stack/freebsd/contrib/openzfs/lib/libspl/include/os/linux/sys/ |
| H A D | byteorder.h | 64 #define htons(x) (x) macro 80 extern uint16_t htons(uint16_t); 85 extern in_port_t htons(in_port_t);
|
| /f-stack/freebsd/netpfil/ipfw/ |
| H A D | ip_fw2.c | 572 ip->ip_len = htons(tlen); in ipfw_send_abort() 573 ip->ip_id = htons(0); in ipfw_send_abort() 574 ip->ip_off = htons(0); in ipfw_send_abort() 588 ip6->ip6_plen = htons(plen); in ipfw_send_abort() 748 h->ip_off = htons(0); in ipfw_send_pkt() 749 h->ip_len = htons(len); in ipfw_send_pkt() 1181 src_ip, htons(id->src_port), in check_uidgid() 1182 dst_ip, htons(id->dst_port), in check_uidgid() 1186 dst_ip, htons(id->dst_port), in check_uidgid() 2647 src_ip, htons(src_port), in ipfw_chk() [all …]
|
| /f-stack/freebsd/netpfil/ipfw/nat64/ |
| H A D | nat64_translate.c | 518 ip->ip_len = htons(sizeof(*ip) + plen); in nat64_init_ip4hdr() 528 ip->ip_off |= htons(IP_MF); in nat64_init_ip4hdr() 530 ip->ip_off = htons(IP_DF); in nat64_init_ip4hdr() 640 htons(nh->nh_ifp->if_index & 0xffff); in nat64_find_route6() 753 oip6->ip6_plen = htons(plen); in nat64_icmp6_reflect() 850 oip->ip_len = htons(n->m_pkthdr.len); in nat64_icmp_reflect() 854 oip->ip_off = htons(IP_DF); in nat64_icmp_reflect() 865 icmp->icmp_nextmtu = htons(mtu); in nat64_icmp_reflect() 1103 ip6->ip6_plen = htons(plen); in nat64_icmp_translate() 1283 (ip->ip_off & htons(IP_DF)) != 0) { in nat64_do_handle_ip4() [all …]
|