Re: Error codes
Re: Error codes
- Subject: Re: Error codes
- From: Vincent Lubet <email@hidden>
- Date: Tue, 23 Mar 2004 11:15:16 -0800
On Mar 22, 2004, at 9:08 AM, Justin Walker wrote:
On Mar 22, 2004, at 7:59, Matt Jaffa wrote:
I was wondering what error code I should throw.
You may not be alone :-}
I am intercepting TCP traffic through my KEXT,
after the result comes back from the daemon and I want to block the
traffic,
What is the best error to throw that will let internet explorer in
classic not try the URL again.
It works for Safari and IE(non classic version) if I use ENETDOWN,
EACCES,
and they don't try it again.
But when I am using those errors for Classic's IE it blocks but keeps
trying the URL over and over again.
There could be many reasons for this behavior, and you'll need an OT
expert to unravel them...
- Classic, and OT in particular, was not built with Unix-style errno
codes in mind. The deeper recesses of OT do use the same error code
names, though, but they use a different version of the header
<sys/errno.h>. In particular, it's possible that EACCES (on Mac OS X)
and EAGAIN (on Classic/OT/Mentat) (for example) share the same numeric
code. That would be a bummer, of course. An OT expert will have to
share his understanding of this one.
In fact OT was built with Unix-style errno codes because it is a
STREAMS stack after all. The errno codes known by OT can be found in
<OpenTransport.h>
- The Classic version of IE doesn't know what to do with EACCES.
Again, an OT expert may have the answer.
That's correct.
- The error code returned by your NKE gets lost somewhere between
your NKE and IE; if it doesn't get lost, it gets translated; see the
previous two comments.
Yes, because the error code comes from the driver modules, it is likely
to be transformed into a generic code (I did not check)
I think you get the drift. It's not a problem that can easily be
solved, since the two systems (Mac OS X and Classic/OT) were never
intended to merge smoothly together.
Hope that helps clarify things (and, perhaps, prompts someone with
Knowledge to pipe up).
Instead of returning an error code in the interface filter, I would
simply drop the outgoing packet, and instead send up a packet with TCP
RST and/or an ICMP port (or host) unreachable. That way both the OT
stack and the application will see the connection cannot be made.
Vincent
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.