Passing up per-socket data from NKE
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com I have an NKE that installs a control socket and a socket filter. I have a userland process which opens a control connection, and receives incoming TCP connections. I'd like to pass up some per-socket data to the userland process The easiest way would be to write the data to the TCP stream on connect, but I'd prefer to pass it up "out of band" if possible. I looked at ioctl(SIOCGIFKPI), but I'm completely at a loss at how to make it work. int controlSocket = -1; controlSocket = socket(PF_SYSTEM, SOCK_DGRAM, SYSPROTO_CONTROL); struct ctl_info controlInfo = {0}; strcpy(controlInfo.ctl_name, MY_KEXT_BUNDLEID); ioctl(controlSocket, CTLIOCGINFO, &controlInfo); struct ifreq myreq = {0}; myreq.ifr_ifru.ifru_kpi.ifk_module_id = controlInfo.ctl_id; myreq.ifr_ifru.ifru_kpi.ifk_type = 1; int tcpSocket = myAcceptTCPConnection(); ioctl(tcpSocket, SIOCGIFKPI, &myreq); The last call is failing with ENXIO, and I never see the ioctl() come through. Thanks, Matt _______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt Slot