On 21.01.2011 16:20, Kurt Van Dijck wrote: > On Fri, Jan 21, 2011 at 03:49:54PM +0100, Oliver Hartkopp wrote: >> On 21.01.2011 14:39, Kurt Van Dijck wrote: >> >>> I resumed work on a j1939 implementation. I got stuck in modifying iproute2 >>> since j1939 implies an addressing concept. >>> >>> If I were to create a netlink interface that allows me to: >>> $ ip -f j1939 addr add 0x90 dev can0, >>> I would have registered j1939 address operations in a seperate af_family. >> >> I think this would still be part of AF_CAN ... > so: > $ ip -f can addr add j1939 0x90 dev can0 .... > > That is ok as well
Independently from the fact that i do not have any general objections to add some infrastructure to af_can.c to redirect netlink messages, i wonder if your address concept is addressing the correct layer ?!? If you tweak your CAN protocol with addresses bound to a specific CAN interface this has a system-wide effect. So your Linux box can only act as a specific J1939 node as restricted by the given addresses above. The idea of SocketCAN is to have independent CAN applications on a single host that may communicate with each other - not knowing whether they are on the same host or on different hosts. IMHO the addresses for CAN protocols need to be specified on a per-socket basis - and not as a system-wide restriction bound to CAN interfaces. E.g. would the definition of additional addresses via sockopt similar to the CAN_RAW-filters before binding the socket be a better solution? Regards, Oliver _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
