- register const struct ip6_rthdr *dp;
- register const struct ip6_rthdr0 *dp0;
- register const struct ip6_hdr *ip;
- register const u_char *ep;
- int i, len;
-
- dp = (struct ip6_rthdr *)bp;
- ip = (struct ip6_hdr *)bp2;
- len = dp->ip6r_len;
-
- /* 'ep' points to the end of avaible data. */
- ep = snapend;
-
- printf("%s > %s: ",
- ip6addr_string(&ip->ip6_src),
- ip6addr_string(&ip->ip6_dst));
-
- TCHECK(dp->ip6r_segleft);
-
- printf("srcrt (len=%d, ", dp->ip6r_len);
- printf("type=%d, ", dp->ip6r_type);
- printf("segleft=%d, ", dp->ip6r_segleft);
-
- switch(dp->ip6r_type) {
+ const struct ip6_rthdr *dp;
+ const struct ip6_rthdr0 *dp0;
+ const struct ip6_srh *srh;
+ u_int i, len, type;
+ const u_char *p;
+
+ ndo->ndo_protocol = "rt6";
+
+ nd_print_protocol_caps(ndo);
+ dp = (const struct ip6_rthdr *)bp;
+
+ len = GET_U_1(dp->ip6r_len);
+ ND_PRINT(" (len=%u", len); /*)*/
+ type = GET_U_1(dp->ip6r_type);
+ ND_PRINT(", type=%u", type);
+ if (type == IPV6_RTHDR_TYPE_0)
+ ND_PRINT(" [Deprecated]");
+ ND_PRINT(", segleft=%u", GET_U_1(dp->ip6r_segleft));
+
+ switch (type) {