remove redundant variable pktdata since buf_temp points to the command buffer