Re: NKEs on Intel-based Macs
Re: NKEs on Intel-based Macs
- Subject: Re: NKEs on Intel-based Macs
- From: David A Rowland <email@hidden>
- Date: Thu, 3 Aug 2006 11:08:06 -0700
Title: Re: NKEs on Intel-based Macs
I just finished a universal NKE, and it seems fine. However, we
have not really begun to test, and Joshua's caution is a red flag for
us.
Nevertheless, our experience with the universal part was
smooth.
We did have a big/little endian problem. Our software uses
conditional defs like:
#if
defined(LITTLE_ENDIAN)
....
#elif
defined(BIG_ENDIAN)
...
#else
#error Must define
LITTLE_ENDIAN or BIG_ENDIAN in moptions.h
#endif
but the Apple headers define both LITTLE_ENDIAN and BIG_ENDIAN !
The KPIs are the same. The kernel sources
are similar.
The one big gotcha is that the stack swaps some fields in the ip
header. We missed this, so if you write an IP filter, the ip length
and a few other fields may be in host byte order instead of network
byte order. Some other functions, such as those that calculate
checksums, expect the data to be in network byte order. So...if you
run in to some weirdness, check the byte order.
-josh
On Aug 3, 2006, at 6:41 AM, Peter Lovell wrote:
I'm about to convert an application for
Intel-based Macs and would like
comments and suggestions about "gotchas", if any, with the
transition.
There are the standard Xcode and little-endian things, of course.
No
surprise there.
But are there other differences I need to look at? I'm working at
the
socket level, not down with hardware, so I suspect that above many
of
the differences.
Although we don't have kernel sources, I'd expect that the PPC
kernel
code is the same as that for Intel and I can use PPC for reference.
Can
someone at Apple comment if it's "close enough" for
NKEs.
THanks.....Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>ple.com
This email sent to email@hidden
Attachment converted: Savitri:smime 19.p7s (
/ ) (0041608F)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>lobal.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden