MCPcopy Create free account
hub / github.com/secdev/scapy / LcEMI

Class LcEMI

scapy/contrib/knx.py:311–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309# cEMI blocks
310
311class LcEMI(Packet):
312 name = "L_cEMI"
313 fields_desc = [
314 FieldLenField("additional_information_length", 0, fmt="B",
315 length_of="additional_information"),
316 StrLenField("additional_information", None,
317 length_from=lambda pkt: pkt.additional_information_length),
318 # Controlfield 1 (1 byte made of 8*1 bits)
319 BitEnumField("frame_type", 1, 1, {
320 1: "standard"
321 }),
322 BitField("reserved_1", 0, 1),
323 BitField("repeat_on_error", 1, 1),
324 BitEnumField("broadcast_type", 1, 1, {
325 1: "domain"
326 }),
327 BitEnumField("priority", 3, 2, {
328 3: "low"
329 }),
330 BitField("ack_request", 0, 1),
331 BitField("confirmation_error", 0, 1),
332 # Controlfield 2 (1 byte made of 1+3+4 bits)
333 BitEnumField("address_type", 1, 1, {
334 1: "group"
335 }),
336 BitField("hop_count", 6, 3),
337 BitField("extended_frame_format", 0, 4),
338 KNXAddressField("source_address", None),
339 KNXGroupField("destination_address", "1/2/3"),
340 FieldLenField("npdu_length", 0x01, fmt="B", length_of="data"),
341 # TPCI and APCI (2 byte made of 1+1+4+4+6 bits)
342 BitEnumField("packet_type", 0, 1, {
343 0: "data"
344 }),
345 BitEnumField("sequence_type", 0, 1, {
346 0: "unnumbered"
347 }),
348 BitField("reserved_2", 0, 4),
349 BitEnumField("acpi", 2, 4, KNX_ACPI_CODES),
350 BitField("data", 0, 6)
351
352 ]
353
354
355class DPcEMI(Packet):

Callers 1

CEMIClass · 0.85

Calls 6

FieldLenFieldClass · 0.90
StrLenFieldClass · 0.90
BitEnumFieldClass · 0.90
BitFieldClass · 0.90
KNXAddressFieldClass · 0.85
KNXGroupFieldClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…