Changeset 1596

Show
Ignore:
Timestamp:
03/11/10 20:19:05 (5 months ago)
Author:
marek
Message:

batctl: adding batctl bonding mode support

Signed-off-by: Marek Lindner <lindner_marek@…>

Location:
trunk/batctl
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/batctl/main.c

    r1595 r1596  
    4242        printf("Usage: batctl [options] commands \n"); 
    4343        printf("commands:\n"); 
    44         printf(" \tinterface|if  [none|interface]  \tdisplay or modify the interface settings\n"); 
    45         printf(" \toriginators|o                   \tdisplay the originator table\n"); 
    46         printf(" \tinterval|it   [orig_interval]   \tdisplay or modify the originator interval in ms\n"); 
    47         printf(" \tloglevel|ll   [level]           \tdisplay or modify the log level\n"); 
    48         printf(" \tlog|l                           \tread the log produced by the kernel module\n"); 
    49         printf(" \tgw_mode|gw    [mode]            \tdisplay or modify the gateway mode\n"); 
    50         printf(" \tgw_srv_list|gwl                 \tdisplay the gateway server list\n"); 
    51         printf(" \ttranslocal|tl                   \tdisplay the local translation table\n"); 
    52         printf(" \ttransglobal|tg                  \tdisplay the global translation table\n"); 
    53         printf(" \tvis_server|vs [enable|disable]  \tdisplay or modify the status of the VIS server\n"); 
    54         printf(" \tvis_data|vd [dot|JSON]          \tdisplay the VIS data in dot or JSON format\n"); 
    55         printf(" \taggregation|ag   [0|1]          \tdisplay or modify the packet aggregation setting\n"); 
     44        printf(" \tinterface|if   [none|interface]  \tdisplay or modify the interface settings\n"); 
     45        printf(" \toriginators|o                    \tdisplay the originator table\n"); 
     46        printf(" \tinterval|it    [orig_interval]   \tdisplay or modify the originator interval in ms\n"); 
     47        printf(" \tloglevel|ll    [level]           \tdisplay or modify the log level\n"); 
     48        printf(" \tlog|l                            \tread the log produced by the kernel module\n"); 
     49        printf(" \tgw_mode|gw     [mode]            \tdisplay or modify the gateway mode\n"); 
     50        printf(" \tgw_srv_list|gwl                  \tdisplay the gateway server list\n"); 
     51        printf(" \ttranslocal|tl                    \tdisplay the local translation table\n"); 
     52        printf(" \ttransglobal|tg                   \tdisplay the global translation table\n"); 
     53        printf(" \tvis_server|vs  [enable|disable]  \tdisplay or modify the status of the VIS server\n"); 
     54        printf(" \tvis_data|vd    [dot|JSON]        \tdisplay the VIS data in dot or JSON format\n"); 
     55        printf(" \taggregation|ag [0|1]             \tdisplay or modify the packet aggregation setting\n"); 
     56        printf(" \tbonding|b      [0|1]             \tdisplay or modify the bonding mode setting\n"); 
    5657        printf("\n"); 
    57         printf(" \tping|p        <destination>     \tping another batman adv host via layer 2\n"); 
    58         printf(" \ttraceroute|tr <destination>     \ttraceroute another batman adv host via layer 2\n"); 
    59         printf(" \ttcpdump|td    <interface>       \ttcpdump layer 2 traffic on the given interface\n"); 
    60         printf(" \tbisect        <file1> .. <fileN>\tanalyze given log files for routing stability\n"); 
     58        printf(" \tping|p         <destination>     \tping another batman adv host via layer 2\n"); 
     59        printf(" \ttraceroute|tr  <destination>     \ttraceroute another batman adv host via layer 2\n"); 
     60        printf(" \ttcpdump|td     <interface>       \ttcpdump layer 2 traffic on the given interface\n"); 
     61        printf(" \tbisect         <file1> .. <fileN>\tanalyze given log files for routing stability\n"); 
    6162        printf("options:\n"); 
    6263        printf(" \t-h print this help (or 'batctl <command> -h' for the command specific help)\n"); 
     
    145146                ret = handle_sys_setting(argc - 1, argv + 1, SYS_AGGR, aggregation_usage); 
    146147 
     148        } else if ((strcmp(argv[1], "bonding") == 0) || (strcmp(argv[1], "b") == 0)) { 
     149 
     150                ret = handle_sys_setting(argc - 1, argv + 1, SYS_BONDING, bonding_usage); 
     151 
    147152        } else if ((strcmp(argv[1], "bisect") == 0)) { 
    148153 
  • trunk/batctl/man/batctl.8

    r1580 r1596  
    127127aggregation. 
    128128.br 
     129.IP "\fBbonding\fP|\fBb\fP [\fB1\fP|\fB0\fP]" 
     130If no parameter is given the current bonding mode setting is displayed. 
     131Otherwise the parameter is used to enable or disable the bonding mode. 
     132.br 
    129133.IP "\fBping\fP|\fBp\fP [\fB\-c \fP\fIcount\fP][\fB\-i \fP\fIinterval\fP][\fB\-t \fP\fItime\fP][\fB\-R\fP] \fIMAC_address\fP|\fIbat\-host_name\fP" 
    130134Layer 2 ping of a MAC address or bat\-host name.  batctl will try to 
  • trunk/batctl/sys.c

    r1595 r1596  
    178178} 
    179179 
     180void bonding_usage(void) 
     181{ 
     182        printf("Usage: batctl [options] bonding \n"); 
     183        printf("options:\n"); 
     184        printf(" \t -h print this help\n"); 
     185} 
     186 
    180187int handle_sys_setting(int argc, char **argv, char *file_path, void setting_usage(void)) 
    181188{ 
  • trunk/batctl/sys.h

    r1595 r1596  
    2929#define SYS_TRANSTABLE_GLOBAL "transtable_global" 
    3030#define SYS_AGGR "aggregate_ogm" 
     31#define SYS_BONDING "bonding" 
    3132 
    3233void originators_usage(void);