netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Determine veth peer device?
@ 2009-07-15 23:55 Ben Greear
  2009-07-16 17:45 ` Ben Greear
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2009-07-15 23:55 UTC (permalink / raw)
  To: NetDev

Is there a way to determine the peer device for a
veth interface in user-space?

I didn't see anything obvious printed in 'ip link show'

[root@i7-1qc-1 ~]# ip link show dev veth0
7: veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
     link/ether 72:2e:4d:74:5b:a6 brd ff:ff:ff:ff:ff:ff

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Determine veth peer device?
  2009-07-15 23:55 Determine veth peer device? Ben Greear
@ 2009-07-16 17:45 ` Ben Greear
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Greear @ 2009-07-16 17:45 UTC (permalink / raw)
  To: NetDev

On 07/15/2009 04:55 PM, Ben Greear wrote:
> Is there a way to determine the peer device for a
> veth interface in user-space?
>
> I didn't see anything obvious printed in 'ip link show'
>
> [root@i7-1qc-1 ~]# ip link show dev veth0
> 7: veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP qlen 1000
> link/ether 72:2e:4d:74:5b:a6 brd ff:ff:ff:ff:ff:ff

For the record, can get it via ethtool ioctl:

[root@i7-1qc-1 ~]# ethtool -S veth1
NIC statistics:
      peer_ifindex: 7

Take it easy,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-16 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 23:55 Determine veth peer device? Ben Greear
2009-07-16 17:45 ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).