lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47026D2C.9060606@hartkopp.net>
Date:	Tue, 02 Oct 2007 18:09:16 +0200
From:	Oliver Hartkopp <oliver@...tkopp.net>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	Urs Thuermann <urs@...ogud.escape.de>, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Oliver Hartkopp <oliver@...tkopp.net>,
	Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
	Urs Thuermann <urs.thuermann@...kswagen.de>
Subject: Re: [PATCH 2/7] CAN: Add PF_CAN core module

Arnaldo Carvalho de Melo wrote:
> Em Tue, Oct 02, 2007 at 03:10:08PM +0200, Urs Thuermann escreveu:
>   
>> +
>> +/**
>> + * 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;
>> +	} can_addr;
>>     
>
> Again being curious, what is the value of this union of all its members
> have the same definition? Backward source code compatibility?
>
>   

Yes. You're right here. It is a prerequisite for a CAN transportprotocol 
like the standardized ISO-TP i plan to submit here until december.

Indeed the union should be replaced by something like

struct sockaddr_can {
sa_family_t can_family;
int can_ifindex;
union {
struct { canid_t rx_id, tx_id; } tp;
} can_addr;
};


The union was the idea, if there is any other protocol for CAN that 
need's other adressing information. I personally do not know any 
protocol. Maybe CANOpen has different addressing requirements here. And 
in that case a new protocol could just could add things to the union to 
meet it's own needs.


>
> You have been thru many iterations already, sigh, I should have looked
> at this before :-\
>
>   

Yeah :-) I thought, you were just done last time.

Btw. Thanks for your review and your good feedback.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ