On Sat, Jan 22, 2011 at 07:07:22PM +0100, Oliver Hartkopp wrote: > > 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 ?!? ok, I'll try to address this question ... > > 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. on a pure j1939 network, a box is intended to use only de addresses given above. I assume that a given box can use multiple addressess, each of them configured with '$ ip addr add ...' > > 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. I disagree here. The way I look at it, is that an CAN device will get 1 (or more, but that a bit more complicated to expleain) SA. Whichever application that binds, will now use that SA. I can then build up my device by different applications, cooperating to form a single entity on CAN (even within the virtual SocketCAN bus). As such, I can have 1 app just spitting out 1 second status message, 1 app sending DM1 msgs, 1 app sending regular IO updates, ....
When adding addresses per socket, each app will need to know what SA it is supposed to work with, which leads to malconfigurations ... I rather compare the addressing of J1939 with IP, or at least I'd like to deal with them in the same way. A node may use e.g. 0x80, but if I want that to change to 0x81, I change it on 1 place and all traffic changes with me. ... I'm quite convinced my concept here is right. Regards, Kurt _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
