| % ProfinetIO layer test campaign |
| |
| + Syntax check |
| = Import the ProfinetIO layer |
| from scapy.contrib.pnio import * |
| |
| |
| + Check DCE/RPC layer |
| |
| = ProfinetIO default values |
| raw(ProfinetIO()) == b'\x00\x00' |
| |
| = ProfinetIO overloads Ethertype |
| p = Ether() / ProfinetIO() |
| p.type == 0x8892 |
| |
| = ProfinetIO overloads UDP dport |
| p = UDP() / ProfinetIO() |
| p.dport == 0x8892 |
| |
| = Ether guesses ProfinetIO as payload class |
| p = Ether(hex_bytes('ffffffffffff00000000000088920102')) |
| p.payload.__class__ == ProfinetIO and p.frameID == 0x0102 |
| |
| = UDP guesses ProfinetIO as payload class |
| p = UDP(hex_bytes('12348892000a00000102')) |
| p.payload.__class__ == ProfinetIO and p.frameID == 0x0102 |
| |
| = ProfinetIO guess payload to PNIORealTime |
| p = UDP(hex_bytes('12348892000c000080020102')) |
| p.payload.payload.__class__.__name__ == 'PNIORealTime' and p.frameID == 0x8002 |
| |