Lines Matching refs:bits
57 int bits;
77 uint32_t bits;
82 if (pa_atou(slash, &bits) < 0) {
83 pa_log_warn("Failed to parse number of bits: %s", slash);
87 bits = (uint32_t) -1;
91 e.bits = bits == (uint32_t) -1 ? 32 : (int) bits;
93 if (e.bits > 32) {
94 pa_log_warn("Number of bits out of range: %i", e.bits);
100 if (e.bits < 32 && (uint32_t) (ntohl(e.address_ipv4.s_addr) << e.bits) != 0)
101 pa_log_warn("Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
106 e.bits = bits == (uint32_t) -1 ? 128 : (int) bits;
108 if (e.bits > 128) {
109 pa_log_warn("Number of bits out of range: %i", e.bits);
114 if (e.bits < 128) {
117 for (i = 0, bits = (uint32_t) e.bits; i < 16; i++) {
119 if (bits >= 8)
120 bits -= 8;
122 if ((uint8_t) ((e.address_ipv6.s6_addr[i]) << bits) != 0) {
126 bits = 0;
131 pa_log_warn("Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
202 if (e->bits == 0 || /* this needs special handling because >> takes the right-hand side modulo 32 */
203 (ntohl(sai->sin_addr.s_addr ^ e->address_ipv4.s_addr) >> (32 - e->bits)) == 0)
207 int i, bits;
210 if (e->bits == 128)
213 if (e->bits == 0)
216 for (i = 0, bits = e->bits; i < 16; i++) {
218 if (bits >= 8) {
222 bits -= 8;
224 if ((sai->sin6_addr.s6_addr[i] ^ e->address_ipv6.s6_addr[i]) >> (8 - bits) != 0)
227 bits = 0;
230 if (bits == 0)