rip_printblk((u_char *)(rp + 1), snapend);
rip_print(const u_char *dat, u_int length){	register const struct rip *rp;	register const struct rip_netinfo *ni;	register int i, j, trunc;	i = min(length, snapend - dat) - sizeof(*rp);	if (i < 0) {		printf(" [|rip]");		return;	}	rp = (struct rip *)dat;	switch (rp->rip_vers) {	case 0:		/* RFC 1058 */		printf(" RIPv0: ");#if 0 /* XXX this is broken, ni is uninitialized */		rip_printblk((u_char *)&ni->rip_family,			     (u_char *)&ni->rip_metric +			     sizeof(ni->rip_metric));#endif		break;	default:		switch (rp->rip_cmd) {		case RIPCMD_REQUEST:			printf(" RIPv%d-req %d", rp->rip_vers, length);			break;		case RIPCMD_RESPONSE:			j = length / sizeof(*ni);			if (j * sizeof(*ni) != length - 4)				printf(" RIPv%d-resp [items %d] [%d]:",				       rp->rip_vers, j, length);			else				printf(" RIPv%d-resp [items %d]:",				       rp->rip_vers, j);			trunc = (i / sizeof(*ni)) != j;			ni = (struct rip_netinfo *)(rp + 1);			for (; (i -= sizeof(*ni)) >= 0; ++ni) {				if (rp->rip_vers == 1)					rip_entry_print_v1(rp->rip_vers, ni);				else					rip_entry_print_v2(rp->rip_vers, ni);			}			if (trunc)				printf("[|rip]");			break;		case RIPCMD_TRACEON:			printf(" RIPv%d-traceon %d: \"", rp->rip_vers, length);			(void)fn_print((const u_char *)(rp + 1), snapend);			fputs("\"\n", stdout);			break;		case RIPCMD_TRACEOFF:			printf(" RIPv%d-traceoff %d", rp->rip_vers, length);			break;		case RIPCMD_POLL:			printf(" RIPv%d-poll %d", rp->rip_vers, length);			break;		case RIPCMD_POLLENTRY:			printf(" RIPv%d-pollentry %d", rp->rip_vers, length);			break;		default:			printf(" RIPv%d-#%d %d", rp->rip_vers, rp->rip_cmd,			       length);			break;		}        }}