Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (6 years ago)
Author:
bruno
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/networking/ifenslave.c

    r2725 r3232  
    9898 *         set version to 1.1.0
    9999 */
     100
     101//usage:#define ifenslave_trivial_usage
     102//usage:       "[-cdf] MASTER_IFACE SLAVE_IFACE..."
     103//usage:#define ifenslave_full_usage "\n\n"
     104//usage:       "Configure network interfaces for parallel routing\n"
     105//usage:     "\n    -c,--change-active  Change active slave"
     106//usage:     "\n    -d,--detach     Remove slave interface from bonding device"
     107//usage:     "\n    -f,--force      Force, even if interface is not Ethernet"
     108/* //usage:  "\n    -r,--receive-slave  Create a receive-only slave" */
     109//usage:
     110//usage:#define ifenslave_example_usage
     111//usage:       "To create a bond device, simply follow these three steps:\n"
     112//usage:       "- ensure that the required drivers are properly loaded:\n"
     113//usage:       "  # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n"
     114//usage:       "- assign an IP address to the bond device:\n"
     115//usage:       "  # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n"
     116//usage:       "- attach all the interfaces you need to the bond device:\n"
     117//usage:       "  # ifenslave bond0 eth0 eth1 eth2\n"
     118//usage:       "  If bond0 didn't have a MAC address, it will take eth0's. Then, all\n"
     119//usage:       "  interfaces attached AFTER this assignment will get the same MAC addr.\n\n"
     120//usage:       "  To detach a dead interface without setting the bond device down:\n"
     121//usage:       "  # ifenslave -d bond0 eth1\n\n"
     122//usage:       "  To set the bond device down and automatically release all the slaves:\n"
     123//usage:       "  # ifconfig bond0 down\n\n"
     124//usage:       "  To change active slave:\n"
     125//usage:       "  # ifenslave -c bond0 eth0\n"
    100126
    101127#include "libbb.h"
     
    245271            ifr.ifr_addr.sa_family = AF_INET;
    246272            memset(ifr.ifr_addr.sa_data, 0,
    247                    sizeof(ifr.ifr_addr.sa_data));
     273                sizeof(ifr.ifr_addr.sa_data));
    248274        }
    249275
     
    521547    /* Neither -c[hange] nor -d[etach] -> it's "enslave" then;
    522548     * and -f[orce] is not there too. Check that it's ethernet. */
    523     if (!(opt & (OPT_d|OPT_c|OPT_f)) {
     549    if (!(opt & (OPT_d|OPT_c|OPT_f))) {
    524550        /* The family '1' is ARPHRD_ETHER for ethernet. */
    525551        if (master.hwaddr.ifr_hwaddr.sa_family != 1) {
Note: See TracChangeset for help on using the changeset viewer.