Home
last modified time | relevance | path

Searched refs:k (Results 1 – 25 of 2450) sorted by relevance

12345678910>>...98

/netbsd/src/crypto/external/bsd/openssl/dist/crypto/camellia/
Dcamellia.c286 int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, KEY_TABLE_TYPE k) in Camellia_Ekeygen() argument
290 k[0] = s0 = GETU32(rawKey); in Camellia_Ekeygen()
291 k[1] = s1 = GETU32(rawKey + 4); in Camellia_Ekeygen()
292 k[2] = s2 = GETU32(rawKey + 8); in Camellia_Ekeygen()
293 k[3] = s3 = GETU32(rawKey + 12); in Camellia_Ekeygen()
296 k[8] = s0 = GETU32(rawKey + 16); in Camellia_Ekeygen()
297 k[9] = s1 = GETU32(rawKey + 20); in Camellia_Ekeygen()
299 k[10] = s2 = ~s0; in Camellia_Ekeygen()
300 k[11] = s3 = ~s1; in Camellia_Ekeygen()
302 k[10] = s2 = GETU32(rawKey + 24); in Camellia_Ekeygen()
[all …]
/netbsd/src/sys/dev/sun/
Dkbd.c180 struct kbd_softc *k; in kbdopen() local
184 k = device_lookup_private(&kbd_cd, minor(dev)); in kbdopen()
185 if (k == NULL) in kbdopen()
195 if (!k->k_wsenabled) in kbdopen()
196 wssunkbd_enable(k, 1); in kbdopen()
200 if (k->k_events.ev_io) in kbdopen()
202 k->k_events.ev_io = l->l_proc; in kbdopen()
205 if (k->k_cc != NULL && k->k_repeating) { in kbdopen()
206 k->k_repeating = 0; in kbdopen()
207 callout_stop(&k->k_repeat_ch); in kbdopen()
[all …]
Dkbdsun.c112 struct kbd_sun_softc *k = (struct kbd_sun_softc *)kbd; in kbd_sun_open() local
122 if (k->k_isopen) in kbd_sun_open()
126 if (k->k_deviopen) in kbd_sun_open()
127 (*k->k_deviopen)(k->k_kbd.k_dev, FREAD|FWRITE); in kbd_sun_open()
132 kbd_sun_output(k, KBD_CMD_RESET); in kbd_sun_open()
133 kbd_sun_start_tx(k); in kbd_sun_open()
134 kbd_sun_drain_tx(k); in kbd_sun_open()
160 kbd_sun_output(k, KBD_CMD_GETLAYOUT); in kbd_sun_open()
161 kbd_sun_start_tx(k); in kbd_sun_open()
162 kbd_sun_drain_tx(k); in kbd_sun_open()
[all …]
Dkbd_zs.c80 void kbd_wskbd_attach(struct kbd_softc *k, int isconsole);
127 struct kbd_sun_softc *k = device_private(self); in kbd_zs_attach() local
135 k->k_kbd.k_dev = self; in kbd_zs_attach()
138 k->k_kbd.k_ops = &kbd_ops_sun; in kbd_zs_attach()
143 cs->cs_private = k; in kbd_zs_attach()
145 k->k_cs = cs; in kbd_zs_attach()
146 k->k_write_data = kbd_zs_write_data; in kbd_zs_attach()
157 struct cons_channel *cc = kbd_cc_alloc(&k->k_kbd); in kbd_zs_attach()
163 k->k_kbd.k_isconsole = 1; in kbd_zs_attach()
170 if (k->k_kbd.k_isconsole == 0) { in kbd_zs_attach()
[all …]
/netbsd/src/common/lib/libc/string/
Dmemmem.c39 static char *twobyte_memmem(const unsigned char *h, size_t k, in twobyte_memmem() argument
43 for (h += 2, k -= 2; k; k--, hw = hw << 8 | *h++) in twobyte_memmem()
48 static char *threebyte_memmem(const unsigned char *h, size_t k, in threebyte_memmem() argument
53 for (h += 3, k -= 3; k; k--, hw = (hw|*h++) << 8) in threebyte_memmem()
58 static char *fourbyte_memmem(const unsigned char *h, size_t k, in fourbyte_memmem() argument
63 for (h += 4, k -= 4; k; k--, hw = hw << 8 | *h++) in fourbyte_memmem()
84 size_t i, ip, jp, k, p, ms, p0, mem, mem0; in twoway_memmem() local
93 ip = (size_t)-1; jp = 0; k = p = 1; in twoway_memmem()
94 while (jp+k<l) { in twoway_memmem()
95 if (n[ip+k] == n[jp+k]) { in twoway_memmem()
[all …]
/netbsd/src/external/lgpl3/mpfr/dist/tests/
Dtabs.c85 int n, k; in check_cmp() local
93 for (k = 0; k <= 1; k++) in check_cmp()
95 mpfr_set_nan (p[k]); in check_cmp()
97 inexact = mpfr_abs (p[k], x, MPFR_RNDN); in check_cmp()
98 if (mpfr_cmp_ui (p[k], 1) || inexact != 0) in check_cmp()
100 printf ("Error in mpfr_abs(1.0) for k = %d\n", k); in check_cmp()
104 mpfr_set_nan (p[k]); in check_cmp()
106 inexact = (mpfr_abs) (p[k], x, MPFR_RNDN); in check_cmp()
107 if (mpfr_cmp_ui (p[k], 1) || inexact != 0) in check_cmp()
109 printf ("Error in (mpfr_abs)(1.0) for k = %d\n", k); in check_cmp()
[all …]
/netbsd/src/external/lgpl3/gmp/dist/mpz/
Dbin_ui.c111 mpz_hmul_nbnpk (mpz_ptr r, mpz_srcptr n, unsigned long int k, mpz_ptr t) in mpz_hmul_nbnpk() argument
113 ASSERT (k > 0 && SIZ(n) > 0); in mpz_hmul_nbnpk()
114 --k; in mpz_hmul_nbnpk()
115 mpz_add_ui (t, n, k); in mpz_hmul_nbnpk()
119 if (LIKELY (k <= (1UL << (BITS_PER_ULONG / 2)))) in mpz_hmul_nbnpk()
120 posmpz_dec_ui (r, (k + (k & 1))*(k >> 1)); in mpz_hmul_nbnpk()
124 mpz_init_set_ui (tmp, (k + (k & 1))); in mpz_hmul_nbnpk()
125 mpz_mul_ui (tmp, tmp, k >> 1); in mpz_hmul_nbnpk()
133 rek_raising_fac4 (mpz_ptr r, mpz_ptr p, mpz_ptr P, unsigned long int k, unsigned long int lk, mpz_p… in rek_raising_fac4() argument
135 if (k - lk < 5) in rek_raising_fac4()
[all …]
/netbsd/src/external/bsd/ipf/bin/ipftest/
Dbpf_filter.c120 m_xword(m, k, err) in m_xword() argument
122 register int k, *err;
128 MINDEX(len, m, k);
129 cp = MTOD(m, u_char *) + k;
130 if (len - k >= 4) {
135 if (m0 == 0 || M_LEN(m0) + len - k < 4)
139 switch (len - k) {
156 m_xhalf(m, k, err) in m_xhalf() argument
158 register int k, *err;
164 MINDEX(len, m, k);
[all …]
/netbsd/src/external/bsd/openldap/dist/contrib/slapd-modules/comp_match/
Dcomponentlib.c93 ComponentBits* k, **k2; in GDecComponentBits() local
96 k = (ComponentBits*) v; in GDecComponentBits()
102 k = *k2; in GDecComponentBits()
106 if ( k ) CompFree( mem_op, k ); in GDecComponentBits()
109 k->value = result.value; in GDecComponentBits()
110 k->comp_desc = get_component_description (BASICTYPE_BITSTRING); in GDecComponentBits()
130 ComponentBits* k, **k2; in BDecComponentBits() local
133 k = (ComponentBits*) v; in BDecComponentBits()
139 k = *k2; in BDecComponentBits()
150 if ( k ) CompFree( mem_op, k ); in BDecComponentBits()
[all …]
/netbsd/src/sys/net/
Dbpf_filter.c101 #define MINDEX(len, m, k) \ argument
104 while (k >= len) { \
105 k -= len; \
117 #define xword(p, k, err) m_xword((const struct mbuf *)(p), (k), (err)) argument
118 #define xhalf(p, k, err) m_xhalf((const struct mbuf *)(p), (k), (err)) argument
119 #define xbyte(p, k, err) m_xbyte((const struct mbuf *)(p), (k), (err)) argument
122 m_xword(const struct mbuf *m, uint32_t k, int *err) in m_xword() argument
129 MINDEX(len, m, k); in m_xword()
130 cp = mtod(m, u_char *) + k; in m_xword()
131 if (len - k >= 4) { in m_xword()
[all …]
/netbsd/src/external/bsd/libpcap/dist/
Dbpf_filter.c98 register bpf_u_int32 k; in pcapint_filter_with_aux_data() local
116 return (u_int)pc->k; in pcapint_filter_with_aux_data()
122 k = pc->k; in pcapint_filter_with_aux_data()
123 if (k > buflen || sizeof(int32_t) > buflen - k) { in pcapint_filter_with_aux_data()
126 A = EXTRACT_LONG(&p[k]); in pcapint_filter_with_aux_data()
130 k = pc->k; in pcapint_filter_with_aux_data()
131 if (k > buflen || sizeof(int16_t) > buflen - k) { in pcapint_filter_with_aux_data()
134 A = EXTRACT_SHORT(&p[k]); in pcapint_filter_with_aux_data()
145 switch (pc->k) { in pcapint_filter_with_aux_data()
161 k = pc->k; in pcapint_filter_with_aux_data()
[all …]
/netbsd/src/external/lgpl3/mpfr/dist/src/
Datan.c97 int im, i, k, l, done; in mpfr_atan_aux() local
189 for (i = k = done = 0; (i < n) && (done == 0); i += 2, k ++) in mpfr_atan_aux()
192 mpz_set_ui (Q[k+1], 2 * i + 3); /* Q(i+1,i+2) */ in mpfr_atan_aux()
193 mpz_mul_ui (S[k+1], p, 2 * i + 1); /* S(i+1,i+2) */ in mpfr_atan_aux()
194 mpz_mul_2exp (S[k], Q[k+1], r); in mpfr_atan_aux()
195 mpz_sub (S[k], S[k], S[k+1]); /* S(i,i+2) */ in mpfr_atan_aux()
196 mpz_mul_ui (Q[k], Q[k+1], 2 * i + 1); /* Q(i,i+2) */ in mpfr_atan_aux()
197 log2_nb_terms[k] = 1; /* S[k]/Q[k] corresponds to 2 terms */ in mpfr_atan_aux()
198 for (j = (i + 2) >> 1, l = 1; (j & 1) == 0; l ++, j >>= 1, k --) in mpfr_atan_aux()
202 MPFR_ASSERTD (k > 0); in mpfr_atan_aux()
[all …]
Dexp3.c50 int k, l; in mpfr_exp_rational() local
67 for (k = 1; k < m; k++) in mpfr_exp_rational()
68 mpz_mul (ptoj[k], ptoj[k-1], ptoj[k-1]); /* ptoj[k] = p^(2^k) */ in mpfr_exp_rational()
71 k = 0; in mpfr_exp_rational()
83 k++; in mpfr_exp_rational()
84 log2_nb_terms[k] = 0; /* 1 term */ in mpfr_exp_rational()
85 mpz_set_ui (Q[k], i + 1); in mpfr_exp_rational()
86 mpz_set_ui (S[k], i + 1); in mpfr_exp_rational()
92 mpz_mul (S[k], S[k], ptoj[l]); in mpfr_exp_rational()
93 mpz_mul (S[k-1], S[k-1], Q[k]); in mpfr_exp_rational()
[all …]
Dsin_cos.c298 int alloc, k, l; in sin_bs_aux() local
340 for (i = 2, k = 0, prec_i_have = mult[0]; prec_i_have < prec; i += 2) in sin_bs_aux()
346 k ++; in sin_bs_aux()
347 if (k + 1 >= alloc) /* necessarily k + 1 = alloc */ in sin_bs_aux()
349 MPFR_ASSERTD (k + 1 == alloc); in sin_bs_aux()
351 MPFR_ASSERTN (k + 1 < KMAX); in sin_bs_aux()
352 mpz_init (T[k+1]); in sin_bs_aux()
353 mpz_init (Q[k+1]); in sin_bs_aux()
354 mpz_init (ptoj[k+1]); in sin_bs_aux()
355 mpz_mul (ptoj[k+1], ptoj[k], ptoj[k]); /* pp^(2^(k+1)) */ in sin_bs_aux()
[all …]
/netbsd/src/external/lgpl3/gmp/dist/tests/mpz/
Dt-bin.c29 try_mpz_bin_ui (mpz_srcptr want, mpz_srcptr n, unsigned long k) in try_mpz_bin_ui() argument
34 mpz_bin_ui (got, n, k); in try_mpz_bin_ui()
40 printf (" k=%lu\n", k); in try_mpz_bin_ui()
50 try_mpz_bin_uiui (mpz_srcptr want, unsigned long n, unsigned long k) in try_mpz_bin_uiui() argument
55 mpz_bin_uiui (got, n, k); in try_mpz_bin_uiui()
61 printf (" k=%lu\n", k); in try_mpz_bin_uiui()
75 unsigned long k; in samples() member
126 try_mpz_bin_ui (want, n, data[i].k); in samples()
129 try_mpz_bin_uiui (want, mpz_get_ui (n), data[i].k); in samples()
143 unsigned long k; in twos() local
[all …]
/netbsd/src/lib/libc/gdtoa/
Dmisc.c48 (k) int k; in Balloc() argument
50 (int k)
62 if ((size_t)k <= Kmax && (rv = freelist[k]) !=0) {
63 freelist[k] = rv->next;
66 x = 1 << k;
72 if ((size_t)k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
83 rv->k = k;
100 if ((size_t)v->k > Kmax)
108 v->next = freelist[v->k];
109 freelist[v->k] = v;
[all …]
/netbsd/src/crypto/dist/ipsec-tools/src/racoon/
Dstrnames.c215 s_isakmp_certtype(int k) in s_isakmp_certtype() argument
219 if (name_isakmp_certtype[i].key == k) in s_isakmp_certtype()
221 return num2str(k); in s_isakmp_certtype()
238 s_isakmp_etype(int k) in s_isakmp_etype() argument
242 if (name_isakmp_etype[i].key == k) in s_isakmp_etype()
244 return num2str(k); in s_isakmp_etype()
291 s_isakmp_notify_msg(int k) in s_isakmp_notify_msg() argument
295 if (name_isakmp_notify_msg[i].key == k) in s_isakmp_notify_msg()
298 return num2str(k); in s_isakmp_notify_msg()
326 s_isakmp_nptype(int k) in s_isakmp_nptype() argument
[all …]
/netbsd/src/external/lgpl3/mpc/dist/src/
Drootofunity.c34 mpc_rootofunity (mpc_ptr rop, unsigned long n, unsigned long k, mpc_rnd_t rnd) in mpc_rootofunity() argument
51 k %= n; in mpc_rootofunity()
52 g = gcd (k, n); in mpc_rootofunity()
53 k /= g; in mpc_rootofunity()
64 MPC_ASSERT (k == 0); in mpc_rootofunity()
70 MPC_ASSERT (k == 1); in mpc_rootofunity()
77 MPC_ASSERT (k == 1 || k == 3); in mpc_rootofunity()
78 if (k == 1) in mpc_rootofunity()
85 MPC_ASSERT ((n == 3 && (k == 1 || k == 2)) || in mpc_rootofunity()
86 (n == 6 && (k == 1 || k == 5))); in mpc_rootofunity()
[all …]
Dradius.c60 unsigned int k; in leading_bit() local
67 k = 62; in leading_bit()
70 k = 61; in leading_bit()
72 k = 60; in leading_bit()
76 k = 59; in leading_bit()
78 k = 58; in leading_bit()
81 k = 57; in leading_bit()
83 k = 56; in leading_bit()
88 k = 55; in leading_bit()
90 k = 54; in leading_bit()
[all …]
/netbsd/src/sys/dev/pci/cxgb/
Dcxgb_jhash.h42 const u8 *k = key; in jhash() local
49 a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); in jhash()
50 b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); in jhash()
51 c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); in jhash()
55 k += 12; in jhash()
61 case 11: c += ((u32)k[10]<<24); in jhash()
62 case 10: c += ((u32)k[9]<<16); in jhash()
63 case 9 : c += ((u32)k[8]<<8); in jhash()
64 case 8 : b += ((u32)k[7]<<24); in jhash()
65 case 7 : b += ((u32)k[6]<<16); in jhash()
[all …]
/netbsd/src/usr.sbin/ypserv/ypserv/
Dypserv_proc.c151 struct ypreq_key *k = argp; in ypproc_match_2_svc() local
154 if (_yp_invalid_domain(k->domain) || _yp_invalid_map(k->map)) { in ypproc_match_2_svc()
159 secure = ypdb_secure(k->domain, k->map); in ypproc_match_2_svc()
163 "key %.*s", clientstr, TORF(secure), k->domain, k->map, in ypproc_match_2_svc()
164 k->keydat.dsize, k->keydat.dptr)); in ypproc_match_2_svc()
170 res = ypdb_get_record(k->domain, k->map, k->keydat, secure); in ypproc_match_2_svc()
180 struct ypreq_nokey *k = argp; in ypproc_first_2_svc() local
183 if (_yp_invalid_domain(k->domain) || _yp_invalid_map(k->map)) { in ypproc_first_2_svc()
188 secure = ypdb_secure(k->domain, k->map); in ypproc_first_2_svc()
192 clientstr, TORF(secure), k->domain, k->map)); in ypproc_first_2_svc()
[all …]
/netbsd/src/crypto/external/bsd/heimdal/dist/lib/asn1/
Dder_free.c106 der_free_bmp_string (heim_bmp_string *k) in der_free_bmp_string() argument
108 free(k->data); in der_free_bmp_string()
109 k->data = NULL; in der_free_bmp_string()
110 k->length = 0; in der_free_bmp_string()
114 der_free_universal_string (heim_universal_string *k) in der_free_universal_string() argument
116 free(k->data); in der_free_universal_string()
117 k->data = NULL; in der_free_universal_string()
118 k->length = 0; in der_free_universal_string()
129 der_free_octet_string (heim_octet_string *k) in der_free_octet_string() argument
131 free(k->data); in der_free_octet_string()
[all …]
/netbsd/src/sbin/routed/
Dtable.c791 struct khash *k, **pk; in kern_find() local
793 for (pk = &KHASH(dst,mask); (k = *pk) != 0; pk = &k->k_next) { in kern_find()
794 if (k->k_dst == dst && k->k_mask == mask) in kern_find()
799 return k; in kern_find()
806 struct khash *k, **pk; in kern_add() local
808 k = kern_find(dst, mask, &pk); in kern_add()
809 if (k != 0) in kern_add()
810 return k; in kern_add()
812 k = (struct khash *)rtmalloc(sizeof(*k), "kern_add"); in kern_add()
814 memset(k, 0, sizeof(*k)); in kern_add()
[all …]
/netbsd/src/lib/libusbhid/
Dusage.c156 int k; in hid_usage_page() local
161 for (k = 0; k < npages; k++) in hid_usage_page()
162 if (pages[k].usage == i) in hid_usage_page()
163 return pages[k].name; in hid_usage_page()
174 int j, k, us; in hid_usage_in_page() local
176 for (k = 0; k < npages; k++) in hid_usage_in_page()
177 if (pages[k].usage == page) in hid_usage_in_page()
179 if (k >= npages) in hid_usage_in_page()
181 for (j = 0; j < pages[k].pagesize; j++) { in hid_usage_in_page()
182 us = pages[k].page_contents[j].usage; in hid_usage_in_page()
[all …]
/netbsd/src/crypto/external/bsd/openssl/dist/crypto/cast/
Dc_enc.c22 const CAST_LONG *k; in CAST_encrypt() local
24 k = &(key->data[0]); in CAST_encrypt()
28 E_CAST(0, k, l, r, +, ^, -); in CAST_encrypt()
29 E_CAST(1, k, r, l, ^, -, +); in CAST_encrypt()
30 E_CAST(2, k, l, r, -, +, ^); in CAST_encrypt()
31 E_CAST(3, k, r, l, +, ^, -); in CAST_encrypt()
32 E_CAST(4, k, l, r, ^, -, +); in CAST_encrypt()
33 E_CAST(5, k, r, l, -, +, ^); in CAST_encrypt()
34 E_CAST(6, k, l, r, +, ^, -); in CAST_encrypt()
35 E_CAST(7, k, r, l, ^, -, +); in CAST_encrypt()
[all …]

12345678910>>...98