On 4/5/06, Darren Reed <[EMAIL PROTECTED]> wrote:
> Program or suite of programs?
>
> Should we try develop something for networking that has a similar
> level of functionality to the tools for processes?  pkill, pgrep, etc.
>
> So rather than doing "ifconfig -a4 up", you might do something like:
> ifgrep inet | ipadm up

Now I see where you are going with this.  The ifgrep sounded kinda
hokey, but put into the context of pgrep et. al., I think I could grow
to like it.

In a previous message you suggested "ifconfig -a | ifgrep zone X".  I
think that the "ifconfig -a |" should be implied.  In other words, for
parallelism with the proc tools, it should be:

# ifgrep zone X
lo0:3
bge0:3

# ifgrep zone X | xargs ifconfig
lo0:3: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
        zone X
bge0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.1.1.3 netmask ffffff00 broadcast 10.1.1.255
        zone X

Similarly, the following commands should work:

ifgrep mtu 1500
ifgrep inet $(getent hosts $(uname -n | awk '{print $1}'))
ifgrep ether 8:0:20:60:C0:DE

And maybe the following:

ifgrep flag up
ifgrep flag deprecated
ifgrep flag noxmit
ifgrep flag ipv4

And in the spirit of grep options, be sure that -v inverts the
selection.  Presumably combining multiple terms would be good as well.

Mike

--
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to