Re: OTOptionManagement help?
Re: OTOptionManagement help?
- Subject: Re: OTOptionManagement help?
- From: "Duane Murphy" <email@hidden>
- Date: Sun, 1 Dec 2002 15:39:06 -0800
--- At Sat, 30 Nov 2002 22:56:43 -0800, Dylan Barrie wrote:
>
The second call to OptionManagement always returns -3151, and I haven't
>
been able to figure out what I'm doing wrong.
>
>
Any help would be GREATLY appreciated!
>
You are not doing anything wrong. You arent allowed to do that. On OS X,
RAW sockets are both privileged and (I believe) not support under
OpenTransport.
If you want to do raw ethernet sockets, you have to switch to BSD sockets
and some magic formula for accessing them. I believe (hope) there is
sample code for doing this on the Apple dev web site.
Further, the tool (because it shouldnt be your app) needs to have root
privilege. You will also need to look at the AuthSample from the dev site
sample code.
You might also want to look at Steven's Unix Network Programming book for
examples on how to pass file descriptors between applications. This is a
very useful technique where you launch a privileged tool to open the
socket and pass the result file descriptor back to the parent
application. This greatly enhances the security of the main application.
Good luck. On OS X, this is a challenging area to develop.
...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.