def packet2chain(packet):
chain = [type(packet).__name__]<EOL>payload = packet.data<EOL>while not isinstance(payload, bytes):<EOL><INDENT>chain.append(type(payload).__name__)<EOL>payload = payload.data<EOL><DEDENT>return '<STR_LIT::>'.join(chain)<EOL>
Fetch DPKT packet protocol chain.