2 * Multicast traceroute related definitions
4 * mtrace.h,v 5.2 1998/12/04 04:48:21 fenner Exp
8 * NetBSD renamed the mtrace packet types.
10 #if !defined(IGMP_MTRACE_RESP) && defined(IGMP_MTRACE_REPLY)
11 #define IGMP_MTRACE_RESP IGMP_MTRACE_REPLY
12 #define IGMP_MTRACE IGMP_MTRACE_QUERY
16 * The packet format for a traceroute request.
19 u_int32 tr_src
; /* traceroute source */
20 u_int32 tr_dst
; /* traceroute destination */
21 u_int32 tr_raddr
; /* traceroute response address */
22 u_int32 tr_rttlqid
; /* response ttl and qid */
25 #define TR_SETTTL(x, ttl) (x = (x & 0x00ffffff) | ((ttl) << 24))
26 #define TR_GETTTL(x) (((x) >> 24) & 0xff)
27 #define TR_SETQID(x, qid) (x = (x & 0xff000000) | ((qid) & 0x00ffffff))
28 #define TR_GETQID(x) ((x) & 0x00ffffff)
31 * Traceroute response format. A traceroute response has a tr_query at the
32 * beginning, followed by one tr_resp for each hop taken.
35 u_int32 tr_qarr
; /* query arrival time */
36 u_int32 tr_inaddr
; /* incoming interface address */
37 u_int32 tr_outaddr
; /* outgoing interface address */
38 u_int32 tr_rmtaddr
; /* parent address in source tree */
39 u_int32 tr_vifin
; /* input packet count on interface */
40 u_int32 tr_vifout
; /* output packet count on interface */
41 u_int32 tr_pktcnt
; /* total incoming packets for src-grp */
42 u_char tr_rproto
; /* routing protocol deployed on router */
43 u_char tr_fttl
; /* ttl required to forward on outvif */
44 u_char tr_smask
; /* subnet mask for src addr */
45 u_char tr_rflags
; /* forwarding error codes */
48 /* defs within mtrace */
49 #define QLEN sizeof(struct tr_query)
50 #define RLEN sizeof(struct tr_resp)
52 /* fields for tr_rflags (forwarding error codes) */
62 #define TR_NO_MULTI 10
63 #define TR_NO_SPACE 0x81
64 #define TR_OLD_ROUTER 0x82
65 #define TR_ADMIN_PROHIB 0x83
67 /* fields for tr_rproto (routing protocol) */
72 #define PROTO_PIM_SPECIAL 5
73 #define PROTO_PIM_STATIC 6
74 #define PROTO_DVMRP_STATIC 7
75 #define PROTO_PIM_BGP4PLUS 8
76 #define PROTO_CBT_SPECIAL 9
77 #define PROTO_CBT_STATIC 10
78 #define PROTO_PIM_ASSERT 11
80 #define VAL_TO_MASK(x, i) { \
81 x = htonl(~((1 << (32 - (i))) - 1)); \
84 #if defined(__STDC__) || defined(__GNUC__)
85 #define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
87 #define JAN_1970 2208988800L /* 1970 - 1900 in seconds */