- register const struct ip6_rthdr *dp;
- register const struct ip6_rthdr0 *dp0;
- register const u_char *ep;
- int i, len;
- register const struct in6_addr *addr;
-
- dp = (struct ip6_rthdr *)bp;
- len = dp->ip6r_len;
-
- /* 'ep' points to the end of available data. */
- ep = snapend;
-
- 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) {
-#ifndef IPV6_RTHDR_TYPE_0
-#define IPV6_RTHDR_TYPE_0 0
-#endif
-#ifndef IPV6_RTHDR_TYPE_2
-#define IPV6_RTHDR_TYPE_2 2
-#endif
+ 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) {