Re(2): Am I Connected (Cont)
Re(2): Am I Connected (Cont)
- Subject: Re(2): Am I Connected (Cont)
- From: Jens Bauer <email@hidden>
- Date: Tue, 12 Feb 2002 15:45:24 +0100
Hi John,
On Tue, 12 Feb, 2002, John Cebasek <email@hidden> wrote:
>
So, looking at OTPingSample, I could just try and ping the target (just
>
once?) and if that works, yippee, I'm connected?
You can do that, but you should definately look at the TN1145 and
understand the different issues.
>
And, in trying to carbonize OTPingSample, in the CreateAndConfigICMP
>
function, I'm getting a -3200 (Not permitted) error as a result from
>
OTOpenEndpoint(). Is it my lack of network programming experience, or is
>
not using the new versions of the unsupported APIs (the ones without the
>
OTClientContextPtr parameter) enough to get this carbonized?
This is a very frequently asked question, everyone had the problem at
some point.
-3200 is a permission error, you are not allowed to send ICMP packets
without having root access.
You can ask the user for a username and password, after this, you're
allowed to send ping packets.
I figure that you're not interested in asking the user for username and
password, because then you could just ask him anyway if he's already on
the net. If you need root access anyway, you can still use the ICMP
sample. I used pinging myself, since I need root access for other purposes.
If you are interested in solving the permission error and asking for a
username/password, I've included a part of a message Quinn wrote recently:
---8<-----8<-----8<-----
>
As Quinn indicated, I have a rough sample, which demonstrates how to
>
send and receive raw packets using a PF_NDRV socket. The big issue
>
with using a PF_NDRV socket is that the program must have admin
>
privileges. Thats a different subject, one which has been discussed
>
by Quinn over the past couple of weeks. Take a look at the Open
>
Transport mail list archives over the pas couple of weeks with the
>
keyword "authsample". Refer to the archive links shown above.
I've just been informed that the official version of AuthSample is
now available from the Apple developer web site.
<
http://developer.apple.com/samplecode/Sample_Code/Security/AuthSample.htm>
--->8----->8----->8-----
Love,
Jens
--
Jens Bauer, Faster Software.
_______________________________________________
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.