I am currently sending out UDP traffic on a random port by using:-
local.sin_family = AF_INET;
local.sin_addr.s_addr = htonl(INADDR_ANY);
local.sin_port = htons(0);
As you know this picks a random, unused port to send traffic from...
I then want to listen on that port which was randomly selected for return traffic...
How can I get which port the computer randomly chose as local.sinp_port always remains 0.
Cheers,
Matt
local.sin_family = AF_INET;
local.sin_addr.s_addr = htonl(INADDR_ANY);
local.sin_port = htons(0);
As you know this picks a random, unused port to send traffic from...
I then want to listen on that port which was randomly selected for return traffic...
How can I get which port the computer randomly chose as local.sinp_port always remains 0.
Cheers,
Matt