Home
last modified time | relevance | path

Searched full:csum (Results 1 – 25 of 157) sorted by relevance

1234567

/freebsd/sys/netinet/
H A Dtcp_lro.c85 uint32_t csum, bool use_hash);
525 uint32_t csum; in tcp_lro_rx_csum_tcphdr() local
528 csum = -th->th_sum; /* exclude checksum field */ in tcp_lro_rx_csum_tcphdr()
532 csum += *ptr; in tcp_lro_rx_csum_tcphdr()
534 csum += *ptr; in tcp_lro_rx_csum_tcphdr()
537 while (csum > 0xffff) in tcp_lro_rx_csum_tcphdr()
538 csum = (csum >> 16) + (csum & 0xffff); in tcp_lro_rx_csum_tcphdr()
540 return (csum); in tcp_lro_rx_csum_tcphdr()
646 uint16_t csum; in tcp_lro_rx_ipv4() local
655 csum = in_cksum_hdr(ip4); in tcp_lro_rx_ipv4()
[all …]
H A Din_cksum.c204 uint64_t csum; member
215 a->csum += in_cksumdata(data, len) << 8; in in_cksum_skip_partial()
217 a->csum += in_cksumdata(data, len); in in_cksum_skip_partial()
236 a.csum = 0; in in_cksum_skip()
239 sum = a.csum; in in_cksum_skip()
/freebsd/sys/fs/ext2fs/
H A Dext2_csum.c60 SDT_PROBE_DEFINE2(ext2fs, , trace, csum, "int", "char*");
94 "WARNING: mount of %s denied due bad sb csum type\n", fs->e2fs_fsmnt); in ext2_sb_csum_verify()
101 "WARNING: mount of %s denied due bad sb csum=0x%x, expected=0x%x - run fsck\n", in ext2_sb_csum_verify()
152 SDT_PROBE2(ext2fs, , trace, csum, 1, "bad extattr csum detected"); in ext2_extattr_blk_csum_verify()
368 SDT_PROBE2(ext2fs, , trace, csum, 1, "bad directory csum detected"); in ext2_dir_blk_csum_verify()
461 SDT_PROBE2(ext2fs, , trace, csum, 1, "bad extent csum detected"); in ext2_extent_blk_csum_verify()
507 SDT_PROBE2(ext2fs, , trace, csum, 1, "bad inode bitmap csum detected"); in ext2_gd_i_bitmap_csum_verify()
517 uint32_t csum; in ext2_gd_i_bitmap_csum_set() local
522 csum = calculate_crc32c(fs->e2fs_csum_seed, bp->b_data, in ext2_gd_i_bitmap_csum_set()
524 fs->e2fs_gd[cg].ext4bgd_i_bmap_csum = htole16(csum & 0xFFFF); in ext2_gd_i_bitmap_csum_set()
[all …]
/freebsd/crypto/openssh/
H A Dxmss_wots.c122 int csum = 0; in wots_sign() local
131 csum += params->w - 1 - basew[i]; in wots_sign()
134 csum = csum << (8 - ((params->len_2 * params->log_w) % 8)); in wots_sign()
139 to_byte(csum_bytes, csum, len_2_bytes); in wots_sign()
160 int csum = 0; in wots_pkFromSig() local
169 csum += params->w - 1 - basew[i]; in wots_pkFromSig()
172 csum = csum << (8 - ((params->len_2 * params->log_w) % 8)); in wots_pkFromSig()
177 to_byte(csum_bytes, csum, len_2_bytes); in wots_pkFromSig()
/freebsd/contrib/ntp/libparse/
H A Ddata_mbg.c90 ascii_msgp->csum = (CSUM) get_lsb_short(bufpp); in get_mbg_ascii_msg()
300 cfghp->csum = (CSUM) get_lsb_short(buffpp); in get_mbg_cfgh()
323 utcp->csum = (CSUM) get_lsb_short(buffpp); in get_mbg_utc()
429 ephp->csum = (CSUM) get_lsb_short(buffpp); in get_mbg_eph()
474 almp->csum = (CSUM) get_lsb_short(buffpp); in get_mbg_alm()
499 ionop->csum = (CSUM) get_lsb_short(buffpp); in get_mbg_iono()
H A Dclk_meinberg.c145 /* Name: csum() */
157 CSUM
169 return (CSUM) sum; in mbg_csum()
171 } /* csum */ in mbg_csum()
181 headerp->data_csum = (CSUM) get_lsb_short(bufpp); in get_mbg_header()
182 headerp->hdr_csum = (CSUM) get_lsb_short(bufpp); in get_mbg_header()
599 CSUM calc_csum; /* used to compare the incoming csums */ in gps_input()
/freebsd/sys/netpfil/ipfw/pmod/
H A Dtcpmod.c65 uint16_t oldmss, csum; in tcpmod_setmss() local
104 bcopy(&tcp->th_sum, &csum, sizeof(csum)); in tcpmod_setmss()
105 csum = cksum_adjust(csum, oldmss, mss); in tcpmod_setmss()
106 bcopy(&csum, &tcp->th_sum, sizeof(csum)); in tcpmod_setmss()
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64_translate.c1233 uint16_t *csum; in nat64_do_handle_ip4() local
1300 csum = &TCP(mtodo(m, hlen))->th_sum; in nat64_do_handle_ip4()
1303 *csum = cksum_adjust(*csum, tcp->th_dport, lport); in nat64_do_handle_ip4()
1306 *csum = cksum_add(*csum, ~nat64_cksum_convert(&ip6, ip)); in nat64_do_handle_ip4()
1309 csum = &UDP(mtodo(m, hlen))->uh_sum; in nat64_do_handle_ip4()
1312 *csum = cksum_adjust(*csum, udp->uh_dport, lport); in nat64_do_handle_ip4()
1315 *csum = cksum_add(*csum, ~nat64_cksum_convert(&ip6, ip)); in nat64_do_handle_ip4()
1567 uint16_t *csum; in nat64_do_handle_ip6() local
1677 csum = &TCP(mtodo(m, hlen))->th_sum; in nat64_do_handle_ip6()
1680 *csum = cksum_adjust(*csum, tcp->th_sport, aport); in nat64_do_handle_ip6()
[all …]
/freebsd/contrib/ntp/include/
H A Dmbg_gps166.h241 typedef uint16_t CSUM; /* checksum used by some structures stored in non-volatile memory */ typedef
253 CSUM data_csum; ///< checksum of the data portion appended after the header
254 CSUM hdr_csum; ///< checksum of the preceding header bytes
777 CSUM csum; ///< checksum of the remaining bytes member
796 * The csum field is only used by the card's firmware to check the
831 CSUM csum; ///< Checksum of the remaining bytes member
851 CSUM csum; ///< checksum of the remaining bytes */ member
867 CSUM csum; ///< checksum of the remaining bytes member
917 CSUM csum; ///< checksum of the remaining bytes member
943 CSUM csum; ///< checksum of the remaining bytes member
[all …]
/freebsd/crypto/heimdal/lib/gssapi/krb5/
H A Dverify_mic.c162 Checksum csum; in verify_mic_des3() local
257 csum.cksumtype = CKSUMTYPE_HMAC_SHA1_DES3; in verify_mic_des3()
258 csum.checksum.length = 20; in verify_mic_des3()
259 csum.checksum.data = p + 8; in verify_mic_des3()
272 &csum); in verify_mic_des3()
H A Dunwrap.c235 Checksum csum; in unwrap_des3() local
379 csum.cksumtype = CKSUMTYPE_HMAC_SHA1_DES3; in unwrap_des3()
380 csum.checksum.length = 20; in unwrap_des3()
381 csum.checksum.data = cksum; in unwrap_des3()
393 &csum); in unwrap_des3()
/freebsd/sys/dev/netmap/
H A Dnetmap_offloadings.c93 nm_prdis("IP csum %x", be16toh(iph->check)); in gso_fix_segment()
131 nm_prdis("TCP/UDP csum %x", be16toh(*check)); in gso_fix_segment()
418 rawsum_t csum = 0; in bdg_mismatch_datapath() local
435 csum = nm_os_csum_raw(src + vh->csum_start, in bdg_mismatch_datapath()
438 csum = nm_os_csum_raw(src, src_len, csum); in bdg_mismatch_datapath()
468 *check = nm_os_csum_fold(csum); in bdg_mismatch_datapath()
/freebsd/sys/dev/mxge/
H A Dif_mxge.c1824 * If packet has full TCP csum, replace it with pseudo hdr in mxge_encap_tso()
1987 * vlan interface respect our csum offload flags.
2398 uint32_t csum; in mxge_csum_generic() local
2400 csum = 0; in mxge_csum_generic()
2402 csum += *raw; in mxge_csum_generic()
2406 csum = (csum >> 16) + (csum & 0xffff); in mxge_csum_generic()
2407 csum = (csum >> 16) + (csum & 0xffff); in mxge_csum_generic()
2408 return (uint16_t)csum; in mxge_csum_generic()
2412 mxge_rx_csum6(void *p, struct mbuf *m, uint32_t csum) in mxge_rx_csum6() argument
2438 csum += ~partial; in mxge_rx_csum6()
[all …]
/freebsd/sys/dev/gve/
H A Dgve_desc.h50 uint8_t l4_csum_offset; /* relative offset of L4 csum word */
82 #define GVE_TXF_L4CSUM BIT(0) /* Need csum offload */
115 uint16_t csum; /* 1's-complement partial checksum of L3+ bytes */ member
/freebsd/sys/contrib/device-tree/Bindings/net/
H A Dmarvell-armada-370-neta.txt18 - tx-csum-limit: maximum mtu supported by port that allow TX checksum.
44 tx-csum-limit = <9800>
/freebsd/sys/dev/enic/
H A Dvnic_enet.h38 #define VENETF_RXCSUM 0x4 /* RX csum enabled */
39 #define VENETF_TXCSUM 0x8 /* TX csum enabled */
/freebsd/usr.sbin/makefs/ffs/
H A Dffs_bswap.c59 void ffs_csum_swap(struct csum *o, struct csum *n, int size);
170 ffs_csum_swap(struct csum *o, struct csum *n, int size) in ffs_csum_swap()
H A Dffs_extern.h65 void ffs_csum_swap(struct csum *, struct csum *, int);
/freebsd/sys/gdb/
H A Dgdb_packet.c259 unsigned char csum; in gdb_tx_sendpacket() local
266 csum = 0; in gdb_tx_sendpacket()
268 csum += (unsigned char)gdb_txbuf[i]; in gdb_tx_sendpacket()
269 snprintf(&gdb_tx_fullbuf[1 + msglen], 4, "#%02x", (unsigned)csum); in gdb_tx_sendpacket()
/freebsd/tools/tools/find-sb/
H A Dmini_ufs.h32 struct csum { struct
106 struct csum fs_old_cstotal; /* cylinder summary information */
120 struct csum *fs_csp; /* (u) cg summary info buffer */
/freebsd/sys/dev/ixgbe/
H A Dixgbe_phy.c119 u8 csum; in ixgbe_read_i2c_combined_generic_int() local
122 csum = ixgbe_ones_comp_byte_add(reg_high, reg & 0xFF); in ixgbe_read_i2c_combined_generic_int()
123 csum = ~csum; in ixgbe_read_i2c_combined_generic_int()
137 /* Write csum */ in ixgbe_read_i2c_combined_generic_int()
138 if (ixgbe_out_i2c_byte_ack(hw, csum)) in ixgbe_read_i2c_combined_generic_int()
151 /* Get csum */ in ixgbe_read_i2c_combined_generic_int()
193 u8 csum; in ixgbe_write_i2c_combined_generic_int() local
196 csum = ixgbe_ones_comp_byte_add(reg_high, reg & 0xFF); in ixgbe_write_i2c_combined_generic_int()
197 csum = ixgbe_ones_comp_byte_add(csum, val >> 8); in ixgbe_write_i2c_combined_generic_int()
198 csum = ixgbe_ones_comp_byte_add(csum, val & 0xFF); in ixgbe_write_i2c_combined_generic_int()
[all …]
/freebsd/sys/netinet6/
H A Din6_cksum.c91 _in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) in _in6_cksum_pseudo() argument
104 sum = csum; in _in6_cksum_pseudo()
137 in6_cksum_pseudo(struct ip6_hdr *ip6, uint32_t len, uint8_t nxt, uint16_t csum) in in6_cksum_pseudo() argument
142 sum = _in6_cksum_pseudo(ip6, len, nxt, csum); in in6_cksum_pseudo()
/freebsd/sys/dev/neta/
H A Dif_mvneta_fdt.c131 if (ofw_bus_has_prop(dev, "tx-csum-limit")) { in mvneta_fdt_attach()
132 err = OF_getencprop(ofw_bus_get_node(dev), "tx-csum-limit", in mvneta_fdt_attach()
136 "Failed to acquire tx-csum-limit property\n"); in mvneta_fdt_attach()
/freebsd/sys/dev/virtio/network/
H A Dvirtio_net.h35 #define VIRTIO_NET_F_CSUM 0x000001 /* Host handles pkts w/ partial csum */
36 #define VIRTIO_NET_F_GUEST_CSUM 0x000002 /* Guest handles pkts w/ partial csum*/
90 * specify GSO or CSUM features, you can simply ignore the header.
97 #define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */
116 * specify GSO or CSUM features, you can simply ignore the header.
/freebsd/sys/dev/dpaa2/
H A Ddpaa2_ni.h92 #define DPAA2_NI_FAS_L3CV 0x00000008 /* L3 csum validation performed */
93 #define DPAA2_NI_FAS_L3CE 0x00000004 /* L3 csum error */
94 #define DPAA2_NI_FAS_L4CV 0x00000002 /* L4 csum validation performed */
95 #define DPAA2_NI_FAS_L4CE 0x00000001 /* L4 csum error */

1234567