PPPoE and UDP
PPPoE and UDP
- Subject: PPPoE and UDP
- From: "Duane Murphy" <email@hidden>
- Date: Tue, 21 Jan 2003 11:06:01 -0800
I am working on a program that would like to just send a simple UDP
packet. However, I have noticed that when PPPoE is disconnected, calling
sendto() doesnot get PPPoE to connect. Is there something I am doing
wrong? How can I get PPPoE to connect in this case?
Here is a stripped down version of the code that I am using for testing:
int fd = socket( AF_INET, SOCK_DGRAM, 0 );
if ( fd > 0 )
{
struct sockaddr_in servaddr = { 0 };
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = INADDR_ANY;
servaddr.sin_port = 13; // Echo?
int status = sendto( fd, "a", 1, 0,
reinterpret_cast< sockaddr* >( &servaddr ),
sizeof( servaddr ) );
success = ( status == 1 );
}
status is one indicating that it sent the one character, but PPPoE
doesnot connect. Am I missing a step?
TIA!
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.