mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Controller Area Network (CAN) infrastructure
Date: Tue, 24 Jan 2006 11:39:54 -0800	[thread overview]
Message-ID: <20060124113954.0782cb59@dxpl.pdx.osdl.net> (raw)
In-Reply-To: <43D61374.8010208@arcom.com>

On Tue, 24 Jan 2006 11:45:56 +0000
David Vrabel <dvrabel@arcom.com> wrote:

> 
> This is a basic Controller Area Network (CAN) infrastructure.
> 
> CAN is a serial bus network commonly used in automotive and industrial
> control applications.  CAN is exclusively a broadcast network.  Frames
> do not have destination addresses and instead have an ID which
> identifies the frame (generally the ID identifies the type of data in
> the payload of the frame).  Nodes can selectively receive frames based
> on their ID (using mask and match bits).
> 
> Since CAN is a network, CAN controller drivers are implemented as
> network devices with a few extras provided by a CAN class device.  CAN
> frame aren't a whole number of octets so the user recv()'s and send()'s
> 'struct can_frame's which include all the header bits and the 8 octets
> of payload.
> 
> This infrastructure provides the bare minimum required to test CAN
> controllers and is likely missing stuff necessary to actually use it in
> an application.  In particular, the requirement that frames are sent via
> a packet(7) socket could do with being removed but I'm unclear on a
> method that would allow this but wouldn't be a security risk (e.g., a
> mechanism needs to be provided so you can't send/receive raw CAN frames
> on, say, an ethernet device).
> 
> David Vrabel


This implementation looks racey if sysfs files are held open
and device module is removed.
Network device's can not be embedded in other structures.

Also network devices can be renamed, but your code can't handle that.

Read Documentation/networking/netdevices.txt

-- 
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger

  parent reply	other threads:[~2006-01-24 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-24 11:45 David Vrabel
2006-01-24 12:08 ` MC251x CAN controller driver example David Vrabel
2006-01-24 19:39 ` Stephen Hemminger [this message]
2006-02-03 22:40 ` [RFC] Controller Area Network (CAN) infrastructure Greg KH

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=20060124113954.0782cb59@dxpl.pdx.osdl.net \
    --to=shemminger@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®