Home | History | Annotate | Download | only in tcpdump

Lines Matching refs:sp

108 /* sp points to IAC byte */
110 telnet_parse(const u_char *sp, u_int length, int print)
115 #define FETCH(c, sp, length) \
119 TCHECK(*sp); \
120 c = *sp++; \
124 osp = sp;
126 FETCH(c, sp, length);
129 FETCH(c, sp, length);
147 FETCH(x, sp, length);
158 p = sp;
159 while (length > (u_int)(p + 1 - sp)) {
169 if (p <= sp)
171 FETCH(c, sp, length);
174 if (p <= sp)
176 FETCH(c, sp, length);
181 if (p <= sp)
183 FETCH(c, sp, length);
186 if (p <= sp)
188 FETCH(c, sp, length);
193 if (p <= sp)
195 FETCH(c, sp, length);
200 while (p > sp) {
201 FETCH(x, sp, length);
208 sp += 2;
218 return sp - osp;
228 telnet_print(const u_char *sp, u_int length)
234 osp = sp;
236 while (length > 0 && *sp == IAC) {
237 l = telnet_parse(sp, length, 0);
247 hex_print_with_offset("\n", sp, l, sp - osp);
255 (void)telnet_parse(sp, length, 1);
258 sp += l;