site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hello, Any help will be greatly appreciated, thanks!! -b _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... I'm writing a driver that needs to read and write raw ethernet frames. After reading source code all day I've come to the conclusion that hooking in to the dlil with ifnet_attach_protocol() would be great, except that ether_demux() dispatches to protocol handlers by looking at both the ethernet type field and the protocol family that was specified when the protocol was registered. For my purposes I want to send and receive frames that have a specific ethernet type (IANA registered but non-standard). There are no registered protocol families for this type however. My question is, what should I use for the protocol family (if in fact hooking in via ifnet_attach_protocol() is the correct thing to do)? I could use PF_NDRV which seems to be for raw frames, but if I do I suspect that will conflict with userland processes that wish to use PF_NDRV at the socket level. I could also just use a value greater than AF_MAX, but that seems a bit dodgy as it might collide later with something else. If I'm thinking about this all wrong I'd love to hear some other ideas. I *do* need to be in the kernel as I'm interfacing with other drivers but all I need is to send and receive ethernet frames with a specific type while not interfering with the rest of the network stack. This email sent to site_archiver@lists.apple.com