Home | History | Annotate | Download | only in tcpdump

Lines Matching refs:bp

213 resp_print(netdissect_options *ndo, const u_char *bp, u_int length)
217 if(!bp || length <= 0)
228 * In order to handle this case, we must try and parse 'bp' until
231 ret_len = resp_parse(ndo, bp, length_cur);
233 bp += ret_len;
244 resp_parse(netdissect_options *ndo, register const u_char *bp, int length)
250 ND_TCHECK(*bp);
251 op = *bp;
253 /* bp now points to the op, so these routines must skip it */
255 case RESP_SIMPLE_STRING: ret_len = resp_print_simple_string(ndo, bp, length); break;
256 case RESP_INTEGER: ret_len = resp_print_integer(ndo, bp, length); break;
257 case RESP_ERROR: ret_len = resp_print_error(ndo, bp, length); break;
258 case RESP_BULK_STRING: ret_len = resp_print_bulk_string(ndo, bp, length); break;
259 case RESP_ARRAY: ret_len = resp_print_bulk_array(ndo, bp, length); break;
260 default: ret_len = resp_print_inline(ndo, bp, length); break;
275 resp_print_simple_string(netdissect_options *ndo, register const u_char *bp, int length) {
276 return resp_print_string_error_integer(ndo, bp, length);
280 resp_print_integer(netdissect_options *ndo, register const u_char *bp, int length) {
281 return resp_print_string_error_integer(ndo, bp, length);
285 resp_print_error(netdissect_options *ndo, register const u_char *bp, int length) {
286 return resp_print_string_error_integer(ndo, bp, length);
290 resp_print_string_error_integer(netdissect_options *ndo, register const u_char *bp, int length) {
294 /* bp points to the op; skip it */
295 SKIP_OPCODE(bp, length_cur);
296 bp_ptr = bp;
299 * bp now prints past the (+-;) opcode, so it's pointing to the first
310 * bp_ptr points to the \r\n, so bp_ptr - bp is the length of text
314 len = (bp_ptr - bp);
315 RESP_PRINT_SEGMENT(ndo, bp, len);
325 resp_print_bulk_string(netdissect_options *ndo, register const u_char *bp, int length) {
328 /* bp points to the op; skip it */
329 SKIP_OPCODE(bp, length_cur);
332 GET_LENGTH(ndo, length_cur, bp, string_len);
335 /* Byte string of length string_len, starting at bp */
340 ND_TCHECK2(*bp, string_len);
341 RESP_PRINT_SEGMENT(ndo, bp, string_len);
342 bp += string_len;
351 FIND_CRLF(bp, length_cur);
352 CONSUME_CRLF(bp, length_cur);
371 resp_print_bulk_array(netdissect_options *ndo, register const u_char *bp, int length) {
375 /* bp points to the op; skip it */
376 SKIP_OPCODE(bp, length_cur);
379 GET_LENGTH(ndo, length_cur, bp, array_len);
384 ret_len = resp_parse(ndo, bp, length_cur);
388 bp += ret_len;
410 resp_print_inline(netdissect_options *ndo, register const u_char *bp, int length) {
427 CONSUME_CR_OR_LF(bp, length_cur);
428 bp_ptr = bp;
436 * Found it; bp_ptr points to the \r or \n, so bp_ptr - bp is the
439 len = (bp_ptr - bp);
440 RESP_PRINT_SEGMENT(ndo, bp, len);
457 resp_get_length(netdissect_options *ndo, register const u_char *bp, int len, const u_char **endp)
467 ND_TCHECK(*bp);
470 if (*bp == '-') {
472 bp++;
481 ND_TCHECK(*bp);
482 c = *bp;
485 bp++;
502 bp++;
511 if (*bp
512 bp++;
515 bp++;
519 ND_TCHECK(*bp);
520 if (*bp != '\n') {
521 bp++;
524 bp++;
526 *endp = bp;
536 *endp = bp;
540 *endp = bp;