[Live-devel] Getting source IP address
Mallikharjuna Reddy (NAVT)
ymreddy at ssdi.sharp.co.in
Fri Jul 21 03:45:56 PDT 2006
Hi Everybody,
I am trying to stream MPEG2 data from server to client in a unicast
environment. In the server side file, testMPEG1or2VideoStreamer.cpp, I have
given the client IP address. In the client side file,
testMPEG1or2VideoReceiver.cpp, again, I have given the client side IP
address.
When I receive the packets in the client side, I would like to get the
source IP address and port number from where the packets are coming. I have
added the following lines in networkReadHandler() function
MultiFramedRTPSource.cpp file.
******************************************************************
const struct in_addr in_addr1= source->RTPgs()->groupAddress();
char *ip = inet_ntoa(in_addr1);
const portNumBits port= source->RTPgs()->portnum();
*******************************************************************
In the above statement, I am getting the IP address (variable ip) of the
client machine instead of server. Port number is also same.
How do I get the server IP address. I am doing this for SSRC collision
detection and resoultion as part of my project work.
Thanks and Regards
Y. Mallikharjuna Reddy
More information about the live-devel
mailing list