If I am using raw sockets to send a UDP packet of size 3000bytes, do I need to handle packet fragmentation myself in the code, or should the raw socket handle fragmentation
Nope, packet fragmentation is handled at a lower level. You should see exactly what you put in the packet come back out. That is to say UDP guaranties message boundaries.