comparison rvinterf/libg23/fmtfunc.c @ 627:42c91c51ca7f

rvinterf: display GPF packets as "GPF" rather than "G23"
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 01 Sep 2014 06:23:38 +0000
parents 91ea7a4a0b4d
children
comparison
equal deleted inserted replaced
626:d1df7544f102 627:42c91c51ca7f
1 /* 1 /*
2 * This libg23 module exports functions for formatting 3 different kinds 2 * This libg23 module exports functions for formatting 3 different kinds
3 * of G23 packets into human-readable form: traces, system primitives 3 * of GPF packets into human-readable form: traces, system primitives
4 * and protocol stack primitives. 4 * and protocol stack primitives.
5 * 5 *
6 * G23 packets passed to these functions to decoding MUST have already 6 * GPF packets passed to these functions for decoding MUST have already
7 * been verified to be well-formed for their respective type. 7 * been verified to be well-formed for their respective type.
8 */ 8 */
9 9
10 #include <sys/types.h> 10 #include <sys/types.h>
11 #include <ctype.h> 11 #include <ctype.h>
50 static void 50 static void
51 print_common_hdr(rxpkt, outp, typestr) 51 print_common_hdr(rxpkt, outp, typestr)
52 u_char *rxpkt; 52 u_char *rxpkt;
53 char **outp, *typestr; 53 char **outp, *typestr;
54 { 54 {
55 sprintf(*outp, "G23 %s id=%02X ts=%02X%02X%02X%02X ", typestr, 55 sprintf(*outp, "GPF %s id=%02X ts=%02X%02X%02X%02X ", typestr,
56 rxpkt[1], rxpkt[7], rxpkt[6], rxpkt[5], rxpkt[4]); 56 rxpkt[1], rxpkt[7], rxpkt[6], rxpkt[5], rxpkt[4]);
57 *outp = index(*outp, '\0'); 57 *outp = index(*outp, '\0');
58 print_entity_name(rxpkt + 8, outp); 58 print_entity_name(rxpkt + 8, outp);
59 *(*outp)++ = '-'; 59 *(*outp)++ = '-';
60 *(*outp)++ = '>'; 60 *(*outp)++ = '>';