Marshal and unmarshal frames