Slashdot Mirror


ifconfig refactoring for FreeBSD

Dan writes "Based on Sam Leffer's suggestion, Bruce Simpson has been working on refactoring ifconfig(8). ifconfig is a FreeBSD unix utility used to assign an address to a network interface and/or configure network interface parameters. Bruce says that ifconfig has grown increasingly large and become unwieldy. Part of the effort has been to get a handle on all of the options that are currently supported so he has written a YACC grammar for it. He has uploaded some grammer, created a design document and also generated a PDF file you can view which shows you syntax diagrams for each part of the parse tree."

4 of 125 comments (clear)

  1. Wondering what YACC is? by a.koepke · · Score: 5, Informative

    For those of you who do not know what YACC is all about

    Its good to see something like this happening as ifconfig is not only used on FreeBSD but also on most (all?) Linux distros.

    Ifconfig is just one of the many contributions the BSD projects have given to the Linux and UNIX community.

    PS: To all those "bsd is dying" trolls, things like this show its not. Without the work of the BSD projects you wouldn't have some of the many tools you use each day.

    --


    (\(\
    (^.^)
    (")")
    *This is the cute bunny virus, please copy this into your sig so it can spread
  2. Using ifconfig w/out arguments by RT+Alec · · Score: 5, Informative

    Starting with FreeBSD 4.x, ifconfig with no arguments simply lists all interfaces the kernel has found, and their configuration details.

    %>ifconfig
    de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 10.0.254.254 netmask 0xffff0000 broadcast 10.0.255.255
    ether 00:e0:29:37:09:a8
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    de1: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MU LTICAST> mtu 1500
    inet 10.1.254.254 netmask 0xffff0000 broadcast 10.1.255.255
    ether 00:e0:29:37:09:a9
    media: Ethernet autoselect
    de2: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MU LTICAST> mtu 1500
    inet 10.2.254.254 netmask 0xffff0000 broadcast 10.2.255.255
    ether 00:e0:29:37:0c:d6
    media: Ethernet autoselect
    de3: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 10.3.254.254 netmask 0xffff0000 broadcast 10.3.255.255
    ether 00:e0:29:37:0c:d7
    media: Ethernet autoselect (10baseT/UTP)
    status: active
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet 127.0.0.1 netmask 0xff000000
    wan0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500
    inet 219.51.254.45 --> 219.51.254.46 netmask 0xfffffffc
    %>
    (the actual output has tabs to make the formatting a little prettier)
  3. Re:How about live /etc/rc.conf changes? by changelingyahoo.com · · Score: 5, Informative

    The quick answer is "Yes, you can." In FreeBSD 5 for instance you can change a line in rc.conf and then just rerun the script for the daemon that corresponds to it. It's a bit like the init.d scripts in Linux except with a big global variables file. In FreeBSD 4 you can do it as well, but if I recall the scripts in FreeBSD 4 often lump several daemons together into a single file so you might end up restarting more than one daemon. I may be wrong, though. Brian

  4. GNU ifconfig - What? by Anonymous Coward · · Score: 5, Informative

    There is no "GNU ifconfig". Linux has it's own version which is probably based on an old BSD version, or, maybe written from scratch.

    % ifconfig -V
    net-tools 1.60
    ifconfig 1.42 (2001-04-13)

    You can tell it's not GNU because it doesn't spout on about the GPL everytime you run it.