[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <464B4CDA.1030906@hartkopp.net>
Date: Wed, 16 May 2007 20:26:34 +0200
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC: Urs Thuermann <urs@...ogud.escape.de>, netdev@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
"Hartkopp, Oliver \(K-EFE/E\)" <oliver.hartkopp@...kswagen.de>,
"Thuermann, Urs, Dr. \(K-EFE/I\)" <urs.thuermann@...kswagen.de>
Subject: Re: Re: [patch 2/7] CAN: Add PF_CAN core module
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
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists