netdev
[Top] [All Lists]

Re: NLMSG_* macros (was: Re: ULOG comments)

To: Jan Echternach <jan.echternach@xxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: NLMSG_* macros (was: Re: ULOG comments)
From: Andi Kleen <ak@xxxxxx>
Date: Tue, 15 Aug 2000 22:46:34 +0200
Cc: Andi Kleen <ak@xxxxxx>, netfilter@xxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20000815182512.D26543@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from Jan Echternach on Tue, Aug 15, 2000 at 06:25:29PM +0200
References: <20000811162634.A3814@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.10.10008120119370.13569-100000@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20000815175225.B26543@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20000815181812.A5358@xxxxxxxxxxx> <20000815182512.D26543@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, Aug 15, 2000 at 06:25:29PM +0200, Jan Echternach wrote:
> On Tue, Aug 15, 2000 at 06:18:12PM +0200, Andi Kleen wrote:
> > It is strongly recommended to use the NLMSG_* macros to avoid alignment 
> > problems
> > on other architectures than i386.
> 
> But there are absolutely no alignement problems with single-part
> messages.  Actually, there are even fewer alignment problems without

There is between the header and the payload.

> BTW, are there any other reasons for using NLMSG_* apart from
> alignement issues?

The main reason is alignment, and it is usually cleaner than doing pointer
arithmetic by hand in case of multipart messages. 


-Andi


<Prev in Thread] Current Thread [Next in Thread>