Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,829
1,132
The Land of Hope and Glory
I thought I'd have a play around with NKEs (Network Kernel Extensions) and while I have certainly made some progress I think I am missing something fundamental in my understanding.

I'm not sure if many people here have had a look around the Mac OS X kernel but I'll try and explain my problem as clearly as possible.

Right I am trying to implement DCCP via a kernel extension (RFC 4340 if you are interested). I have it attaching to an interface of type IFNET_FAMILY_ANY and using either IP4 or IP6.

The problem comes when trying to handle incoming packets. One must fill in a ifnet_attach_proto_param struct but I am having trouble understanding what goes in the ifnet_demux_desc struct field. Mainly the problem is with the first field. If I have defined the interface family as any it makes it quite hard to specify what the data type is. The protocol specification is not very helpful and I have a feeling this is somewhat lower level than the protocol level anyway.

Chances are I could get away with using ETHER_DESC_ETYPE2 but I would rather understand why than just hope.

Thanks for any help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.