/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <sys/sysmacros.h>
#include <netinet/in_systm.h>
#include <netdb.h>
#include "snoop.h"
static void interpret_igmpv3qry(struct igmp *, int);
static void interpret_igmpv3rpt(struct igmp *, int);
/*ARGSUSED*/
void
{
const char *pt;
char *line;
if (ilen < IGMP_MINLEN) {
/* incomplete header */
line = get_sum_line();
return;
}
case IGMP_MEMBERSHIP_QUERY:
if (ilen == IGMP_MINLEN) {
pt = "v1 membership query";
else
pt = "v2 membership query";
} else if (ilen >= IGMP_V3_QUERY_MINLEN) {
pt = "v3 membership query";
} else {
pt = "Unknown membership query";
}
break;
pt = "v1 membership report";
break;
pt = "v2 membership report";
break;
pt = "v3 membership report";
break;
case IGMP_V2_LEAVE_GROUP:
pt = "v2 leave group";
break;
default:
pt = "Unknown";
break;
}
line = get_sum_line();
}
show_space();
ilen >= IGMP_V3_QUERY_MINLEN) {
} else {
"Group = %s",
}
show_space();
}
}
static void
{
int srccnt;
"Malformed IGMP Query");
return;
}
srccnt--;
src++;
}
}
const char *igmpv3rpt_types[] = {
"<unknown>",
"MODE_IS_INCLUDE",
"MODE_IS_EXCLUDE",
"CHANGE_TO_INCLUDE",
"CHANGE_TO_EXCLUDE",
"ALLOW_NEW_SOURCES",
"BLOCK_OLD_SOURCES",
};
static void
{
"Malformed IGMPv3 Report");
return;
}
srccnt--;
src++;
}
grhcnt--;
}
}