Add a show igi_list
command to DDB to debug IGMP state.
Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
3af72c1124
commit
b941cb8d60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301527
@ -688,6 +688,13 @@ The second one is the name of the interrupt/trap handler.
|
||||
Those functions are machine dependent.
|
||||
.\"
|
||||
.Pp
|
||||
.It Ic show Cm igi_list Ar addr
|
||||
Show information about the IGMP structure
|
||||
.Vt struct igmp_ifsoftc
|
||||
present at
|
||||
.Ar addr .
|
||||
.\"
|
||||
.Pp
|
||||
.It Ic show Cm inodedeps Op Ar addr
|
||||
Show brief information about each inodedep structure.
|
||||
If
|
||||
|
@ -50,6 +50,8 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/module.h>
|
||||
@ -64,6 +66,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/condvar.h>
|
||||
|
||||
#ifdef DDB
|
||||
#include <ddb/ddb.h>
|
||||
#endif
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/netisr.h>
|
||||
@ -3641,6 +3647,37 @@ vnet_igmp_uninit(const void *unused __unused)
|
||||
VNET_SYSUNINIT(vnet_igmp_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY,
|
||||
vnet_igmp_uninit, NULL);
|
||||
|
||||
#ifdef DDB
|
||||
DB_SHOW_COMMAND(igi_list, db_show_igi_list)
|
||||
{
|
||||
struct igmp_ifsoftc *igi, *tigi;
|
||||
LIST_HEAD(_igi_list, igmp_ifsoftc) *igi_head;
|
||||
|
||||
if (!have_addr) {
|
||||
db_printf("usage: show igi_list <addr>\n");
|
||||
return;
|
||||
}
|
||||
igi_head = (struct _igi_list *)addr;
|
||||
|
||||
LIST_FOREACH_SAFE(igi, igi_head, igi_link, tigi) {
|
||||
db_printf("igmp_ifsoftc %p:\n", igi);
|
||||
db_printf(" ifp %p\n", igi->igi_ifp);
|
||||
db_printf(" version %u\n", igi->igi_version);
|
||||
db_printf(" v1_timer %u\n", igi->igi_v1_timer);
|
||||
db_printf(" v2_timer %u\n", igi->igi_v2_timer);
|
||||
db_printf(" v3_timer %u\n", igi->igi_v3_timer);
|
||||
db_printf(" flags %#x\n", igi->igi_flags);
|
||||
db_printf(" rv %u\n", igi->igi_rv);
|
||||
db_printf(" qi %u\n", igi->igi_qi);
|
||||
db_printf(" qri %u\n", igi->igi_qri);
|
||||
db_printf(" uri %u\n", igi->igi_uri);
|
||||
/* SLIST_HEAD(,in_multi) igi_relinmhead */
|
||||
/* struct mbufq igi_gq; */
|
||||
db_printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
igmp_modevent(module_t mod, int type, void *unused __unused)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user