Using fcntl from NKE
Using fcntl from NKE
- Subject: Using fcntl from NKE
- From: Mick Ring <email@hidden>
- Date: Thu, 17 May 2007 12:10:05 -0700
I'm developing an NKE that hooks socket operations via
kpi_socketfilter APIs. I need to be able to associate an incoming
socket_t with the pid of the process that created it. I've attempted
to use fcntl for this purpose, but my kext won't load because
"_fcntl" is an undefined symbol. My plist includes the following
OSBundleLibraries:
com.apple.kernel.bsd
com.apple.kernel.mach
com.apple.kpi.bsd
com.apple.kpi.iokit
com.apple.kpi.libkern
com.apple.kpi.mach
According to Apple documentation, I only need com.apple.kernel.bsd
and com.apple.kernel.mach in order to use the headers in /sys, which
is where you'll find fcntl.h.
Does the fact that fcntl is undefined mean that I can't use it in my
kext? If I can't use it, is there another mechanism for getting the
pid from a socket_t?
Mitchell J Laurren-Ring
Critical Path Software
_______________________________________________
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