[pcap-ng-format] The payload of Custom blocks that can have options must have a length or a terminator

Guy Harris guy at alum.mit.edu
Sat Jun 11 02:02:48 UTC 2016


On Jun 10, 2016, at 6:37 PM, Guy Harris <guy at alum.mit.edu> wrote:

> Should we:
> 
> 	1) explicitly specify that the data before the options in a Custom Block must begin with a length field (I prefer lengths to terminators, as they make it easier to find out the length, and work even if that data isn't a sequence of items that can have a terminator);
> 
> 	2) point out in the specification that, if a particular type of Custom Block is to support options, it must be possible for code that can read the block to determine how much of the block payload is data before the options and how much is options?
> 
> My inclination is to go with 2), so as not to constrain the developers of Custom Blocks any more than is absolutely necessary to have them support options at all, but I wouldn't be opposed to adding a "data before the options" length field to the Custom Option.

I've updated the spec to go with 2); if we decide to go with 1), we can just update the paragraph in question to say that it's always possible with a Custom Block.



More information about the pcap-ng-format mailing list