Subject: Re: [dtn] AMP comment on types

From: "Birrane, Edward J." <[email-masked]>
Date: Wed, 6 Apr 2016 15:51:47 +0000

Brian,

   I agree that by design all AMP data types are self-terminating in that content within the data type itself provides information on the overall length of the type from an otherwise arbitrary-length octet stream.

  I'll take an action to add this to the next revision of the AMP spec.

  It is possible that some on-the-wire expression of the SRL optional parameters has been overlooked with the addition of the optional parameters. However, the control to add a new SRL remains self-terminating even in the presence of optional parameters, as does the report used to describe the contents of an SRL, as does the current serialization of the SRL.

  I'll take a look.

-Ed

---
Edward J. Birrane, III, Ph.D.
Embedded Applications Group Supervisor
Space Exploration Sector
Johns Hopkins Applied Physics Laboratory
(W) 443-778-7423 / (F) 443-228-3839
________________________________
From: dtn <[email-masked]> on behalf of Brian Sipos <[email-masked]>
Sent: Wednesday, March 30, 2016 2:36 PM
To: [email-masked]
Subject: [dtn] AMP comment on types

This is a comment against "draft-birrane-dtn-amp-01".

It appears that all of the AMP data types are encoded as self-terminating units, i.e. given an indefinite-length octet stream each type can be unambiguously decoded from the stream. There is no need to have either an external encoded-size indicator nor an end-of-data marker.

If this is accurate, it would be useful to state this within the AMP data type discussion so that it is an apparent and obvious attribute of these types. Knowing this would assist in AMP implementation, and would provide guidance to AMP spec edits.

In fact, spec changes from amp-01 to amp-02 introduced a few "(OPTIONAL)" values which breaks this self-terminating behavior for the SRL type. If the self-terminating behavior _is_ desired then these values should be controlled by a present/absent bit flag similar to other optional protocol elements.