Re: Socket protocol which does not use Unsupported.kext
Re: Socket protocol which does not use Unsupported.kext
- Subject: Re: Socket protocol which does not use Unsupported.kext
- From: Michael Tuexen <email@hidden>
- Date: Fri, 19 Oct 2007 22:47:29 +0200
Hi Aingoppa,
see my comments in-line.
Best regards
Michael
On Oct 19, 2007, at 10:26 PM, Gi youl Kim wrote:
Hi Micheal:
The drawbacks you posted are the reason why I want to code without
unsupported APIs.
If you implemented SCTP with socket support, let me know the functions
to register sockets which are supported by Apple.
My point is: There is no supported API which you can use to implement
a transport protocol. The application can just use sockets for SCTP as
if the SCTP implementation came from Apple just like TCP.
By the way, what is kernel sources and headers and the headers
provided by Apple?
I have xnu-792.18.15 sources and MacOSX10.*.sdk. Do you mean that I
should use MacOSX10.*.sdk?
We use the /Developer/SDKs/MacOSX10.4u.sdk and some header files from
the latest xnu sources.
If you want, I can send you the XCode project. Then you can see how
we use it...
FYI
My protocol is 'LPX' which has protocol type 0x88ad. LPX is used for
our product which is kind of storage over the ethernet.
So you want to implement a protocol on top of ethernet... Not sure
about the APIs at that level...
Here is plist which I use
<dict>
<key>com.apple.kpi.bsd</key>
<string>8.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0.0</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>8.0.0</string>
</dict>
On 10/19/07, Michael Tuexen <email@hidden> wrote:
Hi Aingoppa,
what protocol do you want to implement? We have implemented SCTP, a
transport protocol. Basically, it is the same code as in the
FreeBSD 7.0
kernel, but with some changes for Mac OS X (locking, timers).
You need to use
<dict>
<key>com.apple.kernel</key>
<string>8.10.1</string>
</dict>
in your Info.plist file and also use some headers from the
kernel sources instead of the headers provided by Apple.
This all and the usage of net_add_proto() and net_del_proto()
is an unsupported API and has several drawbacks:
1. Apple can change it any time or make it impossible to
implement transport protocols via NKEs. Fortunately,
we could use the API from 10.3.9 to 10.4.10. Not sure
about 10.5.
2. You can build a NKE only for one specific Mac OS X version.
Although, you can build a universal binary for the NKE, it
does only load on Intel or PPC, because the kernel has different
versions.
3. You really depend on Apple, providing the source for the kernel
to get the header files you need (you do not need the source
files).
This means you can not delevop/test a Leopard version until Apple
releases the sources for a Leopard kernel. Not sure when this
will happen. Currently not even the 10.4.10 sources are
available.
Best regards
Michael
On Oct 19, 2007, at 5:24 PM, Gi youl Kim wrote:
I want to create a protocol which support socket interface. I could
create one using net_add_proto() and net_del_proto().
But those functions are included by Unsupported.kext. And worse,
some functions like sbfree() was not even exported.
So I had to use codes in open xnu source to the protocol work.
Can you create a socket protocol which does not use
Unsupported.kext?
If you can't, how can you create a protocol?
Aingoppa.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40lurchi.franken.de
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden