netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Urs Thuermann <urs@isnogud.escape.de>,
	netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	"Hartkopp, Oliver \(K-EFE/E\)" <oliver.hartkopp@volkswagen.de>,
	"Thuermann, Urs, Dr. \(K-EFE/I\)" <urs.thuermann@volkswagen.de>
Subject: Re: Re: [patch 2/7] CAN: Add PF_CAN core module
Date: Wed, 16 May 2007 20:26:34 +0200	[thread overview]
Message-ID: <464B4CDA.1030906@hartkopp.net> (raw)
In-Reply-To: <39e6f6c70705160935q66109a3ci414374544d99c78f@mail.gmail.com>

Arnaldo Carvalho de Melo wrote:
>
> <SNIP>
>
> > +
> > +/**
> > + * struct sockaddr_can - the sockaddr structure for CAN sockets
> > + * @can_family:  address family number AF_CAN.
> > + * @can_ifindex: CAN network interface index.
> > + * @can_addr:    transport protocol specific address, mostly CAN IDs.
> > + */
> > +struct sockaddr_can {
> > +       sa_family_t can_family;
> > +       int         can_ifindex;
> > +       union {
> > +               struct { canid_t rx_id, tx_id; } tp16;
> > +               struct { canid_t rx_id, tx_id; } tp20;
> > +               struct { canid_t rx_id, tx_id; } mcnet;
> > +               struct { canid_t rx_id, tx_id; } isotp;
> > +               struct { int     lcu,   type;  } bap;
> > +       } can_addr;
> > +};
>
> Can can_ifindex be turned into a unsigned short?
>

Hm - did you ever search for ifindex in the kernel?
E.g. in struct net_device in include/linux/netdevice.h , or functions 
like dev_get_by_index() ?

The interface index (ifindex) is always(!) defined as an integer.
I think, we would get rightly knocked defining ifindex as a short value ;-)

Regards,
Oliver



  reply	other threads:[~2007-05-16 18:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 14:51 [patch 0/7] CAN: Add new PF_CAN protocol family Urs Thuermann
2007-05-16 14:51 ` [patch 1/7] CAN: Allocate protocol numbers for PF_CAN Urs Thuermann
2007-05-16 14:51 ` [patch 2/7] CAN: Add PF_CAN core module Urs Thuermann
2007-05-16 16:35   ` Arnaldo Carvalho de Melo
2007-05-16 18:26     ` Oliver Hartkopp [this message]
2007-05-16 19:14     ` Urs Thuermann
2007-05-16 20:51       ` Arnaldo Carvalho de Melo
2007-05-18  0:59   ` Paul E. McKenney
2007-05-18  9:19     ` Oliver Hartkopp
2007-05-18 14:33       ` Paul E. McKenney
2007-05-18 15:03         ` Oliver Hartkopp
2007-05-18 21:06         ` Oliver Hartkopp
2007-05-16 14:51 ` [patch 3/7] CAN: Add raw protocol Urs Thuermann
2007-05-16 14:51 ` [patch 4/7] CAN: Add broadcast manager (bcm) protocol Urs Thuermann
2007-05-16 14:51 ` [patch 5/7] CAN: Add virtual CAN netdevice driver Urs Thuermann
2007-05-16 14:51 ` [patch 6/7] CAN: Add maintainer entries Urs Thuermann
2007-05-16 14:51 ` [patch 7/7] CAN: Add documentation Urs Thuermann

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=464B4CDA.1030906@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=acme@ghostprotocols.net \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.hartkopp@volkswagen.de \
    --cc=tglx@linutronix.de \
    --cc=urs.thuermann@volkswagen.de \
    --cc=urs@isnogud.escape.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).