I am a newbie to networking, and I'm trying to create a basic game server on my computer using C++, winsock and UDP packets.
I've set up port forwarding on my router so that all UDP traffic through the port I set goes straight to my computer on a static IP. This means I can receive traffic sent by computers on the internet, however I still do not know how to send packets back to those computers? I don't really want to use a proxy server because they are notoriously.
As I understand, you have to include the destination MAC address in the IP packet so it is sent to the correct local address by the destination router, but I have no idea how to retrieve the mac address from the received packet, and how to include the address in the packet to send back?
I could get everyone to port forward, but this is very impractical, so I was wondering if anyone knew how I could solve this problem?
Thanks in advance!