Lines Matching refs:hdlc
47 #include "hdlc.h"
99 hdlc_Init(struct hdlc *hdlc, struct lcp *lcp)
101 memset(hdlc, '\0', sizeof(struct hdlc));
102 hdlc->lqm.owner = lcp;
309 log_Printf(LogERROR, "Can't Pull a hdlc packet from a logical link\n");
322 p->hdlc.lqm.ifInOctets += len + 1; /* plus 1 flag octet! */
325 p->hdlc.lqm.ifInErrors++;
326 p->hdlc.stats.badfcs++;
332 p->hdlc.lqm.lqr.InGoodOctets += len + 1; /* plus 1 flag octet! */
333 p->hdlc.lqm.ifInUniPackets++;
385 struct hdlc *hdlc = &arg->cx->physical->hdlc;
389 hdlc->stats.badfcs);
391 HDLC_ADDR, hdlc->stats.badaddr);
393 HDLC_UI, hdlc->stats.badcommand);
395 hdlc->stats.unknownproto);
403 struct hdlc *hdlc = (struct hdlc *)v;
405 timer_Stop(&hdlc->ReportTimer);
407 if (memcmp(&hdlc->laststats, &hdlc->stats, sizeof hdlc->stats)) {
410 hdlc->lqm.owner->fsm.link->name,
411 hdlc->stats.badfcs - hdlc->laststats.badfcs,
412 hdlc->stats.badaddr - hdlc->laststats.badaddr,
413 hdlc->stats.badcommand - hdlc->laststats.badcommand,
414 hdlc->stats.unknownproto - hdlc->laststats.unknownproto);
415 hdlc->laststats = hdlc->stats;
418 timer_Start(&hdlc->ReportTimer);
422 hdlc_StartTimer(struct hdlc *hdlc)
424 timer_Stop(&hdlc->ReportTimer);
425 hdlc->ReportTimer.load = 60 * SECTICKS;
426 hdlc->ReportTimer.arg = hdlc;
427 hdlc->ReportTimer.func = hdlc_ReportTime;
428 hdlc->ReportTimer.name = "hdlc";
429 timer_Start(&hdlc->ReportTimer);
433 hdlc_StopTimer(struct hdlc *hdlc)
435 timer_Stop(&hdlc->ReportTimer);
438 struct layer hdlclayer = { LAYER_HDLC, "hdlc", hdlc_LayerPush, hdlc_LayerPull };