Is there any way to eleminate ethernet header and creating IP only Network kext

Hi,


I'm writting a sample network Kext (mainly to exchange IP packets)

created Network interface using IONetworkController::attachInterface(), -> I'll get IONetworkInterface


Is there any way to discard the ethernet header by configuring the interface or get only IP packets in Tx end IONetworkController::outputPacket()

after thet with the flags like

IONetworkInterface::setInterfaceType(IFT_ETHER) -> How to select IP only packects

IONetworkInterface::setMediaAddressLength(0)

IONetworkInterface::setMediaHeaderLength(0)

IONetworkInterface::setFlags(IFF_NOARP)


Thanks

Venkat

Accepted Reply

The best way to create an IP-only interface is via a Network Extension provider. The main advantage of this approach is that all of your code runs in user space, which is a lot more fun than doing this in the kernel.

You can learn more about Network Extension providers WWDC 2015 Session 717 What’s New in Network Extension and VPN.

Note That end of that video indicates that you need a special entitlement for Network Extension providers. That’s no longer the case. See Network Extension Framework Entitlements for details.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

If possible can you share any documents/info regarding "Network Kernel Extentions" /NKE's

The best way to create an IP-only interface is via a Network Extension provider. The main advantage of this approach is that all of your code runs in user space, which is a lot more fun than doing this in the kernel.

You can learn more about Network Extension providers WWDC 2015 Session 717 What’s New in Network Extension and VPN.

Note That end of that video indicates that you need a special entitlement for Network Extension providers. That’s no longer the case. See Network Extension Framework Entitlements for details.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"