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

def _OSPFv3_LSAGuessPayloadClass ( p , ** kargs ) : cls = conf . raw_layer if ( len ( p ) >= 6 ) : typ = struct . unpack ( '!H' , p [ 2 : 4 ] ) [ 0 ] clsname = _OSPFv3_LSclasses . get ( typ , 'Raw' ) cls = globals ( ) [ clsname ] return cls ( p , ** kargs )
guess the correct ospfv3 lsa class for a given payload .