Esempio n. 1
0
static void
db_print_socket(struct socket *so, const char *socketname, int indent)
{

	db_print_indent(indent);
	db_printf("%s at %p\n", socketname, so);

	indent += 2;

	db_print_indent(indent);
	db_printf("so_count: %d   ", so->so_count);
	db_printf("so_type: %d (", so->so_type);
	db_print_sotype(so->so_type);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("so_options: 0x%x (", so->so_options);
	db_print_sooptions(so->so_options);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("so_linger: %d   ", so->so_linger);
	db_printf("so_state: 0x%x (", so->so_state);
	db_print_sostate(so->so_state);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("so_qstate: 0x%x (", so->so_qstate);
	db_print_soqstate(so->so_qstate);
	db_printf(")   ");
	db_printf("so_pcb: %p   ", so->so_pcb);
	db_printf("so_proto: %p\n", so->so_proto);

	if (so->so_proto != NULL)
		db_print_protosw(so->so_proto, "so_proto", indent);

	db_print_indent(indent);
	db_printf("so_head: %p   ", so->so_head);
	db_printf("so_incomp first: %p   ", TAILQ_FIRST(&so->so_incomp));
	db_printf("so_comp first: %p\n", TAILQ_FIRST(&so->so_comp));

	db_print_indent(indent);
	/* so_list skipped */
	db_printf("so_qlen: %d   ", so->so_qlen);
	db_printf("so_incqlen: %d   ", so->so_incqlen);
	db_printf("so_qlimit: %d   ", so->so_qlimit);
	db_printf("so_timeo: %d   ", so->so_timeo);
	db_printf("so_error: %d\n", so->so_error);

	db_print_indent(indent);
	db_printf("so_sigio: %p   ", so->so_sigio);
	db_printf("so_oobmark: %lu   ", so->so_oobmark);
	db_printf("so_aiojobq first: %p\n", TAILQ_FIRST(&so->so_aiojobq));

	db_print_sockbuf(&so->so_rcv, "so_rcv", indent);
	db_print_sockbuf(&so->so_snd, "so_snd", indent);
}
Esempio n. 2
0
static void
db_print_domain(struct domain *d, const char *domain_name, int indent)
{

	db_print_indent(indent);
	db_printf("%s at %p\n", domain_name, d);

	indent += 2;

	db_print_indent(indent);
	db_printf("dom_family: %d   ", d->dom_family);
	db_printf("dom_name: %s\n", d->dom_name);

	db_print_indent(indent);
	db_printf("dom_init: %p   ", d->dom_init);
	db_printf("dom_externalize: %p   ", d->dom_externalize);
	db_printf("dom_dispose: %p\n", d->dom_dispose);

	db_print_indent(indent);
	db_printf("dom_protosw: %p   ", d->dom_protosw);
	db_printf("dom_next: %p\n", d->dom_next);

	db_print_indent(indent);
	db_printf("dom_rtattach: %p   ", d->dom_rtattach);

	db_print_indent(indent);
	db_printf("dom_ifattach: %p   ", d->dom_ifattach);
	db_printf("dom_ifdetach: %p\n", d->dom_ifdetach);
}
Esempio n. 3
0
static void
db_print_sockbuf(struct sockbuf *sb, const char *sockbufname, int indent)
{

	db_print_indent(indent);
	db_printf("%s at %p\n", sockbufname, sb);

	indent += 2;

	db_print_indent(indent);
	db_printf("sb_state: 0x%x (", sb->sb_state);
	db_print_sbstate(sb->sb_state);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("sb_mb: %p   ", sb->sb_mb);
	db_printf("sb_mbtail: %p   ", sb->sb_mbtail);
	db_printf("sb_lastrecord: %p\n", sb->sb_lastrecord);

	db_print_indent(indent);
	db_printf("sb_sndptr: %p   ", sb->sb_sndptr);
	db_printf("sb_sndptroff: %u\n", sb->sb_sndptroff);

	db_print_indent(indent);
	db_printf("sb_acc: %u   ", sb->sb_acc);
	db_printf("sb_ccc: %u   ", sb->sb_ccc);
	db_printf("sb_hiwat: %u   ", sb->sb_hiwat);
	db_printf("sb_mbcnt: %u   ", sb->sb_mbcnt);
	db_printf("sb_mbmax: %u\n", sb->sb_mbmax);

	db_print_indent(indent);
	db_printf("sb_mcnt: %u   ", sb->sb_mcnt);
	db_printf("sb_ccnt: %u   ", sb->sb_ccnt);
	db_printf("sb_ctl: %u   ", sb->sb_ctl);
	db_printf("sb_lowat: %d   ", sb->sb_lowat);
	db_printf("sb_timeo: %jd\n", sb->sb_timeo);

	db_print_indent(indent);
	db_printf("sb_flags: 0x%x (", sb->sb_flags);
	db_print_sbflags(sb->sb_flags);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("sb_aiojobq first: %p\n", TAILQ_FIRST(&sb->sb_aiojobq));
}
Esempio n. 4
0
static void
db_print_protosw(struct protosw *pr, const char *prname, int indent)
{

	db_print_indent(indent);
	db_printf("%s at %p\n", prname, pr);

	indent += 2;

	db_print_indent(indent);
	db_printf("pr_type: %d   ", pr->pr_type);
	db_printf("pr_domain: %p\n", pr->pr_domain);
	if (pr->pr_domain != NULL)
		db_print_domain(pr->pr_domain, "pr_domain", indent);

	db_print_indent(indent);
	db_printf("pr_protocol: %d\n", pr->pr_protocol);

	db_print_indent(indent);
	db_printf("pr_flags: %d (", pr->pr_flags);
	db_print_prflags(pr->pr_flags);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("pr_input: %p   ", pr->pr_input);
	db_printf("pr_output: %p   ", pr->pr_output);
	db_printf("pr_ctlinput: %p\n", pr->pr_ctlinput);

	db_print_indent(indent);
	db_printf("pr_ctloutput: %p   ", pr->pr_ctloutput);
	db_printf("pr_init: %p\n", pr->pr_init);

	db_print_indent(indent);
	db_printf("pr_fasttimo: %p   ", pr->pr_fasttimo);
	db_printf("pr_slowtimo: %p   ", pr->pr_slowtimo);
	db_printf("pr_drain: %p\n", pr->pr_drain);

	db_print_indent(indent);
}
Esempio n. 5
0
static void
db_print_tcpcb(struct tcpcb *tp, const char *name, int indent)
{

	db_print_indent(indent);
	db_printf("%s at %p\n", name, tp);

	indent += 2;

	db_print_indent(indent);
	db_printf("t_segq first: %p   t_segqlen: %d   t_dupacks: %d\n",
	   LIST_FIRST(&tp->t_segq), tp->t_segqlen, tp->t_dupacks);

	db_print_indent(indent);
	db_printf("tt_rexmt: %p   tt_persist: %p   tt_keep: %p\n",
	    &tp->t_timers->tt_rexmt, &tp->t_timers->tt_persist, &tp->t_timers->tt_keep);

	db_print_indent(indent);
	db_printf("tt_2msl: %p   tt_delack: %p   t_inpcb: %p\n", &tp->t_timers->tt_2msl,
	    &tp->t_timers->tt_delack, tp->t_inpcb);

	db_print_indent(indent);
	db_printf("t_state: %d (", tp->t_state);
	db_print_tstate(tp->t_state);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("t_flags: 0x%x (", tp->t_flags);
	db_print_tflags(tp->t_flags);
	db_printf(")\n");

	db_print_indent(indent);
	db_printf("snd_una: 0x%08x   snd_max: 0x%08x   snd_nxt: x0%08x\n",
	    tp->snd_una, tp->snd_max, tp->snd_nxt);

	db_print_indent(indent);
	db_printf("snd_up: 0x%08x   snd_wl1: 0x%08x   snd_wl2: 0x%08x\n",
	   tp->snd_up, tp->snd_wl1, tp->snd_wl2);

	db_print_indent(indent);
	db_printf("iss: 0x%08x   irs: 0x%08x   rcv_nxt: 0x%08x\n",
	    tp->iss, tp->irs, tp->rcv_nxt);

	db_print_indent(indent);
	db_printf("rcv_adv: 0x%08x   rcv_wnd: %lu   rcv_up: 0x%08x\n",
	    tp->rcv_adv, tp->rcv_wnd, tp->rcv_up);

	db_print_indent(indent);
	db_printf("snd_wnd: %lu   snd_cwnd: %lu   snd_bwnd: %lu\n",
	   tp->snd_wnd, tp->snd_cwnd, tp->snd_bwnd);

	db_print_indent(indent);
	db_printf("snd_ssthresh: %lu   snd_bandwidth: %lu   snd_recover: "
	    "0x%08x\n", tp->snd_ssthresh, tp->snd_bandwidth,
	    tp->snd_recover);

	db_print_indent(indent);
	db_printf("t_maxopd: %u   t_rcvtime: %u   t_startime: %u\n",
	    tp->t_maxopd, tp->t_rcvtime, tp->t_starttime);

	db_print_indent(indent);
	db_printf("t_rttime: %u   t_rtsq: 0x%08x   t_bw_rtttime: %u\n",
	    tp->t_rtttime, tp->t_rtseq, tp->t_bw_rtttime);

	db_print_indent(indent);
	db_printf("t_bw_rtseq: 0x%08x   t_rxtcur: %d   t_maxseg: %u   "
	    "t_srtt: %d\n", tp->t_bw_rtseq, tp->t_rxtcur, tp->t_maxseg,
	    tp->t_srtt);

	db_print_indent(indent);
	db_printf("t_rttvar: %d   t_rxtshift: %d   t_rttmin: %u   "
	    "t_rttbest: %u\n", tp->t_rttvar, tp->t_rxtshift, tp->t_rttmin,
	    tp->t_rttbest);

	db_print_indent(indent);
	db_printf("t_rttupdated: %lu   max_sndwnd: %lu   t_softerror: %d\n",
	    tp->t_rttupdated, tp->max_sndwnd, tp->t_softerror);

	db_print_indent(indent);
	db_printf("t_oobflags: 0x%x (", tp->t_oobflags);
	db_print_toobflags(tp->t_oobflags);
	db_printf(")   t_iobc: 0x%02x\n", tp->t_iobc);

	db_print_indent(indent);
	db_printf("snd_scale: %u   rcv_scale: %u   request_r_scale: %u\n",
	    tp->snd_scale, tp->rcv_scale, tp->request_r_scale);

	db_print_indent(indent);
	db_printf("ts_recent: %u   ts_recent_age: %u\n",
	    tp->ts_recent, tp->ts_recent_age);

	db_print_indent(indent);
	db_printf("ts_offset: %u   last_ack_sent: 0x%08x   snd_cwnd_prev: "
	    "%lu\n", tp->ts_offset, tp->last_ack_sent, tp->snd_cwnd_prev);

	db_print_indent(indent);
	db_printf("snd_ssthresh_prev: %lu   snd_recover_prev: 0x%08x   "
	    "t_badrxtwin: %u\n", tp->snd_ssthresh_prev,
	    tp->snd_recover_prev, tp->t_badrxtwin);

	db_print_indent(indent);
	db_printf("snd_numholes: %d  snd_holes first: %p\n",
	    tp->snd_numholes, TAILQ_FIRST(&tp->snd_holes));

	db_print_indent(indent);
	db_printf("snd_fack: 0x%08x   rcv_numsacks: %d   sack_newdata: "
	    "0x%08x\n", tp->snd_fack, tp->rcv_numsacks, tp->sack_newdata);

	/* Skip sackblks, sackhint. */

	db_print_indent(indent);
	db_printf("t_rttlow: %d   rfbuf_ts: %u   rfbuf_cnt: %d\n",
	    tp->t_rttlow, tp->rfbuf_ts, tp->rfbuf_cnt);
}