All of lore.kernel.org
 help / color / mirror / Atom feed
* getifaddrs and SocketCAN interfaces
@ 2015-03-28 20:30 Paarvai Naai
  2015-03-29 18:36 ` Oliver Hartkopp
  2015-03-29 22:23 ` Tom Evans
  0 siblings, 2 replies; 5+ messages in thread
From: Paarvai Naai @ 2015-03-28 20:30 UTC (permalink / raw)
  To: linux-can

Hi,

I recently tried using getifaddrs to list all of the SocketCAN
interfaces on my system programmatically.

However, I found that the SocketCAN interfaces do not have their
ifa_addr field in the returned ifaddrs structure set.  This makes it
not possible to identifying the interface as type SocketCAN.
Presumably if the ifa_addr field was set, we could look at the
sa_family field and check if it is AF_CAN.

The other option is to use netlink to query the network devices, but
that is more involved.  Is there an easier way?

Thanks!
Paarvai

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

end of thread, other threads:[~2015-03-30 21:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28 20:30 getifaddrs and SocketCAN interfaces Paarvai Naai
2015-03-29 18:36 ` Oliver Hartkopp
2015-03-29 19:40   ` dev.kurt
2015-03-30 21:46     ` Paarvai Naai
2015-03-29 22:23 ` Tom Evans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.