diff --git a/usr.sbin/mrouted/mtrace.h b/usr.sbin/mrouted/mtrace.h index 1d704910475b..e67dbd0fa145 100644 --- a/usr.sbin/mrouted/mtrace.h +++ b/usr.sbin/mrouted/mtrace.h @@ -1,9 +1,17 @@ /* * Multicast traceroute related definitions * - * mtrace.h,v 5.1 1996/12/19 21:31:26 fenner Exp + * mtrace.h,v 5.2 1998/12/04 04:48:21 fenner Exp */ +/* + * NetBSD renamed the mtrace packet types. + */ +#if !defined(IGMP_MTRACE_RESP) && defined(IGMP_MTRACE_REPLY) +#define IGMP_MTRACE_RESP IGMP_MTRACE_REPLY +#define IGMP_MTRACE IGMP_MTRACE_QUERY +#endif + /* * The packet format for a traceroute request. */ @@ -11,21 +19,13 @@ struct tr_query { u_int32 tr_src; /* traceroute source */ u_int32 tr_dst; /* traceroute destination */ u_int32 tr_raddr; /* traceroute response address */ -#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN) - struct { - u_int qid : 24; /* traceroute query id */ - u_int ttl : 8; /* traceroute response ttl */ - } q; -#else - struct { - u_int ttl : 8; /* traceroute response ttl */ - u_int qid : 24; /* traceroute query id */ - } q; -#endif /* BYTE_ORDER */ + u_int32 tr_rttlqid; /* response ttl and qid */ }; -#define tr_rttl q.ttl -#define tr_qid q.qid +#define TR_SETTTL(x, ttl) (x = (x & 0x00ffffff) | ((ttl) << 24)) +#define TR_GETTTL(x) (((x) >> 24) & 0xff) +#define TR_SETQID(x, qid) (x = (x & 0xff000000) | ((qid) & 0x00ffffff)) +#define TR_GETQID(x) ((x) & 0x00ffffff) /* * Traceroute response format. A traceroute response has a tr_query at the @@ -46,8 +46,6 @@ struct tr_resp { }; /* defs within mtrace */ -#define QUERY 1 -#define RESP 2 #define QLEN sizeof(struct tr_query) #define RLEN sizeof(struct tr_resp) @@ -74,6 +72,10 @@ struct tr_resp { #define PROTO_PIM_SPECIAL 5 #define PROTO_PIM_STATIC 6 #define PROTO_DVMRP_STATIC 7 +#define PROTO_PIM_BGP4PLUS 8 +#define PROTO_CBT_SPECIAL 9 +#define PROTO_CBT_STATIC 10 +#define PROTO_PIM_ASSERT 11 #define VAL_TO_MASK(x, i) { \ x = htonl(~((1 << (32 - (i))) - 1)); \