Lines Matching defs:cp
87 zmtp1_print_frame(netdissect_options *ndo, const u_char *cp, const u_char *ep)
94 if (GET_U_1(cp) != 0xFF) { /* length/0xFF */
96 body_len_declared = GET_U_1(cp);
101 ND_TCHECK_LEN(cp, header_len); /* 0xFF, length */
102 body_len_declared = GET_BE_U_8(cp + 1);
106 return cp + header_len; /* skip to the next frame */
107 ND_TCHECK_LEN(cp, header_len + 1); /* ..., flags */
108 flags = GET_U_1(cp + header_len);
110 body_len_captured = ep - cp - header_len;
123 hex_and_ascii_print(ndo, "\n\t ", cp + header_len + 1, body_len_printed - 1);
128 * Do not advance cp by the sum of header_len and body_len_declared
133 cp += header_len;
134 ND_TCHECK_LEN(cp, body_len_declared); /* Next frame within the buffer ? */
135 return cp + body_len_declared;
142 zmtp1_print(netdissect_options *ndo, const u_char *cp, u_int len)
144 const u_char *ep = ND_MIN(ndo->ndo_snapend, cp + len);
148 while (cp < ep)
149 cp = zmtp1_print_frame(ndo, cp, ep);
169 zmtp1_print_intermediate_part(netdissect_options *ndo, const u_char *cp, const u_int len)
174 frame_offset = GET_BE_U_2(cp);
176 cp += 2;
177 remaining_len = ND_BYTES_AVAILABLE_AFTER(cp); /* without the frame length */
198 hex_and_ascii_print(ndo, "\n\t ", cp, len_printed);
202 return cp + frame_offset;
209 zmtp1_datagram_print(netdissect_options *ndo, const u_char *cp, const u_int len)
211 const u_char *ep = ND_MIN(ndo->ndo_snapend, cp + len);
214 cp = zmtp1_print_intermediate_part(ndo, cp, len);
215 while (cp < ep)
216 cp = zmtp1_print_frame(ndo, cp, ep);