scapy.contrib.mqttsn

class scapy.contrib.mqttsn.MQTTSN

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSN fields

len

VariableFieldLenField

None

type

XByteEnumField

0

payload_guess

Possible sublayers: MQTTSNAdvertise, MQTTSNConnack, MQTTSNConnect, MQTTSNDisconnect, MQTTSNEncaps, MQTTSNGwInfo, MQTTSNPingReq, MQTTSNPingResp, MQTTSNPuback, MQTTSNPubcomp, MQTTSNPublish, MQTTSNPubrec, MQTTSNPubrel, MQTTSNRegack, MQTTSNRegister, MQTTSNSearchGW, MQTTSNSuback, MQTTSNSubscribe, MQTTSNUnsuback, MQTTSNUnsubscribe, MQTTSNWillMsgReq, MQTTSNWillMsgResp, MQTTSNWillMsgUpd, MQTTSNWillMsg, MQTTSNWillTopicReq, MQTTSNWillTopicResp, MQTTSNWillTopicUpd, MQTTSNWillTopic

class scapy.contrib.mqttsn.MQTTSNAdvertise

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNAdvertise fields

gw_id

ByteField

0

duration

ShortField

0

class scapy.contrib.mqttsn.MQTTSNConnack

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNConnack fields

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNConnect

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNConnect fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

prot_id

ByteField

1

duration

ShortField

0

client_id

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNDisconnect

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNDisconnect fields

duration

ShortField (Cond)

None

class scapy.contrib.mqttsn.MQTTSNEncaps

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNEncaps fields

resvd

BitField (6 bits)

0

radius

BitField (2 bits)

0

w_node_id

StrLenField

b''

payload_guess

Possible sublayers: MQTTSN

class scapy.contrib.mqttsn.MQTTSNGwInfo

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNGwInfo fields

gw_id

ByteField

0

gw_addr

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNPingReq

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPingReq fields

client_id

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNPingResp

Bases: scapy.packet.Packet

aliastypes
class scapy.contrib.mqttsn.MQTTSNPuback

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPuback fields

tid

ShortField

0

mid

ShortField

0

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNPubcomp

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPubcomp fields

mid

ShortField

0

class scapy.contrib.mqttsn.MQTTSNPublish

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPublish fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

tid

ShortField

0

mid

ShortField

0

data

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNPubrec

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPubrec fields

mid

ShortField

0

class scapy.contrib.mqttsn.MQTTSNPubrel

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNPubrel fields

mid

ShortField

0

class scapy.contrib.mqttsn.MQTTSNRegack

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNRegack fields

tid

ShortField

0

mid

ShortField

0

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNRegister

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNRegister fields

tid

ShortField

0

mid

ShortField

0

topic_name

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNSearchGW

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNSearchGW fields

radius

ByteField

0

class scapy.contrib.mqttsn.MQTTSNSuback

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNSuback fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

tid

ShortField

0

mid

ShortField

0

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNSubscribe

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNSubscribe fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

mid

ShortField

0

tid

ShortField (Cond)

None

short_topic

StrFixedLenField (Cond)

None

topic_name

StrLenField (Cond)

None

class scapy.contrib.mqttsn.MQTTSNUnsuback

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNUnsuback fields

mid

ShortField

0

class scapy.contrib.mqttsn.MQTTSNUnsubscribe

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNUnsubscribe fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

mid

ShortField

0

tid

ShortField (Cond)

None

short_topic

StrFixedLenField (Cond)

None

topic_name

StrLenField (Cond)

None

class scapy.contrib.mqttsn.MQTTSNWillMsg

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillMsg fields

will_msg

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNWillMsgReq

Bases: scapy.packet.Packet

aliastypes
class scapy.contrib.mqttsn.MQTTSNWillMsgResp

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillMsgResp fields

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNWillMsgUpd

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillMsgUpd fields

will_msg

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNWillTopic

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillTopic fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

will_topic

StrLenField

b''

class scapy.contrib.mqttsn.MQTTSNWillTopicReq

Bases: scapy.packet.Packet

aliastypes
class scapy.contrib.mqttsn.MQTTSNWillTopicResp

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillTopicResp fields

return_code

ByteEnumField

0

class scapy.contrib.mqttsn.MQTTSNWillTopicUpd

Bases: scapy.packet.Packet

aliastypes
fields_desc
MQTTSNWillTopicUpd fields

dup

BitField (1 bit)

0

qos

BitEnumField (2 bits)

0

retain

BitField (1 bit)

0

will

BitField (1 bit)

0

cleansess

BitField (1 bit)

0

tid_type

BitEnumField (2 bits)

0

will_topic

StrLenField

b''

class scapy.contrib.mqttsn.RandVariableFieldLen

Bases: scapy.volatile.RandNum

class scapy.contrib.mqttsn.VariableFieldLenField(*args, **kwargs)

Bases: scapy.fields.FieldLenField

MQTT-SN length field either has 1 byte for values [0x02, 0xff] or 3 bytes for values [0x0100, 0xffff]. If the first byte is 0x01 the length value comes in network byte-order in the next 2 bytes. MQTT-SN packets are at least 2 bytes long (length field + type field).

addfield(pkt, s, val)
getfield(pkt, s)
randval()