Lines Matching defs:sch

331 	struct schan *sch;
404 sch = sc->ch[i];
407 i, NG_HOOK_NAME(sch->hook));
410 if (sch->last_recv)
412 (unsigned long)(time_second - sch->last_recv));
417 if (sch->last_rxerr)
419 (unsigned long)(time_second - sch->last_rxerr));
424 if (sch->last_xmit)
426 (unsigned long)(time_second - sch->last_xmit));
430 pos += sprintf(r + pos, " RX error(s) %lu", sch->rx_error);
431 pos += sprintf(r + pos, " Short: %lu", sch->short_error);
432 pos += sprintf(r + pos, " CRC: %lu", sch->crc_error);
433 pos += sprintf(r + pos, " Mod8: %lu", sch->dribble_error);
434 pos += sprintf(r + pos, " Long: %lu", sch->long_error);
435 pos += sprintf(r + pos, " Abort: %lu", sch->abort_error);
436 pos += sprintf(r + pos, " Overflow: %lu\n", sch->overflow_error);
439 sch->last_error, "\20\7SHORT\5CRC\4MOD8\3LONG\2ABORT\1OVERRUN",
440 sch->prev_error, "\20\7SHORT\5CRC\4MOD8\3LONG\2ABORT\1OVERRUN");
442 sch->tx_pending);
584 struct schan *sch;
589 sch = NG_HOOK_PRIVATE(hook);
590 sc = sch->sc;
591 chan = sch->chan;
593 if (sch->state != UP) {
598 if (sch->tx_pending + m->m_pkthdr.len > sch->tx_limit * mn_maxlatency) {
647 sch->tx_pending + m->m_pkthdr.len,
648 sch->tx_pending , m->m_pkthdr.len, m);
650 sch->tx_pending += m->m_pkthdr.len;
666 struct schan *sch;
669 sch = NG_HOOK_PRIVATE(hook);
670 chan = sch->chan;
671 sc = sch->sc;
673 if (sch->state == UP)
675 sch->state = UP;
679 if (sch->ts & (1 << i)) {
759 struct schan *sch;
763 sch = NG_HOOK_PRIVATE(hook);
764 chan = sch->chan;
765 sc = sch->sc;
767 if (sch->state == DOWN)
769 sch->state = DOWN;
816 struct schan *sch;
818 sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan],
820 sch->sc = sc;
821 sch->state = DOWN;
822 sch->chan = chan;
823 sprintf(sch->name, "%s%d", sc->name, chan);
1112 struct schan *sch;
1117 sch = sc->ch[chan];
1118 if (sch->state != UP) {
1124 sch->rx_error++;
1126 dp = sch->r1;
1135 NG_SEND_DATA_ONLY(error, sch->hook, m);
1136 sch->last_recv = time_second;
1138 if (sch->state != UP)
1141 sch->short_error++;
1143 sch->crc_error++;
1145 sch->dribble_error++;
1147 sch->long_error++;
1149 sch->abort_error++;
1151 sch->overflow_error++;
1154 sch->last_rxerr = time_second;
1155 sch->prev_error = sch->last_error;
1156 sch->last_error = err;