Lines Matching refs:mip

243   struct mppe_state *mip = (struct mppe_state *)v;
268 if (!flushed && mip->stateless) {
275 if (mip->stateless) {
277 while (prefix != mip->cohnum) {
279 MPPEKeyChange(mip);
281 * mip->cohnum contains what we received last time in stateless
284 mip->cohnum++;
285 mip->cohnum &= ~MPPE_HEADER_BITMASK;
295 (mip->cohnum >> MPPE_HEADER_FLAGSHIFT);
301 MPPEKeyChange(mip);
303 mip->flushrequired = 0;
304 mip->cohnum = prefix;
308 if (mip->flushrequired) {
321 if (prefix != mip->cohnum) {
329 prefix, mip->cohnum);
332 mip->flushrequired = 1;
339 MPPEKeyChange(mip);
345 * mip->cohnum contains what we expect to receive next time in stateful
348 mip->cohnum++;
349 mip->cohnum &= ~MPPE_HEADER_BITMASK;
354 RC4_set_key(&mip->rc4key, mip->keylen, mip->sesskey);
358 RC4(&mip->rc4key, 2, (char *)proto, (char *)proto);
363 RC4(&mip->rc4key, len, rp, rp);
681 struct mppe_state *mip;
688 if ((mip = MPPE_InitState(o)) == NULL) {
693 log_Printf(LogDEBUG, "MPPE: InitInput: %d-bits\n", mip->keybits);
697 if (mip->keylen > bundle->radius.mppe.recvkeylen)
698 mip->keylen = bundle->radius.mppe.recvkeylen;
699 if (mip->keylen > sizeof mip->mastkey)
700 mip->keylen = sizeof mip->mastkey;
701 memcpy(mip->mastkey, bundle->radius.mppe.recvkey, mip->keylen);
704 GetAsymetricStartKey(MPPE_MasterKey, mip->mastkey, mip->keylen, 0,
707 GetNewKeyFromSHA(mip->mastkey, mip->mastkey, mip->keylen, mip->sesskey);
709 MPPEReduceSessionKey(mip);
713 if (!mip->stateless) {
719 mip->cohnum);
720 RC4_set_key(&mip->rc4key, mip->keylen, mip->sesskey);
727 log_Printf(LogDEBUG, "MPPEInitInput: Key changed [%d]\n", mip->cohnum);
728 MPPEKeyChange(mip);
731 return mip;