1996-08-19 20:34:12 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1995, 1996
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that: (1) source code distributions
|
|
|
|
* retain the above copyright notice and this paragraph in its entirety, (2)
|
|
|
|
* distributions including binary code include the above copyright notice and
|
|
|
|
* this paragraph in its entirety in the documentation or other materials
|
|
|
|
* provided with the distribution, and (3) all advertising materials mentioning
|
|
|
|
* features or use of this software display the following acknowledgement:
|
|
|
|
* ``This product includes software developed by the University of California,
|
|
|
|
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
|
|
|
|
* the University nor the names of its contributors may be used to endorse
|
|
|
|
* or promote products derived from this software without specific prior
|
|
|
|
* written permission.
|
|
|
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
|
|
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*/
|
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
/* \summary: Distance Vector Multicast Routing Protocol printer */
|
|
|
|
|
2000-01-30 00:45:58 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
1996-08-19 20:34:12 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
#include <netdissect-stdinc.h>
|
1996-08-19 20:34:12 +00:00
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
#include "netdissect.h"
|
2000-01-30 00:45:58 +00:00
|
|
|
#include "extract.h"
|
1996-08-19 20:34:12 +00:00
|
|
|
#include "addrtoname.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DVMRP message types and flag values shamelessly stolen from
|
|
|
|
* mrouted/dvmrp.h.
|
|
|
|
*/
|
|
|
|
#define DVMRP_PROBE 1 /* for finding neighbors */
|
|
|
|
#define DVMRP_REPORT 2 /* for reporting some or all routes */
|
|
|
|
#define DVMRP_ASK_NEIGHBORS 3 /* sent by mapper, asking for a list */
|
2002-06-21 00:43:23 +00:00
|
|
|
/* of this router's neighbors */
|
1996-08-19 20:34:12 +00:00
|
|
|
#define DVMRP_NEIGHBORS 4 /* response to such a request */
|
|
|
|
#define DVMRP_ASK_NEIGHBORS2 5 /* as above, want new format reply */
|
|
|
|
#define DVMRP_NEIGHBORS2 6
|
|
|
|
#define DVMRP_PRUNE 7 /* prune message */
|
|
|
|
#define DVMRP_GRAFT 8 /* graft message */
|
|
|
|
#define DVMRP_GRAFT_ACK 9 /* graft acknowledgement */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 'flags' byte values in DVMRP_NEIGHBORS2 reply.
|
|
|
|
*/
|
|
|
|
#define DVMRP_NF_TUNNEL 0x01 /* neighbors reached via tunnel */
|
|
|
|
#define DVMRP_NF_SRCRT 0x02 /* tunnel uses IP source routing */
|
|
|
|
#define DVMRP_NF_DOWN 0x10 /* kernel state of interface */
|
|
|
|
#define DVMRP_NF_DISABLED 0x20 /* administratively disabled */
|
|
|
|
#define DVMRP_NF_QUERIER 0x40 /* I am the subnet's querier */
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
static int print_probe(netdissect_options *, const u_char *, const u_char *, u_int);
|
|
|
|
static int print_report(netdissect_options *, const u_char *, const u_char *, u_int);
|
|
|
|
static int print_neighbors(netdissect_options *, const u_char *, const u_char *, u_int);
|
|
|
|
static int print_neighbors2(netdissect_options *, const u_char *, const u_char *, u_int);
|
|
|
|
static int print_prune(netdissect_options *, const u_char *);
|
|
|
|
static int print_graft(netdissect_options *, const u_char *);
|
|
|
|
static int print_graft_ack(netdissect_options *, const u_char *);
|
1996-08-19 20:34:12 +00:00
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
static uint32_t target_level;
|
1996-08-19 20:34:12 +00:00
|
|
|
|
|
|
|
void
|
2015-01-06 19:03:11 +00:00
|
|
|
dvmrp_print(netdissect_options *ndo,
|
|
|
|
register const u_char *bp, register u_int len)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
|
|
|
register const u_char *ep;
|
|
|
|
register u_char type;
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ep = (const u_char *)ndo->ndo_snapend;
|
1996-08-19 20:34:12 +00:00
|
|
|
if (bp >= ep)
|
|
|
|
return;
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK(bp[1]);
|
1996-08-19 20:34:12 +00:00
|
|
|
type = bp[1];
|
|
|
|
|
2002-06-21 00:43:23 +00:00
|
|
|
/* Skip IGMP header */
|
|
|
|
bp += 8;
|
1996-08-19 20:34:12 +00:00
|
|
|
len -= 8;
|
|
|
|
|
|
|
|
switch (type) {
|
1997-05-27 02:11:31 +00:00
|
|
|
|
1996-08-19 20:34:12 +00:00
|
|
|
case DVMRP_PROBE:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Probe"));
|
|
|
|
if (ndo->ndo_vflag) {
|
|
|
|
if (print_probe(ndo, bp, ep, len) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_REPORT:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Report"));
|
|
|
|
if (ndo->ndo_vflag > 1) {
|
|
|
|
if (print_report(ndo, bp, ep, len) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_ASK_NEIGHBORS:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Ask-neighbors(old)"));
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_NEIGHBORS:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Neighbors(old)"));
|
|
|
|
if (print_neighbors(ndo, bp, ep, len) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_ASK_NEIGHBORS2:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Ask-neighbors2"));
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_NEIGHBORS2:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Neighbors2"));
|
1996-08-19 20:34:12 +00:00
|
|
|
/*
|
1997-05-27 02:11:31 +00:00
|
|
|
* extract version and capabilities from IGMP group
|
|
|
|
* address field
|
1996-08-19 20:34:12 +00:00
|
|
|
*/
|
1997-05-27 02:11:31 +00:00
|
|
|
bp -= 4;
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 4);
|
1997-05-27 02:11:31 +00:00
|
|
|
target_level = (bp[0] << 24) | (bp[1] << 16) |
|
|
|
|
(bp[2] << 8) | bp[3];
|
|
|
|
bp += 4;
|
2015-01-06 19:03:11 +00:00
|
|
|
if (print_neighbors2(ndo, bp, ep, len) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_PRUNE:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Prune"));
|
|
|
|
if (print_prune(ndo, bp) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_GRAFT:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Graft"));
|
|
|
|
if (print_graft(ndo, bp) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case DVMRP_GRAFT_ACK:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " Graft-ACK"));
|
|
|
|
if (print_graft_ack(ndo, bp) < 0)
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [type %d]", type));
|
1996-08-19 20:34:12 +00:00
|
|
|
break;
|
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
trunc:
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "[|dvmrp]"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return;
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
static int
|
|
|
|
print_report(netdissect_options *ndo,
|
|
|
|
register const u_char *bp, register const u_char *ep,
|
|
|
|
register u_int len)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
register uint32_t mask, origin;
|
2004-03-31 09:17:26 +00:00
|
|
|
register int metric, done;
|
|
|
|
register u_int i, width;
|
1996-08-19 20:34:12 +00:00
|
|
|
|
|
|
|
while (len > 0) {
|
|
|
|
if (len < 3) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [|]"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 3);
|
|
|
|
mask = (uint32_t)0xff << 24 | bp[0] << 16 | bp[1] << 8 | bp[2];
|
1996-08-19 20:34:12 +00:00
|
|
|
width = 1;
|
|
|
|
if (bp[0])
|
|
|
|
width = 2;
|
|
|
|
if (bp[1])
|
|
|
|
width = 3;
|
|
|
|
if (bp[2])
|
|
|
|
width = 4;
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "\n\tMask %s", intoa(htonl(mask))));
|
1996-08-19 20:34:12 +00:00
|
|
|
bp += 3;
|
|
|
|
len -= 3;
|
|
|
|
do {
|
|
|
|
if (bp + width + 1 > ep) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [|]"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
if (len < width + 1) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "\n\t [Truncated Report]"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
origin = 0;
|
2004-03-31 09:17:26 +00:00
|
|
|
for (i = 0; i < width; ++i) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK(*bp);
|
1996-08-19 20:34:12 +00:00
|
|
|
origin = origin << 8 | *bp++;
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|
1996-08-19 20:34:12 +00:00
|
|
|
for ( ; i < 4; ++i)
|
|
|
|
origin <<= 8;
|
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK(*bp);
|
1996-08-19 20:34:12 +00:00
|
|
|
metric = *bp++;
|
|
|
|
done = metric & 0x80;
|
|
|
|
metric &= 0x7f;
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "\n\t %s metric %d", intoa(htonl(origin)),
|
|
|
|
metric));
|
1996-08-19 20:34:12 +00:00
|
|
|
len -= width + 1;
|
|
|
|
} while (!done);
|
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
|
|
|
trunc:
|
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_probe(netdissect_options *ndo,
|
|
|
|
register const u_char *bp, register const u_char *ep,
|
|
|
|
register u_int len)
|
1997-05-27 02:11:31 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
register uint32_t genid;
|
1997-05-27 02:11:31 +00:00
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 4);
|
1997-05-27 02:11:31 +00:00
|
|
|
if ((len < 4) || ((bp + 4) > ep)) {
|
|
|
|
/* { (ctags) */
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [|}"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1997-05-27 02:11:31 +00:00
|
|
|
}
|
|
|
|
genid = (bp[0] << 24) | (bp[1] << 16) | (bp[2] << 8) | bp[3];
|
|
|
|
bp += 4;
|
|
|
|
len -= 4;
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, ndo->ndo_vflag > 1 ? "\n\t" : " "));
|
|
|
|
ND_PRINT((ndo, "genid %u", genid));
|
|
|
|
if (ndo->ndo_vflag < 2)
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1997-05-27 02:11:31 +00:00
|
|
|
|
|
|
|
while ((len > 0) && (bp < ep)) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 4);
|
|
|
|
ND_PRINT((ndo, "\n\tneighbor %s", ipaddr_string(ndo, bp)));
|
2000-01-30 00:45:58 +00:00
|
|
|
bp += 4; len -= 4;
|
1997-05-27 02:11:31 +00:00
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1997-05-27 02:11:31 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_neighbors(netdissect_options *ndo,
|
|
|
|
register const u_char *bp, register const u_char *ep,
|
|
|
|
register u_int len)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2000-01-30 00:45:58 +00:00
|
|
|
const u_char *laddr;
|
1997-05-27 02:11:31 +00:00
|
|
|
register u_char metric;
|
|
|
|
register u_char thresh;
|
|
|
|
register int ncount;
|
1996-08-19 20:34:12 +00:00
|
|
|
|
|
|
|
while (len > 0 && bp < ep) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 7);
|
2000-01-30 00:45:58 +00:00
|
|
|
laddr = bp;
|
|
|
|
bp += 4;
|
1996-08-19 20:34:12 +00:00
|
|
|
metric = *bp++;
|
|
|
|
thresh = *bp++;
|
|
|
|
ncount = *bp++;
|
|
|
|
len -= 7;
|
2000-01-30 00:45:58 +00:00
|
|
|
while (--ncount >= 0) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 4);
|
|
|
|
ND_PRINT((ndo, " [%s ->", ipaddr_string(ndo, laddr)));
|
|
|
|
ND_PRINT((ndo, " %s, (%d/%d)]",
|
|
|
|
ipaddr_string(ndo, bp), metric, thresh));
|
2000-01-30 00:45:58 +00:00
|
|
|
bp += 4;
|
1996-08-19 20:34:12 +00:00
|
|
|
len -= 4;
|
|
|
|
}
|
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_neighbors2(netdissect_options *ndo,
|
|
|
|
register const u_char *bp, register const u_char *ep,
|
|
|
|
register u_int len)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2000-01-30 00:45:58 +00:00
|
|
|
const u_char *laddr;
|
1997-05-27 02:11:31 +00:00
|
|
|
register u_char metric, thresh, flags;
|
|
|
|
register int ncount;
|
1996-08-19 20:34:12 +00:00
|
|
|
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " (v %d.%d):",
|
1996-08-19 20:34:12 +00:00
|
|
|
(int)target_level & 0xff,
|
2015-01-06 19:03:11 +00:00
|
|
|
(int)(target_level >> 8) & 0xff));
|
1996-08-19 20:34:12 +00:00
|
|
|
|
|
|
|
while (len > 0 && bp < ep) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 8);
|
2000-01-30 00:45:58 +00:00
|
|
|
laddr = bp;
|
|
|
|
bp += 4;
|
1996-08-19 20:34:12 +00:00
|
|
|
metric = *bp++;
|
|
|
|
thresh = *bp++;
|
|
|
|
flags = *bp++;
|
|
|
|
ncount = *bp++;
|
|
|
|
len -= 8;
|
1997-05-27 02:11:31 +00:00
|
|
|
while (--ncount >= 0 && (len >= 4) && (bp + 4) <= ep) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [%s -> ", ipaddr_string(ndo, laddr)));
|
|
|
|
ND_PRINT((ndo, "%s (%d/%d", ipaddr_string(ndo, bp),
|
|
|
|
metric, thresh));
|
1996-08-19 20:34:12 +00:00
|
|
|
if (flags & DVMRP_NF_TUNNEL)
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "/tunnel"));
|
1996-08-19 20:34:12 +00:00
|
|
|
if (flags & DVMRP_NF_SRCRT)
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "/srcrt"));
|
1996-08-19 20:34:12 +00:00
|
|
|
if (flags & DVMRP_NF_QUERIER)
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "/querier"));
|
1996-08-19 20:34:12 +00:00
|
|
|
if (flags & DVMRP_NF_DISABLED)
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "/disabled"));
|
1996-08-19 20:34:12 +00:00
|
|
|
if (flags & DVMRP_NF_DOWN)
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, "/down"));
|
|
|
|
ND_PRINT((ndo, ")]"));
|
2000-01-30 00:45:58 +00:00
|
|
|
bp += 4;
|
1996-08-19 20:34:12 +00:00
|
|
|
len -= 4;
|
|
|
|
}
|
|
|
|
if (ncount != -1) {
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " [|]"));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_prune(netdissect_options *ndo,
|
|
|
|
register const u_char *bp)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 12);
|
|
|
|
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
|
1996-08-19 20:34:12 +00:00
|
|
|
bp += 8;
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_PRINT((ndo, " timer "));
|
2017-01-31 19:17:06 +00:00
|
|
|
unsigned_relts_print(ndo, EXTRACT_32BITS(bp));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_graft(netdissect_options *ndo,
|
|
|
|
register const u_char *bp)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 8);
|
|
|
|
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
print_graft_ack(netdissect_options *ndo,
|
|
|
|
register const u_char *bp)
|
1996-08-19 20:34:12 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
ND_TCHECK2(bp[0], 8);
|
|
|
|
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
|
2004-03-31 09:17:26 +00:00
|
|
|
return (0);
|
2000-01-30 00:45:58 +00:00
|
|
|
trunc:
|
2004-03-31 09:17:26 +00:00
|
|
|
return (-1);
|
1996-08-19 20:34:12 +00:00
|
|
|
}
|