From: Kurt Van Dijck Subject: Re: can-j1939 API Date: Mon, 2 Nov 2015 13:29:13 +0100 Message-ID: <20151102122913.GA25072@airbook.eia.lan> References: <20150929194920.GA11430@airbook.vandijck-laurijssen.be> <20151018023225.GA29078@airbook.vandijck-laurijssen.be> <20151019204442.GA16852@airbook.vandijck-laurijssen.be> <20151023111430.GB22388@airbook.eia.lan> <56327492.9030405@hartkopp.net> <20151029233806.GA12740@airbook.vandijck-laurijssen.be> <563753C2.3030109@hartkopp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from relaygateway02.edpnet.net ([212.71.1.211]:23521 "EHLO relaygateway02.edpnet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751819AbbKBMaP (ORCPT ); Mon, 2 Nov 2015 07:30:15 -0500 Content-Disposition: inline In-Reply-To: <563753C2.3030109@hartkopp.net> Sender: linux-can-owner@vger.kernel.org List-ID: To: Oliver Hartkopp Cc: Alex Layton , linux-can --- Original message --- > Date: Mon, 02 Nov 2015 13:14:58 +0100 > From: Oliver Hartkopp > To: Alex Layton , linux-can , > Kurt Van Dijck > Subject: Re: can-j1939 API > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 > Icedove/31.8.0 > > On 30.10.2015 00:38, Kurt Van Dijck wrote: > >>From: Oliver Hartkopp > >>To: Alex Layton , Kurt Van Dijck > > >>>Yep, I can follow that argument. > >>>When I get to it, I'll change that. > >>>It also implies I can drop iproute2-j1939 branches completely. > >>> > >> > >>Just to be sure I understood it correctly: > >> > >>No iproute2-j1939 branch -> no address support for j1939 in iproute > >>-> no address support in af_can.c ?? \o/ > > > >indeed. > >Next to the address support, I also would then drop the link status > >support (i.e. ip link set can0 j1939 on/off). > > ok > > >>So you would automatically take care of SA/Name when a j1939 socket is created > >>with the according address information (== per-socket), right? > > > >All SA or Name info comes via that way, indeed. > >Any can-j1939 socket (regardless the user) could bind to a new SA or Name. > > This is what I would expect :-) > > As Alex is only using SA in his implementation: Is the name still mandatory > as j1939 address information? > > >'per socket' is a bit dubious. In contrast to Alex, I would not restrict > >a specific SA or Name to a single socket for reasons I gave earlier. > > If I understand you correctly the first socket which is giving his address > information enables the j1939 address (claiming) handling inside the Kernel, > right? That's the plan. I would keep the address claiming itself as today in userspace. > > Btw. is it possible to create two processes on the same Linux box which > implement two different j1939 nodes (e.g. engine and trailer) that can > communicate with each other both using the *same* CAN interface (can0 or > vcan0)?? Yes. This kind of transparency was one of my goals. > > Regards, > Oliver >