def packet2chain(packet):
if scapy_all is None:<EOL><INDENT>raise ModuleNotFound("<STR_LIT>", name='<STR_LIT>')<EOL><DEDENT>chain = [packet.name]<EOL>payload = packet.payload<EOL>while not isinstance(payload, scapy_all.packet.NoPayload):<EOL><INDENT>chain.append(payload.name)<EOL>payload = payload.payload<EOL><DEDENT>return '<STR_LIT::>'.join(chain)<EOL>
Fetch Scapy packet protocol chain.