Divert Sockets
Divert Sockets
- Subject: Divert Sockets
- From: manju dogra <email@hidden>
- Date: Thu, 22 Jul 2004 03:34:25 -0700 (PDT)
Hi all,
I am using divert sockets on Mac OS X to divert TCP sockets to my application.
The man page of divert states that each incoming packet has the sin_addr in the sockaddr structure set to the interface for which it is meant and each outgoing packet has sin_addr set to INADDR_ANY.
After I read the packet using recvfrom, I forward it to another application on my machine.
When I receive the packet from the application and do a sendto on the divert socket, I have no way of finding out whether the packet was incoming or outgoing.
Will this be a problem?
I have tested my application with the sin_addr for all packets set to INADDR_ANY
in the sockaddr of sendto and things seem to work fine.
The only problem I am facing is that after some traffic has gone through, sendto fails
with errno = 50 (ENETDOWN) Are these related?
Can anyone help me on this one?
Will be grateful! :-)
Thanks
Regards
Manju.
Vote for the stars of Yahoo!'s next ad campaign!
_______________________________________________
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.