scapy.contrib.carp module

class scapy.contrib.carp.CARP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.carp.CARP'>, <class 'scapy.packet.Packet'>]
build_hmac_sha1(pw=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', ip4l=[], ip6l=[])
fields_desc = [<Field (CARP).version>, <Field (CARP).type>, <Field (CARP).vhid>, <Field (CARP).advskew>, <Field (CARP).authlen>, <Field (CARP).demotion>, <Field (CARP).advbase>, <Field (CARP).chksum>, <Field (CARP).counter1>, <Field (CARP).counter2>, <Field (CARP).hmac1>, <Field (CARP).hmac2>, <Field (CARP).hmac3>, <Field (CARP).hmac4>, <Field (CARP).hmac5>]
post_build(pkt, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload