OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » networking » discuss

Thread: Feedback on new command line tool for opensolaris networking

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0
darrenr

Posts: 2,060
From:

Registered: 6/8/05
Feedback on new command line tool for opensolaris networking
Posted: May 15, 2006 2:27 PM

  Click to reply to this thread Reply

Back in early April, I posted a message -
http://www.opensolaris.org/jive/thread.jspa?messageID=31285稵
- suggesting a new command line tool called ifgrep.

I was thinking a bit about it last week and got bored enough on the weekend
to spend a few hours coding it up.

If you'd like to try it out, you can download the source code from here:
http://www.opensolaris.org/os/community/networking/files/ifgrep.c

To compile it is easy "cc ifgrep.c -o ifgrep -lsocket -lnsl"

It's functionality is a merge of that available in ps and pgrep. For
example:
ifgrep -f inet -o name,addr,flags
ifgrep -f inet -o name=,addr=

The default output is equivalent to "ifgrep -o name=".

In writing it, I'm also experimenting with a different approach (for me)
to writing command line tools that use getopt.

Although the code is CDDL'd, if you're outside Sun and would like to
contribute a patch that you'd like me to add, I believe you'd need to
go through the normal hoops that require copyright assignment before
I could accept it. However, please feel free to tell me what you do or
do not like about it (output formatting, missing functionality,
functionality
that doesn't work as expected, etc)

Last but not least, this is just something I hacked up over the weekend,
there are currently no plans to include it in Solaris so please don't expect
it to show up anytime soon.

Darren
p.s. I tried with "-lxnet" but required functions are not present there.

_______________________________________________
networking-discuss mailing list
networking-discuss at opensolaris dot org






Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.