- /*
- * if this isn't the first frag, we're missing the
- * next level protocol header. print the ip addr
- * and the protocol.
- */
- if (ipds->off & 0x1fff) {
- (void)printf("%s > %s:", ipaddr_string(&ipds->ip->ip_src),
- ipaddr_string(&ipds->ip->ip_dst));
- if (!ndo->ndo_nflag && (proto = getprotobynumber(ipds->ip->ip_p)) != NULL)
- (void)printf(" %s", proto->p_name);
+ /*
+ * This isn't the first frag, so we're missing the
+ * next level protocol header. print the ip addr
+ * and the protocol.
+ */
+ ND_PRINT((ndo, "%s > %s:", ipaddr_string(ndo, &ipds->ip->ip_src),
+ ipaddr_string(ndo, &ipds->ip->ip_dst)));
+ if (!ndo->ndo_nflag && (p_name = netdb_protoname(ipds->ip->ip_p)) != NULL)
+ ND_PRINT((ndo, " %s", p_name));