| 11 | from unittest import main, TestCase |
| 12 | |
| 13 | class BPFInstr(ct.Structure): |
| 14 | _pack_ = 1 |
| 15 | _fields_ = [('opcode', ct.c_uint8), |
| 16 | ('dst', ct.c_uint8, 4), |
| 17 | ('src', ct.c_uint8, 4), |
| 18 | ('offset', ct.c_int16), |
| 19 | ('imm', ct.c_int32)] |
| 20 | |
| 21 | class TestDisassembler(TestCase): |
| 22 | opcodes = [(0x04, "%dst += %imm"), |