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

Class CRX1New

scapy/contrib/concox.py:279–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277
278
279class CRX1New(Packet):
280 name = "CRX1 New"
281 fields_desc = [
282 XShortField('start_bit', 0x7878),
283 ConditionalField(ByteField(
284 'default_packet_length',
285 None,
286 ), lambda pkt: pkt.start_bit == 0x7878),
287 ConditionalField(ShortField(
288 'extended_packet_length',
289 None,
290 ), lambda pkt: pkt.start_bit == 0x7979),
291 ConditionalField(
292 PacketLenField('default_packet_content',
293 None,
294 CRX1NewPacketContent,
295 length_from=lambda pkt: pkt.default_packet_length),
296 lambda pkt: pkt.start_bit == 0x7878),
297 ConditionalField(
298 PacketLenField('extended_packet_content',
299 None,
300 CRX1NewPacketContent,
301 length_from=lambda pkt: pkt.extended_packet_length),
302 lambda pkt: pkt.start_bit == 0x7979),
303 XShortField('end_bit', 0x0d0a),
304 ]
305
306
307bind_layers(TCP, CRX1New, sport=8821, dport=8821)

Callers

nothing calls this directly

Calls 5

XShortFieldClass · 0.90
ConditionalFieldClass · 0.90
ByteFieldClass · 0.90
ShortFieldClass · 0.90
PacketLenFieldClass · 0.90

Tested by

no test coverage detected