scapy.contrib.coap
RFC 7252 - Constrained Application Protocol (CoAP) layer for Scapy
- class scapy.contrib.coap.CoAP(_pkt, /, *, ver=1, type=0, tkl=None, code=0, msg_id=0, token=b'', options=[], paymark=b'')[源代码]
基类:
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''