+
+#ifdef IMPLEADERS
+printleader(routine, ip)
+ char *routine;
+ register struct imp_leader *ip;
+{
+ printf("%s: ", routine);
+ printbyte((char *)ip, 12);
+ printf("<fmt=%x,net=%x,flags=%x,mtype=", ip->il_format, ip->il_network,
+ ip->il_flags);
+ if (ip->il_mtype <= IMPTYPE_READY)
+ printf("%s,", impleaders[ip->il_mtype]);
+ else
+ printf("%x,", ip->il_mtype);
+ printf("htype=%x,host=%x,imp=%x,link=", ip->il_htype, ip->il_host,
+ ntohs(ip->il_imp));
+ if (ip->il_link == IMPLINK_IP)
+ printf("ip,");
+ else
+ printf("%x,", ip->il_link);
+ printf("subtype=%x,len=%x>\n",ip->il_subtype,ntohs(ip->il_length)>>3);
+}
+
+printbyte(cp, n)
+ register char *cp;
+ int n;
+{
+ register i, j, c;
+
+ for (i=0; i<n; i++) {
+ c = *cp++;
+ for (j=0; j<2; j++)
+ putchar("0123456789abcdef"[(c>>((1-j)*4))&0xf]);
+ putchar(' ');
+ }
+ putchar('\n');
+}
+#endif