Update packetfunctions.c