Searched defs:bits (Results 1 - 21 of 21) sorted by relevance

/dovecot/src/lib/
H A Dnumpack.c22 unsigned int bits = 0; local
24 while (bits < 64) {
28 value |= (uint64_t)(*c & 0x7f) << bits;
32 bits += 7;
36 bits += bits_required8(*c);
37 if (bits > 64) /* overflow */
H A Dtest-net.c9 unsigned int bits; member in struct:test_net_is_in_network_input
43 test_assert_idx(net_is_in_network(&ip, &net_ip, input[i].bits) ==
H A Dutc-mktime.c52 int bits, dir; local
63 for (bits = TIME_T_MAX_BITS - 2;; bits--) {
68 if (bits < 0)
72 t -= (time_t)1 << bits;
74 t += (time_t)1 << bits;
H A Dtest-buffer.c194 printf("%2d bits: %24s %s\n", i,
209 size_t bits; member in struct:__anon44
267 buffer_truncate_rshift_bits(buf, test_cases[i].bits);
H A Dbits.h96 /* Perform a piecewise-linear approximation to a log2, with fracbits "fractional" bits.
98 With 2 fractional bits splitting each power of 2 into 4 bands:
112 unsigned bits = bits_required32(val); local
113 if (bits <= fracbits + 1)
116 unsigned int bandnum = bits - fracbits;
151 #define BITS_FRACLOG_BUCKETS(bits) ((33u - (bits)) << (bits))
H A Dfile-cache.c108 unsigned char *bits, *dest; local
149 bits = buffer_get_space_unsafe(cache->page_bitmask, 0,
158 if ((bits[poffset / CHAR_BIT] & (1 << (poffset % CHAR_BIT))) != 0) {
177 bits[poffset / CHAR_BIT] &=
193 bits[poffset / CHAR_BIT] |=
211 bits[high_poffset / CHAR_BIT] &=
222 bits[poffset / CHAR_BIT] |= 1 << (poffset % CHAR_BIT);
240 unsigned char *bits; local
258 bits = buffer_get_space_unsafe(cache->page_bitmask,
260 *bits
283 unsigned char *bits, mask; local
[all...]
H A Dhash-format.c21 unsigned int bits; member in struct:hash_format_list
39 unsigned int bits, i = *idxp; local
41 /* we should have "hash_name}" or "hash_name:bits}" */
60 bits = (*method_r)->digest_size * 8;
62 if (str_to_uint(bitsp, &bits) < 0 ||
63 bits == 0 || bits > (*method_r)->digest_size*8) {
64 *error_r = t_strconcat("Invalid :bits number: ",
68 if ((bits % 8) != 0) {
70 "Currently :bits mus
[all...]
H A Dbuffer.c372 void buffer_truncate_rshift_bits(buffer_t *buf, size_t bits) argument
374 /* no-op if it's shorten than bits in any case.. */
375 if (buf->used * 8 < bits) return;
377 if (bits > 0) {
379 size_t bytes = ((bits + 7) & -8U)/8;
380 /* remaining bits */
381 bits = bits % 8;
385 if (bits > 0) {
387 ptr[i] = (ptr[i]>>(8-bits))
[all...]
H A Dnet.c1107 unsigned int bits, max_bits; local
1119 bits = max_bits;
1122 if (str_to_uint(p, &bits) < 0 || bits > max_bits)
1125 *bits_r = bits;
1130 const struct ip_addr *net_ip, unsigned int bits)
1162 for (pos = 0, i = 0; pos + 32 <= bits; pos += 32, i++) {
1170 for (mask = 0xff000000; pos + 8 <= bits; pos += 8, mask >>= 8) {
1175 /* check the last bits, they're reversed in bytes */
1176 bits
1129 net_is_in_network(const struct ip_addr *ip, const struct ip_addr *net_ip, unsigned int bits) argument
[all...]
/dovecot/src/lib-index/
H A Dmail-index-util.c53 unsigned int bits = 0; local
62 value |= (*c & 0x7f) << bits;
66 bits += 7;
70 if (unlikely(bits >= 32)) {
/dovecot/src/lib-otp/
H A Dotp-parse.c81 unsigned int parity = 0, bits[OTP_WORDS_NUMBER], tmp; local
92 buffer_create_from_data(&buf, bits, sizeof(bits));
133 hash[0] = bits[0] >> 3;
134 hash[1] = ((bits[0] & 7) << 5) | (bits[1] >> 6);
135 hash[2] = ((bits[1] & 0x3f) << 2) | (bits[2] >> 9);
136 hash[3] = (bits[2] >> 1) & 0xff;
137 hash[4] = ((bits[
[all...]
/dovecot/src/lmtp/
H A Dclient.c294 unsigned int bits; local
301 if (net_parse_range(*net, &net_ip, &bits) < 0) {
307 if (net_is_in_network(&client->remote_ip, &net_ip, bits))
/dovecot/src/plugins/fts-squat/
H A Dsquat-trie-private.h163 unsigned int bits = 0; local
171 value |= (*c & 0x7f) << bits;
175 bits += 7;
179 if (unlikely(bits >= 32)) {
/dovecot/src/lib-master/
H A Dmaster-service-haproxy.c628 unsigned int bits; local
635 if (net_parse_range(*net, &net_ip, &bits) < 0) {
641 if (net_is_in_network(&conn->real_remote_ip, &net_ip, bits))
/dovecot/src/lib-ssl-iostream/
H A Diostream-openssl.c799 int bits, alg_bits; local
805 bits = SSL_CIPHER_get_bits(cipher, &alg_bits);
813 return t_strdup_printf("%s with cipher %s (%d/%d bits)%s",
816 bits, alg_bits, comp_str);
/dovecot/src/lib-dcrypt/
H A Ddcrypt-gnutls.c272 int dcrypt_gnutls_generate_keypair(struct dcrypt_keypair *pair_r, enum dcrypt_key_type kind, unsigned int bits, const char *curve, const char **error_r) argument
283 bits = GNUTLS_CURVE_TO_BITS(pk_curve);
302 ec = gnutls_privkey_generate(priv, pk_algo, bits, 0);
H A Ddcrypt.c231 bool dcrypt_keypair_generate(struct dcrypt_keypair *pair_r, enum dcrypt_key_type kind, unsigned int bits, const char *curve, const char **error_r) argument
235 return dcrypt_vfs->generate_keypair(pair_r, kind, bits, curve, error_r);
H A Ddcrypt-openssl.c561 bool dcrypt_openssl_generate_rsa_key(int bits, EVP_PKEY **key, const char **error_r) argument
563 i_assert(bits >= 256);
570 EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) < 1 ||
735 bool dcrypt_openssl_generate_keypair(struct dcrypt_keypair *pair_r, enum dcrypt_key_type kind, unsigned int bits, const char *curve, const char **error_r) argument
741 if (dcrypt_openssl_generate_rsa_key(bits, &pkey, error_r)) {
/dovecot/src/login-common/
H A Dclient-common.c138 unsigned int bits; local
145 if (net_parse_range(*net, &net_ip, &bits) < 0) {
151 if (net_is_in_network(&client->ip, &net_ip, bits))
680 /* add lowest 48 bits of the timestamp. this gives us a bit less than
/dovecot/src/config/
H A Dconfig-parser.c252 unsigned int ip_count, bits, max_bits; local
285 else if (str_to_uint(p, &bits) == 0 && bits <= max_bits)
286 *bits_r = bits;
/dovecot/src/auth/
H A Dauth-request.c1757 unsigned int bits; local
1769 } else if (net_parse_range(*net, &net_ip, &bits) < 0) {
1773 net_is_in_network(remote_ip, &net_ip, bits)) {

Completed in 53 milliseconds