linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Maximilian Güntner" <maximilian.guentner@gmail.com>,
	"Mike Purvis" <mpurvis@clearpathrobotics.com>
Cc: linux-can@vger.kernel.org, tom_usenet@optusnet.com.au
Subject: Re: Standard CAN over IP
Date: Fri, 20 Feb 2015 12:43:22 +0100	[thread overview]
Message-ID: <54E71DDA.9000807@hartkopp.net> (raw)
In-Reply-To: <CAKSnaaeezGJzR_ZHq4e1Ow1fnQzOwbEw7feM7v_2f3snNddA0g@mail.gmail.com>

On 18.02.2015 18:57, Maximilian Güntner wrote:

> Some features are still missing, like packet loss detection and the
> re-transmission of lost UDP packets. CAN_FD is also not implemented.

Hi Maximilian,

I would suggest to implement CAN FD from the beginning.

When creating the CAN RAW socket just try to switch it into CAN FD mode:

const int canfd_on = 1;

/* try to switch the socket into CAN FD mode */
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FD_FRAMES, &canfd_on, sizeof(canfd_on));

No need to check for the return value here if you are able to handle CAN FD in 
your application.

And do this CAN FD sockopt on the target socket too.
When you are getting CAN FD frames and the target CAN interface only supports 
CAN2.0 the FD frames have to be dropped - people will surely detect this :-)

The only problem will remain how to encapsulate two different frame lengths 
and parse them correctly at the target node.

I wasn't able to get behind your UDP CAN frame encapsulation concept (missing 
C++ knowledge) so you definitely know better than me :-)

Regards,
Oliver

  parent reply	other threads:[~2015-02-20 11:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 20:27 Standard CAN over IP Mike Purvis
2015-02-04 20:44 ` Armin Burchardt
2015-02-04 21:38   ` Mike Purvis
2015-02-04 22:42     ` Gerhard Bertelsmann
2015-02-05  0:50     ` Tom Evans
2015-02-05 13:15       ` Mike Purvis
2015-02-06  8:33         ` Michal Sojka
2015-02-09 16:00           ` Mike Purvis
2015-02-09 18:32             ` Oliver Hartkopp
2015-02-04 23:43 ` Tom Evans
2015-02-18 17:57 ` Maximilian Güntner
     [not found]   ` <CACsJT9M4QbYkDvQkGfhFuwA6haNyV5zesUFtLzB5VEbxP=obBA@mail.gmail.com>
2015-02-19  3:21     ` Mike Purvis
2015-02-19 14:58     ` Maximilian Güntner
2015-02-20 11:43   ` Oliver Hartkopp [this message]
2015-02-23 12:25     ` Maximilian Güntner
2015-02-23 13:08       ` Oliver Hartkopp
2015-02-23 14:27         ` Maximilian Güntner
2015-02-23 16:22           ` Oliver Hartkopp
2015-03-20 16:54   ` Maximilian Güntner
2015-03-23 10:28     ` Pankajkumar Misra (RBEI/EEA2)
2015-03-23 13:15       ` Maximilian Güntner
2015-03-23 16:57         ` Pankajkumar Misra (RBEI/EEA2)
2015-03-23 13:23       ` GARNERO, PIERRE (P.)

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=54E71DDA.9000807@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=maximilian.guentner@gmail.com \
    --cc=mpurvis@clearpathrobotics.com \
    --cc=tom_usenet@optusnet.com.au \
    /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).