Split out non record layer functions out of s3_pkt.c and d1_pkt.c into