def _LSAGuessPayloadClass(p, **kargs):
    """ Guess the correct LSA class for a given payload """
    # This is heavily based on scapy-cdp.py by Nicolas Bareil and Arnaud Ebalard
    # XXX: This only works if all payload
    cls = conf.raw_layer
    if len(p) >= 4:
        typ = p[3]
        clsname = _OSPF_LSclasses.get(typ, "Raw")
        cls = globals()[clsname]
    return cls(p, **kargs)
Guess the correct LSA class for a given payload