Hello,
I am in the process of adding j1939 support in the linux kernel.
J1939 is a protocol on CAN, with addressing support. Therefore,
I'm tweaking in iproute2 as well, to extend the
$ ip address
output.
I have in kernel space
rtnl_register(PF_CAN, RTM_GETADDR, NULL, j1939_nl_dump_ifaddr);
This 'j1939_nl_dump_ifaddr' does not dump 'struct sockaddr *', but
an ad-hoc format.
After I get a basic setup working, I tried calling 'getifaddrs'.
If I do 'getifaddrs', this callback is called, but
I do not understand how glibc (or any other libc) is capable of transforming
the rtnetlink address info into proper 'struct sockaddr_can *'.
I looked at AF_INET & AF_DECnet, and it seems I'm not supposed to
dump a 'struct sockaddr_can' over rtnetlink. Is 'getifaddrs' then doomed
to only work for INET addresses only?
Any idea's?
Thanks,
Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core