- u_int idx;
-
- printf("SIP, length: %u%s", len, vflag ? "\n\t" : "");
-
- /* in non-verbose mode just lets print the protocol and length */
- if (vflag < 1)
- return;
-
- for (idx = 0; idx < len; idx++) {
- TCHECK2(*(pptr+idx), 2);
- if (EXTRACT_16BITS(pptr+idx) != 0x0d0a) { /* linefeed ? */
- safeputchar(*(pptr+idx));
- } else {
- printf("\n\t");
- idx+=1;
- }
- }
-
- /* do we want to see an additionally hexdump ? */
- if (vflag> 1)
- print_unknown_data(pptr,"\n\t",len);
-
- return;
-
-trunc:
- printf("[|sip]");
+ ndo->ndo_protocol = "sip";
+ txtproto_print(ndo, pptr, len, sipcmds, RESP_CODE_SECOND_TOKEN);