Re: SYSCTL
Re: SYSCTL
- Subject: Re: SYSCTL
- From: "Matt Jaffa" <email@hidden>
- Date: Sat, 7 Feb 2004 16:45:07 -0700
I am planning on having my Daemon in userspace pass in the socket it creates
so that I can use
unp_connect and bind the socket from userspace and the one i create in the
Kernel together so that I can create a communication channel between my User
Daemon and my KEXT,
I can find no other solution to my problem, I have aksed over and over on
this list for help with ipc but they reply back making every solution seem
stupid, since my KEXT is not an IOKit service I can't use it the way normal
IOKits communicate with their KEXTs,
So by using the above method ( the way webDAV does it) and it works and no
crashing I will be satisified, unless there is a much better way of doing
things, that someone can ppoint me too very well documented stuff, instead
of documentation that only states it exists and does no help.
Will my above method work theoretically ?
Thanks,
Matt
----- Original Message -----
From: "Michael Smith" <email@hidden>
To: "Matt Jaffa" <email@hidden>
Cc: <email@hidden>; "Brian Bergstrand"
<email@hidden>
Sent: Saturday, February 07, 2004 4:12 PM
Subject: Re: SYSCTL
>
>
I assume that you want to create a new toplevel node? This is
>
generally discouraged, although until there are new toplevel 'com' and
>
'org' nodes there's no better mechanism available.
>
>
You should be registering the nodes with sysctl_register_oid() to make
>
them visible to the sysctl infrastructure though.
>
>
Also, note that it's not safe to assume that you can pass the contents
>
of a socket structure out to userspace. The socket structure's
>
private, and as a general rule you shouldn't be messing with its
>
innards. Allowing a user process to overwrite it is a guaranteed
>
kernel crash in your near future.
>
>
>
>
On Feb 7, 2004, at 10:16 AM, Matt Jaffa wrote:
>
>
> Thank you,
>
> That was a typo and now it is fixed.
>
>
>
>
>
> On Feb 7, 2004, at 11:08 AM, Brian Bergstrand wrote:
>
>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>
>> Hash: SHA1
>
>>
>
>>
>
>> On Feb 7, 2004, at 2:04 AM, Matt Jaffa wrote:
>
>>
>
>>> Hi,
>
>>>
>
>>> I am trying to create my own SYSCTL_NODE and SYSCTL_STRUCT,
>
>>>
>
>>> so that I can communicate with my KEXT from userland.
>
>>>
>
>>> But after doing these lines, it compiles fine,
>
>>>
>
>>> SYSCTL_DECL(_jaffa);
>
>>> SYSCTL_NODE(, OID_AUTO, _jaffa, CTLFLAG_RW, 0, "Jaffa");
>
>>>
>
>>> struct sysctl_oid_list sysctlr__jaffa_children;
>
>>>
>
>>
>
>> I see a typo here.
>
>>
>
>> sysctlr__ should be sysctl__.
>
>>
>
>> I suspect this is the cause of your problem.
>
>>
>
>> HTH.
>
>>
>
>>> SYSCTL_STRUCT(_jaffa, OID_AUTO, ttttt, CTLFLAG_RW, &so, socket,
>
>>> "dfdf");
>
>>>
>
>>> but when I try to load the KEXT it throws this error:
>
>>>
>
>>> kextload: extension /System/Library/Extensions/EtherView.kext appears
>
>>> to be valid
>
>>> kld(): Undefined symbols:
>
>>> _sysctl__jaffa_children
>
>>>
>
>> Brian Bergstrand <http://www.bergstrand.org/brian/>, AIM: triryche206
>
>> PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt>
>
>> Maybe this world is another planet's hell. - Aldous Huxley
>
>> As of 12:03:13 PM, iTunes is playing "My Wave" from "Superunknown" by
>
>> "Soundgarden"
>
>>
>
>> -----BEGIN PGP SIGNATURE-----
>
>> Version: PGP 8.0.3
>
>>
>
>> iQA/AwUBQCUbinnR2Fu2x7aiEQKysQCeOt0SaIirmjDKuy1sEuIfV1DRFMoAn0//
>
>> Pd8P3kKJjEqm8T0Z0gj/rl8z
>
>> =b2TN
>
>> -----END PGP SIGNATURE-----
>
> _______________________________________________
>
> darwin-kernel mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/darwin-kernel
>
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
References: | |
| >SYSCTL (From: Matt Jaffa <email@hidden>) |
| >Re: SYSCTL (From: Matt Jaffa <email@hidden>) |