linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: j1939 - first steps
Date: Thu, 21 Mar 2013 07:50:42 +0100	[thread overview]
Message-ID: <514AADC2.3030504@hartkopp.net> (raw)
In-Reply-To: <20130321055313.GA1419@vandijck-laurijssen.be>

On 21.03.2013 06:53, Kurt Van Dijck wrote:

> On Wed, Mar 20, 2013 at 09:44:18PM +0100, Marc Kleine-Budde wrote:

>> What do you use to parse these numbers?
> strtoul(str, &endp, 16);
> 		   ^^^^
> 
> The use is very similar to cansend, I believe, where a can_id of exactly 8 hex chars long
> means 29bit, and shorter means 11bit.
> Implicitely, everything is told to be in hex, without 0x.
> 
> And because this was not clear, Oliver got himself a 64bit nodename as strlen(0x22) > 2 :-)


Yes that was my trap. I've seen the strlen but it didn't help me %-)

>>>>> The format is: 'IFACE:<NAME>[,<ADDR>]'
> And my first attempt to help him, out of the head, was a 'legacy thought', not good either.
> always check the code :-)


Regards,
Oliver

      reply	other threads:[~2013-03-21  6:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 20:13 j1939 - first steps Oliver Hartkopp
2013-03-18 21:41 ` Kurt Van Dijck
2013-03-19  6:52   ` Oliver Hartkopp
2013-03-20  9:07     ` Kurt Van Dijck
2013-03-20 19:24     ` Kurt Van Dijck
2013-03-20 20:44       ` Marc Kleine-Budde
2013-03-21  5:53         ` Kurt Van Dijck
2013-03-21  6:50           ` Oliver Hartkopp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=514AADC2.3030504@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).