Just to make sure: This bind is on the receiving side and its purpose is to
associate a port number with the socket, right?

>       Destination.sin_family = AF_INET;
Good

>       //Destination.sin_addr.s_addr = 0xC7215111;
>       Destination.sin_addr.s_addr = 0xC621518B; 
Two things here:
1) You are binding to 139.81.33.198, is that what you meant?  I'm betting
you meant the bytes in the other order--use htonl or address it as a byte
array (not as a long).
2) You might try INADDR_ANY here.  The linux man pages are abysmally curt
when it comes to BSD sockets functions.  You might try finding the WinSock
docs in a form you can read.

>       Destination.sin_port = htons (TEST_PORT);
Good

You MUST bind on the receiving side so that data on that port will arrive
on your socket with a call to recv or recvfrom.  The sending side needn't
bind explicitly (and it uses sendto.)

As you are testing this stuff you will likely run into another binding
error: "address already in use".  You need to set the REUSEADDR socket
option. (the specifics escape me at the moment.)

-Mike
[EMAIL PROTECTED]




-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to