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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to