Re: OTOptionManagement help?
Re: OTOptionManagement help?
- Subject: Re: OTOptionManagement help?
- From: Dylan Barrie <email@hidden>
- Date: Sun, 1 Dec 2002 20:10:34 -0800
I should have mentioned this, but I'm in OS9. :)
Like you suggested, I am using BSD sockets under X, but since these
aren't available while running under 9, I'm (trying) to use OT.
If anyone is curious, I'm using a PF_NODRV socket to achieve what I
need to do under X.
Dylan Barrie
Postpose.com
On Sunday, December 1, 2002, at 03:39 PM, Duane Murphy wrote:
--- 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.