def _LLSGuessPayloadClass(p, **kargs):
 cls = conf.raw_layer
 if (len(p) >= 4):
  typ = struct.unpack('!H', p[0:2])[0]
  clsname = _OSPF_LLSclasses.get(typ, 'LLS_Generic_TLV')
  cls = globals()[clsname]
 return cls(p, **kargs)

def _LLSGuessPayloadClass ( p , ** kargs ) : cls = conf . raw_layer if ( len ( p ) >= 4 ) : typ = struct . unpack ( '!H' , p [ 0 : 2 ] ) [ 0 ] clsname = _OSPF_LLSclasses . get ( typ , 'LLS_Generic_TLV' ) cls = globals ( ) [ clsname ] return cls ( p , ** kargs )
guess the correct lls class for a given payload .