MCPcopy Index your code
hub / github.com/secdev/scapy / do_build

Method do_build

scapy/packet.py:757–773  ·  view source on GitHub ↗

Create the default version of the layer :return: a string of the packet with the payload

(self)

Source from the content-addressed store, hash-verified

755 return self.payload.do_build()
756
757 def do_build(self):
758 # type: () -> bytes
759 """
760 Create the default version of the layer
761
762 :return: a string of the packet with the payload
763 """
764 if not self.explicit:
765 self = next(iter(self))
766 pkt = self.self_build()
767 for t in self.post_transforms:
768 pkt = t(pkt)
769 pay = self.do_build_payload()
770 if self.raw_packet_cache is None:
771 return self.post_build(pkt, pay)
772 else:
773 return pkt + pay
774
775 def build_padding(self):
776 # type: () -> bytes

Callers 2

buildMethod · 0.95
do_build_payloadMethod · 0.45

Calls 3

self_buildMethod · 0.95
do_build_payloadMethod · 0.95
post_buildMethod · 0.95

Tested by

no test coverage detected