do { \
if (length < 1) \
goto pktend; \
- ND_TCHECK_1(sp); \
c = GET_U_1(sp); \
sp++; \
length--; \
/* IAC SB .... IAC SE */
p = sp;
while (length > (u_int)(p + 1 - sp)) {
- ND_TCHECK_2(p);
if (GET_U_1(p) == IAC && GET_U_1(p + 1) == SE)
break;
p++;
}
- ND_TCHECK_1(p);
if (GET_U_1(p) != IAC)
goto pktend;
done:
return (int)(sp - osp);
-trunc:
- nd_print_trunc(ndo);
pktend:
return -1;
#undef FETCH
ndo->ndo_protocol = "telnet";
osp = sp;
- ND_TCHECK_1(sp);
while (length > 0 && GET_U_1(sp) == IAC) {
/*
* Parse the Telnet command without printing it,