Jump to content


Photo

Assigning Ip Address To Xbox


  • Please log in to reply
1 reply to this topic

#1 BadBeta

BadBeta

    X-S Enthusiast

  • Members
  • 3 posts

Posted 07 September 2002 - 08:23 PM

I'm having some trouble trying to manually assign an IP address to my Xbox system. I am unable to bind when I manually set the IP address. However when I set the address to INADDR_ANY, it works fine but I don't know the address of the Xbox system since it is given to me by DHCP. Anyone have any ideas? Here's fragment of code I am using:

CODE

sockaddr_in saServerAddress;

m_Socket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );

if( m_Socket == INVALID_SOCKET )
{
return false;
} // end if

memset( &saServerAddress, 0, sizeof( sockaddr_in ) );

saServerAddress.sin_family = AF_INET;
saServerAddress.sin_addr.s_addr = inet_addr( "192.168.1.105" ); // Doesn't work :(
// this works : saServerAddress.sin_addr.s_addr = htonl( INADDR_ANY );
saServerAddress.sin_port = htons( iPort );

if( bind(m_Socket, (sockaddr*) &saServerAddress, sizeof(sockaddr)) == SOCKET_ERROR )
{
LogXNetError( "Error binding server.", 0 );
Disconnect();
return false;
} // end if

return true;



Thanx

#2 BadBeta

BadBeta

    X-S Enthusiast

  • Members
  • 3 posts

Posted 09 September 2002 - 07:43 PM

Nevermind, this issue has been resolved with the release of the new EvolutionX. Static IP Addresses set in the EvolutionX settings can now be correctly obtained in your application with the standard code:

saServerAddress.sin_addr.s_addr = htonl( INADDR_ANY );





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users