wprobe_request_data(dev, NULL);
list_for_each_entry(attr, &dev->global_attr, list) {
if (simple_mode) {
wprobe_request_data(dev, NULL);
list_for_each_entry(attr, &dev->global_attr, list) {
if (simple_mode) {
fprintf(stdout, "[global]\n");
fprintf(stdout, "%s=%s\n", attr->name, wprobe_dump_value(attr));
} else {
fprintf(stdout, "[global]\n");
fprintf(stdout, "%s=%s\n", attr->name, wprobe_dump_value(attr));
} else {
wprobe_request_data(dev, link->addr);
list_for_each_entry(attr, &dev->link_attr, list) {
if (first) {
wprobe_request_data(dev, link->addr);
list_for_each_entry(attr, &dev->link_attr, list) {
if (first) {
"[%02x:%02x:%02x:%02x:%02x:%02x]\n%s=%s\n" :
"%02x:%02x:%02x:%02x:%02x:%02x: %s=%s\n"),
link->addr[0], link->addr[1], link->addr[2],
"[%02x:%02x:%02x:%02x:%02x:%02x]\n%s=%s\n" :
"%02x:%02x:%02x:%02x:%02x:%02x: %s=%s\n"),
link->addr[0], link->addr[1], link->addr[2],
" -c: Only apply configuration\n"
" -d: Delay between measurement dumps (in milliseconds, default: 1000)\n"
" -c: Only apply configuration\n"
" -d: Delay between measurement dumps (in milliseconds, default: 1000)\n"
" -f: Dump contents of layer 2 filter counters during measurement\n"
" -F <file>: Apply layer 2 filters from <file>\n"
" -h: This help text\n"
" -i <interval>: Set measurement interval\n"
" -m: Run measurement loop\n"
" -p: Set the TCP port for server/client (default: 17990)\n"
" -f: Dump contents of layer 2 filter counters during measurement\n"
" -F <file>: Apply layer 2 filters from <file>\n"
" -h: This help text\n"
" -i <interval>: Set measurement interval\n"
" -m: Run measurement loop\n"
" -p: Set the TCP port for server/client (default: 17990)\n"
attr->name, attr_typestr[attr->type]);
}
list_for_each_entry(attr, &dev->link_attr, list) {
attr->name, attr_typestr[attr->type]);
}
list_for_each_entry(attr, &dev->link_attr, list) {
static void show_filter(void *arg, const char *group, struct wprobe_filter_item *items, int n_items)
{
int i;
static void show_filter(void *arg, const char *group, struct wprobe_filter_item *items, int n_items)
{
int i;
items[i].name, items[i].tx, items[i].rx);
}
}
static void loop_measurement(struct wprobe_iface *dev, bool print_filters, unsigned long delay)
{
items[i].name, items[i].tx, items[i].rx);
}
}
static void loop_measurement(struct wprobe_iface *dev, bool print_filters, unsigned long delay)
{
wprobe_update_links(dev);
wprobe_dump_data(dev);
if (print_filters)
wprobe_dump_filters(dev, simple_mode ? show_filter_simple : show_filter, NULL);
wprobe_update_links(dev);
wprobe_dump_data(dev);
if (print_filters)
wprobe_dump_filters(dev, simple_mode ? show_filter_simple : show_filter, NULL);
if (!strcmp(argv[1], "-P")) {
while ((ch = getopt(argc - 1, argv + 1, "p:")) != -1) {
switch(ch) {
if (!strcmp(argv[1], "-P")) {
while ((ch = getopt(argc - 1, argv + 1, "p:")) != -1) {
switch(ch) {