version 1.25, 2011/09/09 00:40:54 |
version 1.26, 2011/10/01 06:23:53 |
|
|
static const char *allowed_kvars[] = { |
static const char *allowed_kvars[] = { |
"inpcb.inp_flags", |
"inpcb.inp_flags", |
"sockb.so_rcv.sb_cc", |
"sockb.so_rcv.sb_cc", |
"sockb.so_rcv.sb_wat", |
|
"sockb.so_rcv.sb_hiwat", |
"sockb.so_rcv.sb_hiwat", |
|
"sockb.so_rcv.sb_wat", |
"sockb.so_snd.sb_cc", |
"sockb.so_snd.sb_cc", |
"sockb.so_snd.sb_wat", |
|
"sockb.so_snd.sb_hiwat", |
"sockb.so_snd.sb_hiwat", |
"tcpcb.snd_una", |
"sockb.so_snd.sb_wat", |
|
"tcpcb.last_ack_sent", |
|
"tcpcb.max_sndwnd", |
|
"tcpcb.rcv_adv", |
|
"tcpcb.rcv_nxt", |
|
"tcpcb.rcv_scale", |
|
"tcpcb.rcv_wnd", |
|
"tcpcb.rfbuf_cnt", |
|
"tcpcb.rfbuf_ts", |
|
"tcpcb.snd_cwnd", |
|
"tcpcb.snd_max", |
"tcpcb.snd_nxt", |
"tcpcb.snd_nxt", |
|
"tcpcb.snd_scale", |
|
"tcpcb.snd_ssthresh", |
|
"tcpcb.snd_una", |
"tcpcb.snd_wl1", |
"tcpcb.snd_wl1", |
"tcpcb.snd_wl2", |
"tcpcb.snd_wl2", |
"tcpcb.snd_wnd", |
"tcpcb.snd_wnd", |
"tcpcb.rcv_wnd", |
|
"tcpcb.rcv_nxt", |
|
"tcpcb.rcv_adv", |
|
"tcpcb.snd_max", |
|
"tcpcb.snd_cwnd", |
|
"tcpcb.snd_ssthresh", |
|
"tcpcb.t_rcvtime", |
"tcpcb.t_rcvtime", |
"tcpcb.t_rtttime", |
|
"tcpcb.t_rtseq", |
"tcpcb.t_rtseq", |
"tcpcb.t_srtt", |
|
"tcpcb.t_rttvar", |
|
"tcpcb.t_rttmin", |
"tcpcb.t_rttmin", |
"tcpcb.max_sndwnd", |
"tcpcb.t_rtttime", |
"tcpcb.snd_scale", |
"tcpcb.t_rttvar", |
"tcpcb.rcv_scale", |
"tcpcb.t_srtt", |
"tcpcb.last_ack_sent", |
|
"tcpcb.rfbuf_cnt", |
|
"tcpcb.rfbuf_ts", |
|
"tcpcb.ts_recent_age", |
|
"tcpcb.ts_recent", |
"tcpcb.ts_recent", |
|
"tcpcb.ts_recent_age", |
NULL |
NULL |
}; |
}; |
|
|
|
|
{ |
{ |
u_int i; |
u_int i; |
|
|
fprintf(stderr, "Supported kernel variables:\n"); |
printf("Supported kernel variables:\n"); |
for (i = 0; allowed_kvars[i] != NULL; i++) |
for (i = 0; allowed_kvars[i] != NULL; i++) |
fprintf(stderr, "\t%s\n", allowed_kvars[i]); |
printf("\t%s\n", allowed_kvars[i]); |
} |
} |
|
|
static char ** |
static char ** |
|
|
} |
} |
P(inpcb, inp_flags, "0x%08x") |
P(inpcb, inp_flags, "0x%08x") |
P(sockb, so_rcv.sb_cc, "%lu") |
P(sockb, so_rcv.sb_cc, "%lu") |
P(sockb, so_rcv.sb_wat, "%lu") |
|
P(sockb, so_rcv.sb_hiwat, "%lu") |
P(sockb, so_rcv.sb_hiwat, "%lu") |
|
P(sockb, so_rcv.sb_wat, "%lu") |
P(sockb, so_snd.sb_cc, "%lu") |
P(sockb, so_snd.sb_cc, "%lu") |
P(sockb, so_snd.sb_wat, "%lu") |
|
P(sockb, so_snd.sb_hiwat, "%lu") |
P(sockb, so_snd.sb_hiwat, "%lu") |
P(tcpcb, snd_una, "%u") |
P(sockb, so_snd.sb_wat, "%lu") |
|
P(tcpcb, last_ack_sent, "%u") |
|
P(tcpcb, max_sndwnd, "%lu") |
|
P(tcpcb, rcv_adv, "%u") |
|
P(tcpcb, rcv_nxt, "%u") |
|
P(tcpcb, rcv_scale, "%u") |
|
P(tcpcb, rcv_wnd, "%lu") |
|
P(tcpcb, rfbuf_cnt, "%u") |
|
P(tcpcb, rfbuf_ts, "%u") |
|
P(tcpcb, snd_cwnd, "%lu") |
|
P(tcpcb, snd_max, "%u") |
P(tcpcb, snd_nxt, "%u") |
P(tcpcb, snd_nxt, "%u") |
|
P(tcpcb, snd_scale, "%u") |
|
P(tcpcb, snd_ssthresh, "%lu") |
|
P(tcpcb, snd_una, "%u") |
P(tcpcb, snd_wl1, "%u") |
P(tcpcb, snd_wl1, "%u") |
P(tcpcb, snd_wl2, "%u") |
P(tcpcb, snd_wl2, "%u") |
P(tcpcb, snd_wnd, "%lu") |
P(tcpcb, snd_wnd, "%lu") |
P(tcpcb, rcv_wnd, "%lu") |
|
P(tcpcb, rcv_nxt, "%u") |
|
P(tcpcb, rcv_adv, "%u") |
|
P(tcpcb, snd_max, "%u") |
|
P(tcpcb, snd_cwnd, "%lu") |
|
P(tcpcb, snd_ssthresh, "%lu") |
|
P(tcpcb, t_rcvtime, "%u") |
P(tcpcb, t_rcvtime, "%u") |
P(tcpcb, t_rtttime, "%u") |
|
P(tcpcb, t_rtseq, "%u") |
P(tcpcb, t_rtseq, "%u") |
P(tcpcb, t_srtt, "%hu") |
|
P(tcpcb, t_rttvar, "%hu") |
|
P(tcpcb, t_rttmin, "%hu") |
P(tcpcb, t_rttmin, "%hu") |
P(tcpcb, max_sndwnd, "%lu") |
P(tcpcb, t_rtttime, "%u") |
P(tcpcb, snd_scale, "%u") |
P(tcpcb, t_rttvar, "%hu") |
P(tcpcb, rcv_scale, "%u") |
P(tcpcb, t_srtt, "%hu") |
P(tcpcb, last_ack_sent, "%u") |
|
P(tcpcb, rfbuf_cnt, "%u") |
|
P(tcpcb, rfbuf_ts, "%u") |
|
P(tcpcb, ts_recent_age, "%u") |
|
P(tcpcb, ts_recent, "%u") |
P(tcpcb, ts_recent, "%u") |
|
P(tcpcb, ts_recent_age, "%u") |
#undef S |
#undef S |
#undef P |
#undef P |
} |
} |
|
|
struct statctx *udp_sc = NULL; |
struct statctx *udp_sc = NULL; |
|
|
/* Init world */ |
/* Init world */ |
|
setlinebuf(stdout); |
ptb = &tcpbench; |
ptb = &tcpbench; |
ptb->dummybuf_len = 0; |
ptb->dummybuf_len = 0; |
ptb->Sflag = ptb->sflag = ptb->vflag = ptb->Vflag = 0; |
ptb->Sflag = ptb->sflag = ptb->vflag = ptb->Vflag = 0; |