version 1.22, 2009/01/27 09:18:37 |
version 1.23, 2009/03/29 21:51:54 |
|
|
void print_mb(void); |
void print_mb(void); |
int read_mb(void); |
int read_mb(void); |
int select_mb(void); |
int select_mb(void); |
static void |
static void showmbuf(struct if_info *, int, int); |
showmbuf(struct if_info *, int); |
|
|
|
|
|
/* Define fields */ |
/* Define fields */ |
|
|
{ |
{ |
int i, p, n, count = 0; |
int i, p, n, count = 0; |
|
|
showmbuf(interfaces, -1); |
showmbuf(interfaces, -1, 1); |
|
|
for (n = i = 0; i < num_ifs; i++) { |
for (n = i = 0; i < num_ifs; i++) { |
struct if_info *ifi = &interfaces[i]; |
struct if_info *ifi = &interfaces[i]; |
int pcnt = count; |
int pcnt = count; |
|
int showif = i; |
|
|
if (maxprint > 0 && count >= maxprint) |
if (maxprint > 0 && count >= maxprint) |
return; |
return; |
|
|
|
|
if (mp->mcl_alive == 0) |
if (mp->mcl_alive == 0) |
continue; |
continue; |
if (n++ >= dispstart) { |
if (n++ >= dispstart) { |
showmbuf(ifi, p); |
showmbuf(ifi, p, showif); |
|
showif = 0; |
count++; |
count++; |
} |
} |
} |
} |
|
|
if (i && pcnt == count) { |
if (i && pcnt == count) { |
/* only print the first line */ |
/* only print the first line */ |
if (n++ >= dispstart) { |
if (n++ >= dispstart) { |
showmbuf(ifi, -1); |
showmbuf(ifi, -1, 1); |
count++; |
count++; |
} |
} |
} |
} |
|
|
|
|
|
|
static void |
static void |
showmbuf(struct if_info *ifi, int p) |
showmbuf(struct if_info *ifi, int p, int showif) |
{ |
{ |
int i; |
int i; |
|
|
if (p == -1 || (p == 0 && ifi != interfaces)) { |
if (showif) |
print_fld_str(FLD_MB_IFACE, ifi->name); |
print_fld_str(FLD_MB_IFACE, ifi->name); |
} |
|
|
|
if (p == -1 && ifi == interfaces) { |
if (p == -1 && ifi == interfaces) { |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |