Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using fcntl from NKE



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:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.