scapy.layers.lltd module

LLTD Protocol

https://msdn.microsoft.com/en-us/library/cc233983.aspx

class scapy.layers.lltd.LLTD

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTD'>, <class 'scapy.packet.Packet'>]
answer_hashret = {(0, 12): (0, 11), (1, 1): (0, 0)}
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (LLTD).version>, <Field (LLTD).tos>, <Field (LLTD).reserved>, <Field (LLTD).function>, <Field (LLTD).real_dst>, <Field (LLTD).real_src>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hashret()

DEV: returns a string that has the same value for a request and its answer.

mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

payload_guess = [({'tos': 0, 'function': 0}, <class 'scapy.layers.lltd.LLTDDiscover'>), ({'tos': 1, 'function': 0}, <class 'scapy.layers.lltd.LLTDDiscover'>), ({'tos': 0, 'function': 1}, <class 'scapy.layers.lltd.LLTDHello'>), ({'tos': 1, 'function': 1}, <class 'scapy.layers.lltd.LLTDHello'>), ({'tos': 0, 'function': 2}, <class 'scapy.layers.lltd.LLTDEmit'>), ({'tos': 0, 'function': 7}, <class 'scapy.layers.lltd.LLTDQueryResp'>), ({'tos': 0, 'function': 11}, <class 'scapy.layers.lltd.LLTDQueryLargeTlv'>), ({'tos': 0, 'function': 12}, <class 'scapy.layers.lltd.LLTDQueryLargeTlvResp'>)]
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

class scapy.layers.lltd.LLTDAttribute

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *_, **kargs)
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttribute).len>, <Field (LLTDAttribute).value>]
payload_guess = [({}, <class 'scapy.layers.lltd.LLTDAttribute'>), ({'type': 0}, <class 'scapy.packet.Padding'>)]
show_indent = False
show_summary = False
class scapy.layers.lltd.LLTDAttribute80211MaxRate

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttribute80211MaxRate'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttribute80211MaxRate).len>, <Field (LLTDAttribute80211MaxRate).rate>]
class scapy.layers.lltd.LLTDAttribute80211PhysicalMedium

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttribute80211PhysicalMedium'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttribute80211PhysicalMedium).len>, <Field (LLTDAttribute80211PhysicalMedium).medium>]
class scapy.layers.lltd.LLTDAttributeCharacteristics

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeCharacteristics'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeCharacteristics).len>, <Field (LLTDAttributeCharacteristics).flags>, <Field (LLTDAttributeCharacteristics).reserved1>, <Field (LLTDAttributeCharacteristics).reserved2>]
class scapy.layers.lltd.LLTDAttributeDeviceUUID

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeDeviceUUID'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeDeviceUUID).len>, <Field (LLTDAttributeDeviceUUID).uuid>]
class scapy.layers.lltd.LLTDAttributeEOP

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeEOP'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>]
class scapy.layers.lltd.LLTDAttributeHostID

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeHostID'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeHostID).len>, <Field (LLTDAttributeHostID).mac>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.lltd.LLTDAttributeIPv4Address

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeIPv4Address'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeIPv4Address).len>, <Field (LLTDAttributeIPv4Address).ipv4>]
class scapy.layers.lltd.LLTDAttributeIPv6Address

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeIPv6Address'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeIPv6Address).len>, <Field (LLTDAttributeIPv6Address).ipv6>]
class scapy.layers.lltd.LLTDAttributeLargeTLV

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeLargeTLV'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeLargeTLV).len>]
class scapy.layers.lltd.LLTDAttributeLinkSpeed

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeLinkSpeed'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeLinkSpeed).len>, <Field (LLTDAttributeLinkSpeed).speed>]
class scapy.layers.lltd.LLTDAttributeMachineName

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeMachineName'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeMachineName).len>, <Field (LLTDAttributeMachineName).hostname>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.lltd.LLTDAttributePerformanceCounterFrequency

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributePerformanceCounterFrequency'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributePerformanceCounterFrequency).len>, <Field (LLTDAttributePerformanceCounterFrequency).freq>]
class scapy.layers.lltd.LLTDAttributePhysicalMedium

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributePhysicalMedium'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributePhysicalMedium).len>, <Field (LLTDAttributePhysicalMedium).medium>]
class scapy.layers.lltd.LLTDAttributeQOSCharacteristics

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeQOSCharacteristics'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeQOSCharacteristics).len>, <Field (LLTDAttributeQOSCharacteristics).flags>, <Field (LLTDAttributeQOSCharacteristics).reserved1>, <Field (LLTDAttributeQOSCharacteristics).reserved2>]
class scapy.layers.lltd.LLTDAttributeSeesList

Bases: scapy.layers.lltd.LLTDAttribute

aliastypes = [<class 'scapy.layers.lltd.LLTDAttributeSeesList'>, <class 'scapy.layers.lltd.LLTDAttribute'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDAttribute).type>, <Field (LLTDAttributeSeesList).len>, <Field (LLTDAttributeSeesList).max_entries>]
class scapy.layers.lltd.LLTDDiscover

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDDiscover'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDDiscover).gen_number>, <Field (LLTDDiscover).stations_count>, <Field (LLTDDiscover).stations_list>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.lltd.LLTDEmit

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDEmit'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDEmit).descs_count>, <Field (LLTDEmit).descs_list>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.lltd.LLTDEmiteeDesc

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDEmiteeDesc'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDEmiteeDesc).type>, <Field (LLTDEmiteeDesc).pause>, <Field (LLTDEmiteeDesc).src>, <Field (LLTDEmiteeDesc).dst>]
payload_guess = [({}, <class 'scapy.packet.Padding'>)]
class scapy.layers.lltd.LLTDHello

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDHello'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDHello).gen_number>, <Field (LLTDHello).current_mapper_address>, <Field (LLTDHello).apparent_mapper_address>]
payload_guess = [({}, <class 'scapy.layers.lltd.LLTDAttribute'>)]
show_summary = False
class scapy.layers.lltd.LLTDQueryLargeTlv

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDQueryLargeTlv'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDQueryLargeTlv).type>, <Field (LLTDQueryLargeTlv).offset>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.lltd.LLTDQueryLargeTlvResp

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDQueryLargeTlvResp'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDQueryLargeTlvResp).flags>, <Field (LLTDQueryLargeTlvResp).len>, <Field (LLTDQueryLargeTlvResp).value>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

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

class scapy.layers.lltd.LLTDQueryResp

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDQueryResp'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDQueryResp).flags>, <Field (LLTDQueryResp).descs_count>, <Field (LLTDQueryResp).descs_list>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

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

class scapy.layers.lltd.LLTDRecveeDesc

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.lltd.LLTDRecveeDesc'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLTDRecveeDesc).type>, <Field (LLTDRecveeDesc).real_src>, <Field (LLTDRecveeDesc).ether_src>, <Field (LLTDRecveeDesc).ether_dst>]
payload_guess = [({}, <class 'scapy.packet.Padding'>)]
class scapy.layers.lltd.LargeTlvBuilder

Bases: object

An object to build content fetched through LLTDQueryLargeTlv / LLTDQueryLargeTlvResp packets.

Usable with a PacketList() object: >>> p = LargeTlvBuilder() >>> p.parse(rdpcap(‘capture_file.cap’))

Or during a network capture: >>> p = LargeTlvBuilder() >>> sniff(filter=”ether proto 0x88d9”, prn=p.parse)

To get the result, use .get_data()

get_data()

Returns a dictionary object, keys are strings “source > destincation [content type]”, and values are the content fetched, also as a string.

parse(plist)

Update the builder using the provided plist. plist can be either a Packet() or a PacketList().