Lines Matching refs:coher_cnt

2310 pipex_mppe_setoldkey(struct pipex_mppe *mppe, uint16_t coher_cnt)
2315 mppe->old_session_keys[coher_cnt & PIPEX_MPPE_OLDKEYMASK],
2443 int idx = mppe->coher_cnt & PIPEX_MPPE_OLDKEYMASK;
2454 uint16_t coher_cnt;
2460 PIPEX_PULLUP(m0, sizeof(coher_cnt));
2467 GETSHORT(coher_cnt, cp);
2468 flushed = ((coher_cnt & 0x8000) != 0) ? 1 : 0;
2469 encrypt = ((coher_cnt & 0x1000) != 0) ? 1 : 0;
2470 coher_cnt &= PIPEX_COHERENCY_CNT_MASK;
2475 PIPEX_MPPE_DBG((session, LOG_DEBUG, "in coher_cnt=%03x %s%s",
2476 mppe->coher_cnt, (flushed) ? "[flushed]" : "",
2487 m_adj(m0, sizeof(coher_cnt));
2502 coher_cnt0 = coher_cnt;
2503 if (coher_cnt < mppe->coher_cnt)
2505 if (coher_cnt0 - mppe->coher_cnt > 0x0f00) {
2507 coher_cnt0 - mppe->coher_cnt
2511 "%d => %d", mppe->coher_cnt, coher_cnt);
2522 while (mppe->coher_cnt != coher_cnt) {
2523 mppe->coher_cnt++;
2524 mppe->coher_cnt &= PIPEX_COHERENCY_CNT_MASK;
2529 pipex_mppe_setoldkey(mppe, coher_cnt);
2532 if (coher_cnt < mppe->coher_cnt) {
2533 coher_cnt += 0x1000;
2535 pktloss += coher_cnt - mppe->coher_cnt;
2536 m = mppe->coher_cnt / 256;
2537 n = coher_cnt / 256;
2541 coher_cnt &= PIPEX_COHERENCY_CNT_MASK;
2542 mppe->coher_cnt = coher_cnt;
2543 } else if (mppe->coher_cnt != coher_cnt) {
2559 if ((coher_cnt & 0xff) == 0xff) {
2580 /* update coher_cnt */
2581 mppe->coher_cnt++;
2582 mppe->coher_cnt &= PIPEX_COHERENCY_CNT_MASK;
2602 uint16_t coher_cnt;
2642 if ((mppe->coher_cnt % 0x100) == 0xff) {
2654 PIPEX_MPPE_DBG((session, LOG_DEBUG, "out coher_cnt=%03x %s%s",
2655 mppe->coher_cnt, (flushed) ? "[flushed]" : "",
2659 hdr->coher_cnt = (mppe->coher_cnt++) & PIPEX_COHERENCY_CNT_MASK;
2660 hdr->coher_cnt &= PIPEX_COHERENCY_CNT_MASK;
2662 hdr->coher_cnt |= 0x8000;
2664 hdr->coher_cnt |= 0x1000;
2667 hdr->coher_cnt = htons(hdr->coher_cnt);