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."

6 of 125 comments (clear)

  1. Re:How about live /etc/rc.conf changes? by zulux · · Score: 2, Interesting

    Hmmm...

    Can't you just run /etc/rc.network and it will re-parse rc.conf?

    --

    Moneyed corporations, non-working 'poor' and criminal prisoners are turning productive citizens into tax-slaves.

  2. Re:Wondering what YACC is? by utlemming · · Score: 4, Interesting
    No, the problem is that when you actually submit an interesting BSD article for /., they ignore it. For example, how many of us BSD users knew that the BSD developers actually commented on the SCO suit?
    "Your story just might not be interesting!

    This last one requires a little explanation: if you submit a story, and we don't select it because we think it's not particularly interesting, we're not making a judgment about you as a human being. Deciding the interest level of a story is a very subjective thing, and we have to take into account not only the intrinsic interest of the story itself, but what else is happening that day. On a day when lots of things are happening, we reject some very good stories. But on a day when nothing interesting is happening, we may post something not really as cool.

    This was taken from the /. FAQ

    The conclusion that I have come to is that the /. editors just don't care about BSD. And the editors probably use the above quote to get out of anything us BSD users might find interesting. Mathmatically, it would be represented, "Linux == Interesting; BSD != Linux; BSD != Interesting" and since "BSD != Linux then BSD MUST be dying."

    And I think that your absolutely right, about them not knowing what is worthy of reporting and what is not. When I first read the Refacturing of IFCONFIG, the thought that went through my mind was, "Who cares?" It really has no bearing on the useability of the OS. I think the real issue is that /. needs to put some one who actually uses BSD as an OS doing the editing. I think then, we might see some interesting.

    Personally I think that the comment about BSD users getting BSD news elsewhere is pretty insightful. The only reason I read /. is because there are other technology issues which I am interested in and the Linux movement does facinate me. But nontheless, with the general bigotted spirit towards the BSD's, I can see why I, and most likely others go elsewhere.

    A while back I fired off an email to address the concerns of us BSD users. The reply I got back from CdrTaco was essentially if more BSD users read /., then the trolls would be silenced with more BSD users moderating, and more /. stories would be about BSD, because there would be more submissions.

    Well, I'll get off my soap box now, and wait till I get moderated down. Any bets on what it will be? Flamebait? Or maybe Off Topic. But moderators, if I can not be insightful or interesting, please vote for Flamebait.

    --
    The views expressed are mine own and do not express the views of my employer.
  3. Nice to see work on improving ifconfig by nutznboltz · · Score: 3, Interesting
    Now if only the ARP interface could be improved too. Seems once the API for ARP was an ioctl() that was easy to use. Now try and write some code for *BSD to adjust the ARP table without going
    • system("/usr/sbin/arp ...")
    and you will see pretty quickly that it's much more complicated than any ioctl()

    Conceptually, ARP table entries as routing table entries is great but the API is in need of some serious re-working or a library to hide the complexity.
  4. Re:Wondering what YACC is? by edhall · · Score: 4, Interesting

    The ifconfig thread is interesting from a number of perspectives. Given that ifconfig is perhaps the command-line utility embodying BSD's decades-old networking legacy, it takes some courage to propose a radical reworking of it. Using a formal grammar rather than the ad hoc accretion of command-line options that 95% of Unix/Linux utilities use is another bold step. And opening the way to added functionality (one of the motivations for this project) adds to the interest. Sure, just looking at the surface it's easy to say "so they're changing some arguments to some crufty old Unix command -- ho hum." But it may well represent the initial step in a complete rethinking of how networking is administered at the host level. Even if it doesn't pan out that way, it's worth taking notice.

    BTW, I don't moderate BSD stories any more. When I mod down the trolls, I tend to get slammed in metamod. (Talk about a hostile environment!) Hope springs eternal, though -- I keep thinking that /. will eventually start doing some housekeeping.

    -Ed
  5. Re:Linux's iproute2+tc by chrysalis · · Score: 2, Interesting

    Please mod this up.

    "ip" is definitely great and I really miss that command on BSD systems.

    Not only it is way more powerful that ifconfig, it is also easier to use, with a very logical and comprehensive syntax ("ip route add default via 192.168.1.221")

    Refactoring "ifconfig" nowadays sounds like a total waste of time IMHO. Hopefully Dragonfly will take a more modern approach.

    --
    {{.sig}}
  6. Re:Linux's iproute2+tc by df5ea · · Score: 1, Interesting

    You can do everything ifconfig + iptables using ip + tc and more.

    Try to do ifconfig eth0 allmulti with ip.

    --
    echo -n blabla | md5sum | cut -b 1-5