MCPcopy Index your code
hub / github.com/secdev/scapy / _CoAPPaymark

Class _CoAPPaymark

scapy/contrib/coap.py:194–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194class _CoAPPaymark(StrField):
195
196 def i2h(self, pkt, x):
197 return x
198
199 def getfield(self, pkt, s):
200 (u, m) = self.m2i(pkt, s)
201 return s[u:], m
202
203 def m2i(self, pkt, x):
204 if len(x) > 0 and x[:1] == b"\xff":
205 return 1, b'\xff'
206 return 0, b''
207
208 def i2m(self, pkt, x):
209 return x
210
211
212class CoAP(Packet):

Callers 1

CoAPClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected