RE: [Manet-dt] Generalised OLSR packet/message format comments

"Dearlove, Christopher (UK)" <chris.dearlove@baesystems.com> Mon, 20 February 2006 09:51 UTC

Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1FB7hO-00049K-Vu; Mon, 20 Feb 2006 04:51:18 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1FB7Bl-0002et-T8 for manet-dt@ietf.org; Mon, 20 Feb 2006 04:18:37 -0500
Received: from smtp1.bae.co.uk ([20.133.0.6]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1FB75c-0007mN-6e for manet-dt@ietf.org; Mon, 20 Feb 2006 04:12:21 -0500
Received: from ngbaux (ngbaux.msd.bae.co.uk [141.245.68.234]) by smtp1.bae.co.uk (Switch-2.2.8/Switch-2.2.8) with ESMTP id k1K9C7A27996 for <manet-dt@ietf.org>; Mon, 20 Feb 2006 09:12:07 GMT
Received: from glkas0106.GREENLNK.NET ([141.245.68.243]) by ngbaux.net.bae.co.uk (PMDF V5.2-33 #44998) with ESMTP id <0IUZ00AE6AZZVO@ngbaux.net.bae.co.uk> for manet-dt@ietf.org; Mon, 20 Feb 2006 09:14:24 +0000 (GMT)
Received: from glkms0001.GREENLNK.NET ([10.15.184.1]) by glkas0106.GREENLNK.NET with InterScan Message Security Suite; Mon, 20 Feb 2006 09:10:11 +0000
Received: from glkms0008.GREENLNK.NET ([10.15.184.8]) by glkms0001.GREENLNK.NET with Microsoft SMTPSVC(5.0.2195.6713); Mon, 20 Feb 2006 09:09:13 +0000
Date: Mon, 20 Feb 2006 09:09:12 +0000
From: "Dearlove, Christopher (UK)" <chris.dearlove@baesystems.com>
Subject: RE: [Manet-dt] Generalised OLSR packet/message format comments
To: Brian Adamson <adamson@itd.nrl.navy.mil>, manet-dt@ietf.org
Message-id: <C1DE3C7469FE5A4D95F9BF0F332D8B8D01EEE57F@glkms0008>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft Exchange V6.0.6556.0
Content-type: text/plain; charset="us-ascii"
Content-transfer-encoding: quoted-printable
Thread-Topic: [Manet-dt] Generalised OLSR packet/message format comments
thread-index: AcYz72qgbZjGVLNoSkexV7AeuZF8JQCCzEuA
Content-class: urn:content-classes:message
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
X-OriginalArrivalTime: 20 Feb 2006 09:09:13.0004 (UTC) FILETIME=[51161EC0:01C635FD]
X-Spam-Score: 0.0 (/)
X-Scan-Signature: d0bdc596f8dd1c226c458f0b4df27a88
Cc:
X-BeenThere: manet-dt@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: MANET Design Team <manet-dt.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/manet-dt>, <mailto:manet-dt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/manet-dt>
List-Post: <mailto:manet-dt@ietf.org>
List-Help: <mailto:manet-dt-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/manet-dt>, <mailto:manet-dt-request@ietf.org?subject=subscribe>
Errors-To: manet-dt-bounces@ietf.org

>I am wrestling with the fact that certain <msg-semantics> settings
>(e.g. bit 0 not set, but bit 1 set) results in non-32-bit aligned
><msg-header-info> content ...

There's only one thing in the entire format that matters if it is 32
bit aligned, and that's the originator address, and if you add padding
octets after a message then the message header, and hence the originator
address, will be 32 bit aligned. And that's optional, you need to handle
messages from senders who don't do that. Why do I say nothing else
matters?
Because nothing else is a 32 bit (or 128 bit) value to be so aligned.
(OK, minor exception, a single address in an address block, with head
length equal to address length. But that's the exception rather than the
rule, and still doesn't help as noted below.)

> This by itself wouldn't be an issue, if there were some option to pad
> the <msg-header-info> to 32-bit alignment ...
>
> Perhaps another unused <msg-semantic> bit could be set to indicate
> whether the <msg-header-info> is padded out to 32-bit alignment,
> regardless of the semantics? (i.e. a "tail" indicator?)
>
> Perhaps I am too hung up on having 32-bit aligned message parsing
> code (i.e. so that TLV's and address blocks end up on 32-bit
> boundaries),

As neither TLVs nor address blocks have lengths that are multiples
of 32 bits, if you want 32 bit alignment there (for no good purpose
that I can see - in the exceptional case I note, if the address block
is 32 bit aligned the address won't be) then you would need to pad
every single address block and every single TLV.

> but perhaps it would be useful for the <msg-header-info>
> to have a "tail" option like the address blocks do if that is desired
> for a protocol using this message construction?

The tail option on the address blocks isn't for padding, it's for the
multiple least significant bits of addresses. It's not 32-bit aligned.

> I am creating a generalized set of C++ classes that implement message
> building and parsing that I will be using for an SMF "hello protocol"
> implementation.  I will be posting this code as part of the open
> source "nrlsmf" code distribution as it is more complete for anyone
> interested.  My current approach with the building/parsing code is to
> provide for 32-bit aligned packet/message construction.  In the
> longer term, I may provide an alternative implementation that doesn't
> require 32-bit alignment of significant packet/message structures
> (e.g. headers, address blocks, tlv blocks, etc), but I thought I
> would go for the "pretty" approach and thus the issue above came to
> light ...

You can't have 32 bit alignment and this approach to packet/message
format. Things that are inherently 32-bit alignment unfriendly:
address compression with single head and multiple tails, TLV value
fields that are of variable length that is not always (not usually)
a multiple of 32 bits. So a 32-bit aligned approach isn't going to
work.

I can tell you it's possible to create C++ classes for message building
and parsing of this format, including all the options: I have them.
But they won't be made publicly available I'm afraid.


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


_______________________________________________
Manet-dt mailing list
Manet-dt@ietf.org
https://www1.ietf.org/mailman/listinfo/manet-dt