Nothing about this func seems specific to pcap-file, it only acts on cuda_vars now. Think it can be generalized even more and move out of here into a util-cuda style file.