[PATCH] tlv/msgb: Be able to generate and parse TLV as used by LLDP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Thu Jul 10 18:46:05 UTC 2014


On Thu, Jul 10, 2014 at 02:03:43PM +0200, Peter Stuge wrote:

> > +	/*
> > +	 * Check if this could be a T7L9V tag. Do it by
> > +	 * shifting it to the right once. Note that this
> > +	 * means that mixing T7L9V with other tags is not
> > +	 * possible.
> 
> Why not explicitly specify to do this test for each tag?

I am not sure if I follow. Do you propose to iterate over the definition
list and check which tags fits best and if it should be shifted or not?

> Ie. leave the old function as-is, add a new function with the T7L9V
> heuristic, and use the new function only at call sites where T7L9V
> may actually be encountered.

Yes, I have considered this option too. We could introduce a tlv_parser
variant that specifies which routine to use for a single tag.

holger




More information about the OpenBSC mailing list