Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/networking/brctl.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/networking/brctl.c
r2725 r3232 13 13 * At the time of this writing this was considered a feature. 14 14 */ 15 16 //usage:#define brctl_trivial_usage 17 //usage: "COMMAND [BRIDGE [INTERFACE]]" 18 //usage:#define brctl_full_usage "\n\n" 19 //usage: "Manage ethernet bridges\n" 20 //usage: "\nCommands:" 21 //usage: IF_FEATURE_BRCTL_SHOW( 22 //usage: "\n show Show a list of bridges" 23 //usage: ) 24 //usage: "\n addbr BRIDGE Create BRIDGE" 25 //usage: "\n delbr BRIDGE Delete BRIDGE" 26 //usage: "\n addif BRIDGE IFACE Add IFACE to BRIDGE" 27 //usage: "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" 28 //usage: IF_FEATURE_BRCTL_FANCY( 29 //usage: "\n setageing BRIDGE TIME Set ageing time" 30 //usage: "\n setfd BRIDGE TIME Set bridge forward delay" 31 //usage: "\n sethello BRIDGE TIME Set hello time" 32 //usage: "\n setmaxage BRIDGE TIME Set max message age" 33 //usage: "\n setpathcost BRIDGE COST Set path cost" 34 //usage: "\n setportprio BRIDGE PRIO Set port priority" 35 //usage: "\n setbridgeprio BRIDGE PRIO Set bridge priority" 36 //usage: "\n stp BRIDGE [1/yes/on|0/no/off] STP on/off" 37 //usage: ) 38 15 39 #include "libbb.h" 16 40 #include <linux/sockios.h> … … 44 68 45 69 /* FIXME: These 4 funcs are not really clean and could be improved */ 46 static ALWAYS_INLINE void strtotimeval(struct timeval *tv,70 static ALWAYS_INLINE void bb_strtotimeval(struct timeval *tv, 47 71 const char *time_str) 48 72 { … … 81 105 { 82 106 struct timeval tv; 83 strtotimeval(&tv, time_str);107 bb_strtotimeval(&tv, time_str); 84 108 return tv_to_jiffies(&tv); 85 109 } … … 106 130 "setpathcost\0" "setportprio\0" "setbridgeprio\0" 107 131 ) 108 IF_FEATURE_BRCTL_SHOW("show macs\0" "show\0");132 IF_FEATURE_BRCTL_SHOW("show\0"); 109 133 110 134 enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif 111 135 IF_FEATURE_BRCTL_FANCY(, 112 113 114 136 ARG_stp, 137 ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage, 138 ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio 115 139 ) 116 IF_FEATURE_BRCTL_SHOW(, ARG_show macs, ARG_show)140 IF_FEATURE_BRCTL_SHOW(, ARG_show) 117 141 }; 118 142 … … 262 286 memset(ifidx, 0, sizeof ifidx); 263 287 arm_ioctl(args, BRCTL_GET_PORT_LIST, (unsigned long)ifidx, 264 288 MAX_PORTS); 265 289 xioctl(fd, SIOCDEVPRIVATE, &ifr); 266 290 for (i = 0; i < MAX_PORTS; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.