Searched refs:sum (Results 1 - 25 of 332) sorted by last modified time

1234567891011>>

/freebsd-11-stable/contrib/libarchive/libarchive/
H A Darchive_read_support_format_tar.c891 int check, sum; local
909 sum = (int)tar_atol(header->checksum, sizeof(header->checksum));
917 if (sum == check)
932 if (sum == check)
H A Darchive_read_support_format_cab.c191 uint32_t sum; member in struct:cfdata
201 /* To keep memory image of this CFDATA to compute the sum. */
204 /* Result of calculation of sum. */
1066 uint32_t sum; local
1069 sum = seed;
1072 sum ^= archive_le32dec(b);
1075 return (sum);
1082 uint32_t sum; local
1085 sum = cab_checksum_cfdata_4(p, bytes, seed);
1102 sum
[all...]
H A Darchive_read_support_format_7zip.c2173 uint64_t sum; local
2178 sum = 0;
2183 sum += *usizes++;
2186 *usizes++ = folder_uncompressed_size(&f[i]) - sum;
H A Darchive_write_set_format_xar.c946 const char *key, struct chksumval *sum)
955 if (sum->len > 0) {
956 algname = getalgname(sum->alg);
957 algsize = getalgsize(sum->alg);
961 s = sum->val;
1734 * Compress the TOC and calculate the sum of the TOC.
945 xmlwrite_sum(struct archive_write *a, xmlTextWriterPtr writer, const char *key, struct chksumval *sum) argument
H A Darchive_write_set_format_iso9660.c7250 uint16_t sum, *wp; local
7274 sum = 0;
7277 sum += archive_le16dec(wp++);
7278 set_num_721(&block[28], (~sum) + 1);
7317 uint32_t sum; local
7329 sum = 0;
7347 sum += archive_le32dec(buff + i);
7359 /* Set the sum of the boot file. */
7360 set_num_731(buff+12, sum);
H A Darchive_ppmd7.c1050 UInt32 sum; local
1060 sum = s->Freq;
1066 RangeEnc_Encode(rc, sum, s->Freq, p->MinContext->SummFreq);
1071 sum += s->Freq;
1080 RangeEnc_Encode(rc, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq);
1109 UInt32 sum; local
1122 sum = 0;
1129 UInt32 low = sum;
1133 sum
[all...]
/freebsd-11-stable/usr.sbin/cpucontrol/
H A Dintel.c85 uint32_t sum; local
205 sum = 0;
207 sum += *((uint32_t *)fw_image + i);
208 if (sum != 0) {
237 sum = 0;
239 sum += *((uint32_t *)ext_header + i);
240 if (sum != 0) {
/freebsd-11-stable/sys/netinet/
H A Dip_input.c455 uint16_t sum, ip_len; local
513 sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID);
516 sum = in_cksum_hdr(ip);
518 sum = in_cksum(m, hlen);
521 if (sum) {
/freebsd-11-stable/contrib/unbound/smallapp/
H A Dunbound-control.c184 /** divide sum of timers to get average */
186 timeval_divide(struct timeval* avg, const struct timeval* sum, long long d) argument
195 avg->tv_sec = sum->tv_sec / d;
196 avg->tv_usec = sum->tv_usec / d;
198 leftover = sum->tv_sec - avg->tv_sec*d;
/freebsd-11-stable/contrib/unbound/services/
H A Dmesh.c96 /** divide sum of timers to get average */
98 timeval_divide(struct timeval* avg, const struct timeval* sum, size_t d) argument
107 avg->tv_sec = sum->tv_sec / d;
108 avg->tv_usec = sum->tv_usec / d;
110 leftover = sum->tv_sec - avg->tv_sec*d;
/freebsd-11-stable/contrib/unbound/daemon/
H A Dremote.c127 /** divide sum of timers to get average */
129 timeval_divide(struct timeval* avg, const struct timeval* sum, long long d) argument
138 avg->tv_sec = sum->tv_sec / d;
139 avg->tv_usec = sum->tv_usec / d;
141 leftover = sum->tv_sec - avg->tv_sec*d;
/freebsd-11-stable/contrib/unbound/contrib/
H A Dparseunbound.pl127 my $sum = 0;
130 $sum += ($allstats{$thread}->{$key} || 0);
132 print STDERR "$key = " . $sum . "\n" if $DEBUG;
133 push @result, $sum;
/freebsd-11-stable/sys/contrib/ipfilter/netinet/
H A Dip_proxy.c1032 u_short sum = ntohs(tcp->th_sum); local
1033 sum += adjlen;
1034 tcp->th_sum = htons(sum);
1041 u_short sum = ntohs(udp->uh_sum); local
1042 sum += adjlen;
1043 udp->uh_sum = htons(sum);
H A Dip_fil_freebsd.c1044 u_short sum; local
1089 sum = m->m_pkthdr.csum_data;
1091 sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
1094 sum ^= 0xffff;
1095 if (sum != 0) {
1098 DT2(ipf_fi_bad_checkv4sum_sum, fr_info_t *, fin, u_int, sum);
1410 ipf_pcksum(fin, hlen, sum)
1413 u_int sum;
1428 * Both sum and sum2 are partial sums, so combine them together.
1430 sum
1446 int sum; local
[all...]
H A Dfil.c3358 u_32_t sum = 0; local
3360 for (sum = 0; len > 1; len -= 2)
3361 sum += *addr++;
3365 sum += *(u_char *)addr;
3370 sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */
3371 sum += (sum >> 16); /* add carry */
3372 return (u_short)(~sum);
3401 u_int sum, sum2; local
6110 u_32_t sumd, sum; local
6674 u_short sum, hdrsum, *csump; local
[all...]
/freebsd-11-stable/contrib/subversion/subversion/libsvn_repos/
H A Dauthz.c753 limited_rights_t *sum,
761 limited_rights_t *sum,
770 finalize_tree(apr_hash_this_val(hi), sum, scratch_pool);
780 limited_rights_t *sum,
787 finalize_tree(APR_ARRAY_IDX(array, i, sorted_pattern_t).node, sum,
833 limited_rights_t *sum,
876 combine_right_limits(sum, local_sum);
756 finalize_subnode_hash(apr_hash_t *hash, limited_rights_t *sum, apr_pool_t *scratch_pool) argument
766 finalize_tree(apr_hash_this_val(hi), sum, scratch_pool); local
775 finalize_subnode_array(apr_array_header_t *array, limited_rights_t *sum, apr_pool_t *scratch_pool) argument
828 finalize_tree(node_t *node, limited_rights_t *sum, apr_pool_t *scratch_pool) argument
/freebsd-11-stable/contrib/ipfilter/iplang/
H A Diplang_y.y1735 u_long sum;
1744 sum = p_chksum((u_short *)&iptmp, (u_int)sizeof(iptmp));
1746 udp->uh_sum = c_chksum((u_short *)udp, (u_int)ntohs(iptmp.ip_len), sum);
1756 u_long sum;
1765 sum = p_chksum((u_short *)&iptmp, (u_int)sizeof(iptmp));
1767 tcp->th_sum = c_chksum((u_short *)tcp, (u_int)ntohs(iptmp.ip_len), sum);
1798 u_long sum = init;
1802 sum += *buf++;
1803 sum = (sum>>1
[all...]
/freebsd-11-stable/contrib/ipfilter/
H A Dip_fil.c771 ipf_pcksum(fin, hlen, sum)
774 u_int sum;
784 sum += *sp++;
786 sum += ntohs(*(u_char *)sp << 8);
787 while (sum > 0xffff)
788 sum = (sum & 0xffff) + (sum >> 16);
789 sum2 = (u_short)(~sum & 0xffff);
/freebsd-11-stable/sys/dev/mlx5/mlx5_core/
H A Dmlx5_cmd.c186 u8 sum = 0; local
190 sum ^= ptr[i];
192 return sum;
826 stats->sum += ds;
1018 stats->sum += ds;
/freebsd-11-stable/sys/dev/mlx5/
H A Ddriver.h315 u64 sum; member in struct:mlx5_cmd_stats
/freebsd-11-stable/sys/netinet6/
H A Dicmp6.c408 int code, sum, noff; local
460 if ((sum = in6_cksum(m, IPPROTO_ICMPV6, off, icmp6len)) != 0) {
463 icmp6->icmp6_type, sum,
/freebsd-11-stable/sbin/fsck_msdosfs/
H A Ddir.c197 u_char sum = 0; local
201 sum = (sum << 7)|(sum >> 1); /* rotate right */
202 sum += p[i];
205 return sum;
/freebsd-11-stable/sys/netpfil/ipfw/nat64/
H A Dnat64_translate.c452 * = HC - sum(~m[i] + m'[i])
461 uint32_t sum; local
464 sum = ~ip->ip_src.s_addr >> 16;
465 sum += ~ip->ip_src.s_addr & 0xffff;
466 sum += ~ip->ip_dst.s_addr >> 16;
467 sum += ~ip->ip_dst.s_addr & 0xffff;
471 sum += *p;
473 while (sum >> 16)
474 sum = (sum
[all...]
/freebsd-11-stable/contrib/sendmail/libsm/
H A Dvfscanf.c367 size_t sum = 0; local
372 sum += n;
378 if (sum == 0)
385 sum += width;
391 nread += sum;
/freebsd-11-stable/contrib/sendmail/contrib/
H A Dexpn.pl890 local($e,$sum);
892 $sum += $e;
894 $sum / @e;

Completed in 309 milliseconds

1234567891011>>