Re: Connection to KEXT with kern_control
Re: Connection to KEXT with kern_control
- Subject: Re: Connection to KEXT with kern_control
- From: Allan Hoeltje <email@hidden>
- Date: Fri, 08 Jul 2005 15:30:31 -0700
Geesh!, I found _my_ problem. I misread the kern_ctl_reg description and
had set the ctl_flags field to CTL_FLAG_REG_SOCK_STREAM. It should be 0 for
data gram sockets.
Have a nice weekend!
-Allan
"Allan Hoeltje" <email@hidden> wrote on 7/7/05 11:13 AM:
> My socket woes continue.
>
> I am attempting to open a socket from my client application to my loaded
> KEXT. My client is using the sample code copied nearly verbatim from page
> 20 in the "Network Kernel Extensions Programming Guide".
>
> The code successfully executes the call to socket( PF_SYSTEM, SOCK_DGRAM,
> SYSPROTO_CONTROL ) and the call to ioctl() successfully obtains the dynamic
> ctl_id of my loaded KEXT. However, when I make the call to connect() I get
> a -1 return and errno contains: "41 Protocol wrong type for socket".
>
> What is wrong? My search for clues turned up nothing pertaining to KEXTs.
>
> -Allan
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden