* Luis R. Rodriguez <mcg...@qca.qualcomm.com> [10.09.2013 09:32]:
> On Fri, Sep 6, 2013 at 12:39 PM, Luis R. Rodriguez
> <mcg...@qca.qualcomm.com> wrote:
> > From: "Luis R. Rodriguez" <mcg...@qca.qualcomm.com>
> >
> > iw is to iwconfig as
> > ip is to ifconfig
> >
> > As with iwconfig, ifconfig is deprecated, promote usage of ip
> > using netlink.
> >
> > Signed-off-by: Luis R. Rodriguez <mcg...@qca.qualcomm.com>
> 
> Actually perhaps its best to enable iproute2 package instead.

This is discussion is old, an there are some reasons not to switch.
Mostly because of size und that most functions which are possible with
'ip' are not used in standard builts. if we switch to 'ip' we should
also drop 'ifconfig','netstat' and 'route'.

a quick 'git grep' show usage of 'ifconfig' in preinit-scripts and
'/lib/wifi/hostap.sh' + /lib/wifi/mac80211.sh (see appendix), but all
of them can be converted.

i would like to see openwrt with a modern 'ip' - but i'am mostly alone 8-)

some size-related facts on ar71xx:

 99439 bytes - ip_3.10.0-1
229047 bytes - busybox_1.19.4-7(standard openrt)
218418 bytes - busybox without ifconfig, netstat, route

so we add ~80k to a standard built. i'am ok with this, because we also
add a lot of features and possibilities which are simply not possible
with ifconfig/route/netstat.

the busybox-native ip-command is limited/uncomplete and we should not discuss
it at the moment IMHO.

bye, bastian
package/base-files/files/lib/preinit/10_indicate_preinit:       ifconfig 
$pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
package/base-files/files/lib/preinit/10_indicate_preinit:       ifconfig 
$pi_ifname 0.0.0.0 down
package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh:                  
ifconfig "$dev" down 2>/dev/null >/dev/null && {
package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh:          #append if_up 
"ifconfig $ifname up" ";$N"
package/kernel/hostap-driver/files/lib/wifi/hostap.sh:          ifconfig "$1" 
down
package/kernel/hostap-driver/files/lib/wifi/hostap.sh:                          
                ifconfig "$ifname" down
package/kernel/hostap-driver/files/lib/wifi/hostap.sh:                          
                ifconfig "$ifname" down
package/kernel/mac80211/files/lib/wifi/mac80211.sh:             ifconfig 
"$wdev" down 2>/dev/null
package/kernel/mac80211/files/lib/wifi/mac80211.sh:             [ "$mode" = 
"ap" ] || ifconfig "$ifname" hw ether "$vif_mac"
package/kernel/mac80211/files/lib/wifi/mac80211.sh:             [ "$mode" = 
"ap" ] || ifconfig "$ifname" up
package/kernel/mac80211/files/lib/wifi/mac80211.sh:                             
                        ifconfig "$ifname" down
package/kernel/mac80211/files/lib/wifi/mac80211.sh:                             
                ifconfig "$ifname" down
package/kernel/switch/files/switch.sh:          ifconfig "$dev" up
package/kernel/trelay/files/trelay.init:        ifconfig "$dev1" up
package/kernel/trelay/files/trelay.init:        ifconfig "$dev2" up
package/network/config/netifd/files/usr/share/udhcpc/default.script:    echo 
"udhcpc: ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast 
${broadcast:-+}"
package/network/config/netifd/files/usr/share/udhcpc/default.script:    
ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast 
${broadcast:-+}
package/network/config/netifd/files/usr/share/udhcpc/default.script:            
ifconfig "$interface" 0.0.0.0
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh:               
export dev_${dir}="ifconfig $dev up txqueuelen 5 >&- 2>&-
package/network/config/swconfig/files/switch.sh:        [ -d 
"/sys/class/net/$name" ] && ifconfig "$name" up
package/network/services/authsae/files/lib/wifi/authsae.sh:     ifconfig 
"$ifname" up
package/network/services/dropbear/files/dropbear.init:                  
ifconfig "$ifname" | sed -ne '
package/network/services/openvpn/Makefile:      IFCONFIG=/sbin/ifconfig \
package/network/services/openvpn/files/openvpn.init:            http_proxy 
http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
package/utils/admswconfig/files/admswswitch.sh: ifconfig eth$1 down
package/utils/admswconfig/files/admswswitch.sh: ifconfig eth$1 up
package/utils/busybox/config/networking/Config.in:        If ifconfig is called 
with no arguments it will display the status
package/utils/busybox/config/networking/Config.in:        Setting this will 
make ifconfig attempt to find the broadcast
package/utils/busybox/config/networking/Config.in:      bool "Use busybox 
ifconfig and route applets"
package/utils/busybox/config/shell/Config.in:     busybox to use the ifconfig 
busybox applet. Specifying the fully
package/utils/busybox/config/shell/Config.in:     execute the /sbin/ifconfig 
executable on the filesystem. This option
target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx:     [ ! -z 
$mac ] && ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx:     [ ! -z 
$mac ] && ifconfig eth1 hw ether $mac 2>/dev/null
target/linux/atheros/base-files/lib/preinit/15_preinit_iface_atheros:           
                ifconfig eth0 up                
target/linux/atheros/base-files/lib/preinit/15_preinit_iface_atheros:           
ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
target/linux/atheros/base-files/lib/preinit/15_preinit_iface_atheros:           
ifconfig $pi_ifname down
target/linux/atheros/base-files/lib/preinit/15_preinit_iface_atheros:           
ifconfig $pi_ifname 0.0.0.0
target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch:+ * 'ifconfig bond0 
down' is run. If it calls free_irq then
target/linux/atheros/patches-3.8/110-ar2313_ethernet.patch:+ * 'ifconfig bond0 
down' is run. If it calls free_irq then
target/linux/brcm47xx/base-files/lib/preinit/05_init_interfaces_brcm:   
ifconfig $ifname 0.0.0.0 up
target/linux/brcm47xx/base-files/lib/preinit/05_set_failsafe_switch_brcm:       
        ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast 
up
target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx:
                ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast 
$pi_broadcast up
target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx:       
ifconfig $ifname 0.0.0.0 up
target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx: 
        ifconfig $ifname 0.0.0.0 down
target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx: 
                ifconfig $pi_ifname 0.0.0.0 down
target/linux/ep93xx/base-files/lib/preinit/05_set_ether_mac_rdc:        
ifconfig eth0 hw ether $mac
target/linux/ep93xx/patches-3.6/001-ep93xx_cpuinfo.patch:pre-up ifconfig eth0 
hw ether `sed -n 's/^Serial.* 000000/02/p' /proc/cpuinfo`
target/linux/ep93xx/patches-3.8/001-ep93xx_cpuinfo.patch:pre-up ifconfig eth0 
hw ether `sed -n 's/^Serial.* 000000/02/p' /proc/cpuinfo`
target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini:     
ifconfig eth0 hw ether $MAC1 2>/dev/null
target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini:     
ifconfig eth1 hw ether $MAC2 2>/dev/null
target/linux/generic/files/crypto/ocf/kirkwood/mvHal/mv_hal/eth/gbe/mvEth.c:* 
NOTE: main usage is to enable the port after ifconfig up.
target/linux/generic/files/crypto/ocf/kirkwood/mvHal/mv_hal/eth/gbe/mvEth.c:* 
NOTE: main usage is to disable the port after ifconfig down.
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:             
if [ "$(ifconfig $npe 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:             
        ifconfig $npe hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n 
npe_"$npe"_esa)
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:     if [ 
"$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:             
        ifconfig eth0 hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n 
zcom_npe_esa)
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:     if [ 
"$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:             
ifconfig eth0 hw ether 00:11:22:33:44:55
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:     if [ 
"$(ifconfig eth1 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx:             
ifconfig eth1 hw ether 00:11:22:33:44:56
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:                
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac:            
ifconfig eth0 hw ether $mac 2>/dev/null
target/linux/uml/README:you should be able to ifconfig the interface and talk 
to the host side, or, if you
target/linux/x86/rdc/base-files/lib/preinit/05_set_ether_mac_rdc:               
ifconfig eth0 hw ether "$mac0"
target/linux/x86/rdc/base-files/lib/preinit/05_set_ether_mac_rdc:               
ifconfig eth1 hw ether "$mac1"
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to