scapy.contrib.coap
RFC 7252 - Constrained Application Protocol (CoAP) layer for Scapy
- class scapy.contrib.coap.CoAP(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.Packet- aliastypes
- content_format
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |VER|TYP| TKL | CODE | MSG ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TOKEN | OPTIONS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PAYMARK | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. CoAPCoAP fields ver
BitField(2 bits)1type
0tkl
BitFieldLenField(4 bits)Nonecode
0msg_id
0token
b''options
_CoAPOptsField[]paymark
_CoAPPaymarkb''