[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080428114448.GL20815@postel.suug.ch>
Date: Mon, 28 Apr 2008 13:44:48 +0200
From: Thomas Graf <tgraf@...g.ch>
To: Patrick McHardy <kaber@...sh.net>
Cc: hadi@...erus.ca, Stephen Hemminger <shemminger@...tta.com>,
netdev@...r.kernel.org
Subject: Re: PATCH WAS( Re: [ANNOUNCE] iproute2 v2.6.25
* Patrick McHardy <kaber@...sh.net> 2008-04-21 13:50
> jamal wrote:
> >On Sat, 2008-19-04 at 18:45 +0200, Patrick McHardy wrote:
> >
> >>I imagine something like this:
> >>
> >># nl-link-dump env eth0
> >>
> >>LINK_NAME=eth0
> >>LINK_IFINDEX=2
> >>LINK_LLADDR=.....
> >>LINK_OPERSTATE=...
> >>
> >>and so on. You could then do something like this:
> >>
> >>export $(nl-link-dump env eth0)
> >>
> >>and use $LINK_... in your scripts.
> >>
> >
> >Clever. That would certainly help in portability; i will take a closer
> >look on what you did for libnl and see how well it applies for iproute2.
>
> I just noticed the libnl example code already supports this:
>
> $ ./nl-link-dump env dev eth0
> LINK_NAME=eth0
> LINK_IFINDEX=2
> LINK_FAMILY=unspec
> LINK_TYPE=ether
> ...
>
> I wouldn't duplicate it for iproute, but rather complete the
> libnl support (I think some object types are still missing
> ENV dump format support) and tell people to use that for
> scripting.
The framework is there (dump objects via NL_DUMP_ENV) but not all
objects output all attributes yet. It's a low priority item for me
though but I'm happy to accept patches.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists