• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using fcntl from NKE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Using fcntl from NKE
      • From: Quinn <email@hidden>
  • Prev by Date: Re: Mounting network resources
  • Next by Date: Re: Using fcntl from NKE
  • Previous by thread: Re: Mounting network resources
  • Next by thread: Re: Using fcntl from NKE
  • Index(es):
    • Date
    • Thread