I would like to know if it's possible to modify an already made struct.
What I want is to calculate the CRC of header and then write the CRC value to the 3rd position in header.
import struct
import crcmod
crcfunc = crcmod.mkCrcFun(0x112, 0x00, 0x00)
header = struct.pack('!hii', 1, 2, 0)
crcvalue = crcfunc(header)