Home
last modified time | relevance | path

Searched refs:mlen (Results 1 – 25 of 80) sorted by relevance

1234

/dragonfly/sys/netinet6/
H A Din6_cksum.c95 int mlen = 0; in in6_cksum() local
160 mlen = len; in in6_cksum()
161 len -= mlen; in in6_cksum()
170 mlen--; in in6_cksum()
184 mlen += 32; in in6_cksum()
189 mlen += 8; in in6_cksum()
203 mlen = 0; in in6_cksum()
205 mlen = -1; in in6_cksum()
246 mlen--; in in6_cksum()
260 mlen += 32; in in6_cksum()
[all …]
/dragonfly/contrib/tcpdump/
H A Din_cksum.c61 int mlen = 0; in in_cksum() local
77 if (mlen == -1) { in in_cksum()
89 mlen = vec->len - 1; in in_cksum()
91 mlen = vec->len; in in_cksum()
100 mlen--; in in_cksum()
114 mlen += 32; in in_cksum()
119 mlen += 8; in in_cksum()
130 if (mlen == -1) { in in_cksum()
133 mlen = 0; in in_cksum()
135 mlen = -1; in in_cksum()
[all …]
/dragonfly/crypto/openssh/
H A Ded25519.c53 const unsigned char *m,unsigned long long mlen, in crypto_sign_ed25519() argument
71 *smlen = mlen+64; in crypto_sign_ed25519()
72 for(i=0;i<mlen;i++) in crypto_sign_ed25519()
77 crypto_hash_sha512(hmg, sm+32, mlen+32); /* Generate k as h(extsk[32],...,extsk[63],m) */ in crypto_sign_ed25519()
88 get_hram(hram, sm, sk+32, sm, mlen+64); in crypto_sign_ed25519()
104 unsigned char *m,unsigned long long *mlen, in crypto_sign_ed25519_open() argument
116 *mlen = (unsigned long long) -1; in crypto_sign_ed25519_open()
136 *mlen = smlen-64; in crypto_sign_ed25519_open()
H A Dmsg.c48 u_int mlen = sshbuf_len(m); in ssh_msg_send() local
52 put_u32(buf, mlen + 1); in ssh_msg_send()
58 if (atomicio(vwrite, fd, sshbuf_mutable_ptr(m), mlen) != mlen) { in ssh_msg_send()
H A Dssh-ed25519.c102 unsigned long long smlen = 0, mlen = 0; in ssh_ed25519_verify() local
134 mlen = smlen; in ssh_ed25519_verify()
135 if ((sm = malloc(smlen)) == NULL || (m = malloc(mlen)) == NULL) { in ssh_ed25519_verify()
141 if ((ret = crypto_sign_ed25519_open(m, &mlen, sm, smlen, in ssh_ed25519_verify()
145 if (ret != 0 || mlen != datalen) { in ssh_ed25519_verify()
H A Dssh-ed25519-sk.c55 unsigned long long smlen = 0, mlen = 0; in ssh_ed25519_sk_verify() local
135 mlen = smlen; in ssh_ed25519_sk_verify()
140 if ((ret = crypto_sign_ed25519_open(m, &mlen, sm, smlen, in ssh_ed25519_sk_verify()
144 if (ret != 0 || mlen != smlen - len) { in ssh_ed25519_sk_verify()
H A Ddigest-openssl.c145 ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen) in ssh_digest_update() argument
147 if (EVP_DigestUpdate(ctx->mdctx, m, mlen) != 1) in ssh_digest_update()
185 ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen) in ssh_digest_memory() argument
197 if (!EVP_Digest(m, mlen, d, &mdlen, digest->mdfunc(), NULL)) in ssh_digest_memory()
H A Dhmac.c95 ssh_hmac_update(struct ssh_hmac_ctx *ctx, const void *m, size_t mlen) in ssh_hmac_update() argument
97 return ssh_digest_update(ctx->digest, m, mlen); in ssh_hmac_update()
142 hmac_test(void *key, size_t klen, void *m, size_t mlen, u_char *e, size_t elen) in hmac_test() argument
151 ssh_hmac_update(ctx, m, mlen) < 0 || in hmac_test()
H A Ddigest.h52 int ssh_digest_memory(int alg, const void *m, size_t mlen,
61 int ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
/dragonfly/contrib/zstd/lib/compress/
H A Dzstd_opt.c613 size_t mlen; in ZSTD_insertBtAndGetAllMatches() local
626 bestLength = mlen; in ZSTD_insertBtAndGetAllMatches()
909 return sol.litlen + sol.mlen; in ZSTD_totalLen()
1048 opt[cur].mlen = 0; in ZSTD_compressBlock_opt_generic()
1066 if (opt[cur].mlen != 0) { in ZSTD_compressBlock_opt_generic()
1120 U32 mlen; in ZSTD_compressBlock_opt_generic() local
1125 for (mlen = lastML; mlen >= startML; mlen--) { /* scan downward */ in ZSTD_compressBlock_opt_generic()
1133 opt[pos].mlen = mlen; in ZSTD_compressBlock_opt_generic()
1150 assert(opt[0].mlen == 0); in ZSTD_compressBlock_opt_generic()
1156 if (lastSequence.mlen != 0) { in ZSTD_compressBlock_opt_generic()
[all …]
/dragonfly/crypto/libressl/crypto/modes/
H A Dccm128.c77 const unsigned char *nonce,size_t nlen,size_t mlen) in CRYPTO_ccm128_setiv() argument
83 if (sizeof(mlen)==8 && L>=3) { in CRYPTO_ccm128_setiv()
84 ctx->nonce.c[8] = (u8)(mlen>>(56%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv()
85 ctx->nonce.c[9] = (u8)(mlen>>(48%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv()
86 ctx->nonce.c[10] = (u8)(mlen>>(40%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv()
87 ctx->nonce.c[11] = (u8)(mlen>>(32%(sizeof(mlen)*8))); in CRYPTO_ccm128_setiv()
92 ctx->nonce.c[12] = (u8)(mlen>>24); in CRYPTO_ccm128_setiv()
93 ctx->nonce.c[13] = (u8)(mlen>>16); in CRYPTO_ccm128_setiv()
94 ctx->nonce.c[14] = (u8)(mlen>>8); in CRYPTO_ccm128_setiv()
95 ctx->nonce.c[15] = (u8)mlen; in CRYPTO_ccm128_setiv()
H A Dgcm128.c904 mlen += len;
905 if (mlen>((U64(1)<<36)-32) || (sizeof(len)==8 && mlen<len))
907 ctx->len.u[1] = mlen;
1086 mlen += len;
1087 if (mlen>((U64(1)<<36)-32) || (sizeof(len)==8 && mlen<len))
1089 ctx->len.u[1] = mlen;
1274 mlen += len;
1275 if (mlen>((U64(1)<<36)-32) || (sizeof(len)==8 && mlen<len))
1277 ctx->len.u[1] = mlen;
1392 mlen += len;
[all …]
/dragonfly/contrib/dhcpcd/src/
H A Dauth.c105 const void *vm, size_t mlen, int mp, int mt, in dhcp_auth_validate() argument
130 if (data < m || data > m + mlen || data + dlen > m + mlen) { in dhcp_auth_validate()
338 mm = malloc(mlen); in dhcp_auth_validate()
341 memcpy(mm, m, mlen); in dhcp_auth_validate()
356 hmac("md5", t->key, t->key_len, mm, mlen, in dhcp_auth_validate()
523 void *vm, size_t mlen, int mp, int mt, in dhcp_auth_encode() argument
617 if (data < m || data > m + mlen || data + dlen > m + mlen) { in dhcp_auth_encode()
722 hmac("md5", t->key, t->key_len, m, mlen, in dhcp_auth_encode()
/dragonfly/usr.sbin/ppp/
H A Dpap.c119 int plen, mlen; in SendPapCode() local
123 mlen = strlen(message); in SendPapCode()
124 plen = mlen + 1; in SendPapCode()
134 *cp++ = mlen > 255 ? 255 : mlen; in SendPapCode()
135 memcpy(cp, message, mlen); in SendPapCode()
/dragonfly/lib/libc/stdio/
H A Dvswscanf.c68 size_t mlen; in vswscanf_l() local
81 if ((mlen = wcsrtombs_l(mbstr, &strp, SIZE_T_MAX, &mbs, locale)) == (size_t)-1) { in vswscanf_l()
87 f._bf._size = f.pub._r = mlen; in vswscanf_l()
/dragonfly/contrib/nvi2/common/
H A Dmsg.c52 size_t blen, len, mlen, nlen; in msgq() local
129 #define REM (blen - mlen) in msgq()
131 mlen = 0; in msgq()
138 mlen += len; in msgq()
154 if ((mlen += len) > blen) in msgq()
159 if ((mlen += len) > blen) in msgq()
316 if ((mlen += len) > blen) in msgq()
321 if ((mlen += len) > blen) in msgq()
327 if ((mlen += 1) > blen) in msgq()
334 gp->scr_msg(sp, mt, bp, mlen); in msgq()
[all …]
/dragonfly/crypto/libressl/crypto/rsa/
H A Drsa_oaep.c174 int i, dblen = 0, mlen = -1, one_index = 0, msg_index; in RSA_padding_check_PKCS1_OAEP_mgf1() local
275 mlen = dblen - msg_index; in RSA_padding_check_PKCS1_OAEP_mgf1()
280 good &= constant_time_ge(tlen, mlen); in RSA_padding_check_PKCS1_OAEP_mgf1()
295 mlen = dblen - msg_index; in RSA_padding_check_PKCS1_OAEP_mgf1()
316 return constant_time_select_int(good, mlen, -1); in RSA_padding_check_PKCS1_OAEP_mgf1()
/dragonfly/contrib/file/src/
H A Dascmagic.c113 size_t mlen, i, len; in file_ascmagic_with_encoding() local
145 mlen = ulen * 6; in file_ascmagic_with_encoding()
146 if ((utf8_buf = CAST(unsigned char *, malloc(mlen))) == NULL) { in file_ascmagic_with_encoding()
147 file_oomem(ms, mlen); in file_ascmagic_with_encoding()
150 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) in file_ascmagic_with_encoding()
H A Dencoding.c81 size_t mlen; in file_encoding() local
99 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
100 *ubuf = CAST(file_unichar_t *, calloc(CAST(size_t, 1), mlen)); in file_encoding()
102 file_oomem(ms, mlen); in file_encoding()
152 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding()
153 if ((nbuf = CAST(unsigned char *, malloc(mlen))) == NULL) { in file_encoding()
154 file_oomem(ms, mlen); in file_encoding()
/dragonfly/sys/vfs/nfs/
H A Dkrpc_subr.c464 int mlen; /* message length */ in xdr_string_encode() local
467 mlen = dlen + 4; in xdr_string_encode()
469 if (mlen > MCLBYTES) /* If too big, we just can't do it. */ in xdr_string_encode()
472 m = m_getl(mlen, M_WAITOK, MT_DATA, 0, NULL); in xdr_string_encode()
474 m->m_len = mlen; in xdr_string_encode()
H A Dnfsm_subs.c1174 int xfer, left, mlen; in nfsm_uiotombuf() local
1197 mlen = M_TRAILINGSPACE(mp); in nfsm_uiotombuf()
1198 if (mlen == 0) { in nfsm_uiotombuf()
1206 mlen = M_TRAILINGSPACE(mp); in nfsm_uiotombuf()
1208 xfer = (left > mlen) ? mlen : left; in nfsm_uiotombuf()
1255 int xfer, mlen; in nfsm_biotombuf() local
1271 mlen = M_TRAILINGSPACE(mp); in nfsm_biotombuf()
1272 if (mlen == 0) { in nfsm_biotombuf()
1280 mlen = M_TRAILINGSPACE(mp); in nfsm_biotombuf()
1282 xfer = (bio_left < mlen) ? bio_left : mlen; in nfsm_biotombuf()
[all …]
/dragonfly/sys/net/ipfw3_basic/
H A Dip_fw3_table.c145 uint8_t mlen; in table_append_dispatch() local
161 mlen = ioc_tbl->ip_ent->masklen; in table_append_dispatch()
164 ent->mask.sin_addr.s_addr = htonl(~((1 << (32 - mlen)) - 1)); in table_append_dispatch()
201 uint8_t mlen; in table_remove_dispatch() local
211 mlen = ioc_tbl->ip_ent->masklen; in table_remove_dispatch()
215 mask.sin_addr.s_addr = htonl(mlen ? ~((1 << (32 - mlen)) - 1) : 0); in table_remove_dispatch()
/dragonfly/contrib/nvi2/vi/
H A Dvs_msg.c160 size_t len, mlen, oldx, oldy; in vs_update() local
197 mlen = len = strlen(m1); in vs_update()
199 mlen = len = sp->cols - 2; in vs_update()
200 (void)gp->scr_addstr(sp, m1, mlen); in vs_update()
204 mlen = STRLEN(m2); in vs_update()
205 if (len + mlen > sp->cols - 2) in vs_update()
206 mlen = (sp->cols - 2) - len; in vs_update()
207 (void)gp->scr_waddstr(sp, m2, mlen); in vs_update()
/dragonfly/sys/net/
H A Dradix.c553 int bit, mlen; in rn_addmask() local
557 if ((mlen = clen(mask)) > RN_MAXKEYLEN) in rn_addmask()
558 mlen = RN_MAXKEYLEN; in rn_addmask()
561 if (mlen <= skip) in rn_addmask()
567 bcopy(mask + skip, addmask_key + skip, mlen - skip); in rn_addmask()
571 mlen = cp - addmask_key; in rn_addmask()
572 if (mlen <= skip) in rn_addmask()
575 *addmask_key = mlen; in rn_addmask()
581 } else if (bcmp(addmask_key, x->rn_key, mlen) != 0) { in rn_addmask()
593 bcopy(addmask_key, p, mlen); in rn_addmask()
[all …]
/dragonfly/usr.sbin/ppp/libradius/
H A Dradlib.c1452 if ((mlen % 16 != 0) || mlen > 128) { in rad_demangle()
1454 (u_long)mlen); in rad_demangle()
1469 demangled = malloc(mlen); in rad_demangle()
1478 while (mlen) { in rad_demangle()
1480 mlen -= 16; in rad_demangle()
1484 if (mlen) { in rad_demangle()
1499 size_t mlen, size_t *len) in rad_demangle_mppe_key() argument
1511 (u_long)mlen); in rad_demangle_mppe_key()
1523 Clen = mlen - SALT_LEN; in rad_demangle_mppe_key()
1556 if (*len > mlen - 1) { in rad_demangle_mppe_key()
[all …]

1234