From: GavinRo <ga...@ho...> - 2008-09-24 15:37:29
|
Ok!! 192.168.1.1 ____________ 192.168.0.1 ------------------------| | server------------------| | Client | ------------------------|___________ _| 192.168.1.2 Server send some data to client ,and the multihomed client's primary address is 192.168.1.1 now client change priamry address to 192.168.1.2, so the server send data to the address is 192.168.1.2 srever 192.168.0.1 ------> SACK -----> 192.168.1.1 client server 192.168.0.1 ------> DATA ------> 192.168.1.2 client now,I want find the primary address of receive data from client , and get the information. I try manay way to get the primary address from client ,as gethostbyaddr is get 192.168.1.1 the address , use SCTP_PEER_ADDR_PARAMS is return -1. I can't get the client 's primary address after change it's primary form cleint. >>>> hi >>>> >>>> I have a question. >>>> >>>> now, it has one server and one multihomed client. >>>> >>>> I want to obatin the primary address and it is using now. >>>> >>>> I am using SCTP_SET_PEER_PRIAMRY_ADDR to change the primay address ,as >>>> 192.168.123.12 ----> 192.168.123.13. >>>> >>>> now I use getsockname() ,I get the address is 192.168.123.12 ,not >>>> 192.168.123.13. >>>> >>>> but I want get the address is 192.168.123.13. >>>> >>>> Have any way to obatin? >>> Use SCTP_PRIMARY_ADDR with a getsockopt(). >> >> Thanks, but I want to get the address information from client. >> >> Have other way? or usse SCTP_PEER_ADDR_PARAMS ? >> > > Can you explain what exactly do you want to do? > > ex: "On the server, I wish to find out what address the client considers primary". > > Thanks > -vlad > >>> -vlad >>> >>>> thanks |