Re: TCPIP Load only when needed
Re: TCPIP Load only when needed
- Subject: Re: TCPIP Load only when needed
- From: David Nock <email@hidden>
- Date: Wed, 15 May 2002 08:58:09 +1200
>
At 11:11 +1300 7/3/02, David Nock wrote:
>
> We need to be able to check the status and and possibly modify the status
>
> of the 'Load only when needed' option within the TCPIP settings.
>
>
>
> Does anyone have any pointers/code to do this?
>
>
You can do this using Network Setup. It's probably easiest if you
>
use MoreNetworkSetup to read the configuration (NSHGetConfiguration)
>
and then look at the relevant field (fTCPv4.fUnloadAttr) in the
>
result.
>
>
<http://developer.apple.com/samplecode/Sample_Code/Networking/MoreNetworkSetup
>
.htm>
>
Hi Quinn,
Finally I've had the time to have a look at what you suggested above. Have
run into some errors compiling the sample app in MoreNetworkSetup archive.
/****************************************************************/
Error : illegal implicit conversion from 'unsigned char **' to
'void **'
NetworkSetupHelpers.c line 221 err = MNSGetPref(ref, entity,
kOTCfgUserVisibleNamePref, &entityName, &junkSize);
Project: NetworkSetupTest.mcp, Target: PPC, Source File:
NetworkSetupHelpers.c
Error : illegal implicit conversion from 'char **' to
'void **'
NetworkSetupHelpers.c line 4009 err = MNSGetPref(ref, entityID,
kOTCfgTCPInterfacesPref, &buffer, &prefSize);
Project: NetworkSetupTest.mcp, Target: PPC, Source File:
NetworkSetupHelpers.c
Error : illegal implicit conversion from 'struct CfgSetsVector **' to
'void **'
MoreNetworkSetup.c line 571 &vectorPrefData, &vectorPrefSize);
Project: NetworkSetupTest.mcp, Target: PPC, Source File: MoreNetworkSetup.c
/****************************************************************/
I'm running Codewarrior 7.0 under OSX10.1.4.
Back to my original problem:
I've had a read over the relevant code but I am getting myself lost. (it's
been a while since I've done any serious C programming, let alone tackle
OpenTransport).
Do I need to iterate over the configurations to tell what is the active
config set? Is there a quick way to retrieve the info I need from the active
TCPIP set?
Any help would be appreciated.
Cheers
Dave
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.