• 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
Re: TCPIP Load only when needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCPIP Load only when needed


  • Subject: Re: TCPIP Load only when needed
  • From: David Nock <email@hidden>
  • Date: Wed, 31 Jul 2002 15:43:34 +1200

I have the set up the following method to test for the 'Load Only When
Needed' flag in the TCPIP options based on previous help. Unfortunately it
isn't returning the correct values. Every time I run this,
configToCloneDigest.fTCPv4.fUnloadAttr = 2 regardless of what the TCPIP
setting is.

Can anyone see what I'm missing?
InitOpenTransport is being called in a startup function.

Thanks
Dave


void ASL_Misc_Lown(short *returnedValue)
{
#if WINVER
*(SLONG *)returnedValue=0;
#else
OSStatus err;
OSType *protocol;
NSHConfigurationListHandle configList;
ItemCount i;
SInt8 s;
CfgEntityRef tmpEntity;
NSHConfigurationEntry configToClone;
NSHConfigurationDigest configToCloneDigest;

*(SLONG *)returnedValue=-1;

configList = (NSHConfigurationListHandle) NewHandle(0);
err = MemError();
*protocol = kOTCfgTypeTCPv4;

if (err == noErr)
{
MoreAssertQ(configList != nil);
err = NSHGetConfigurationList(*protocol, configList);
}
if (err == noErr)
{
s = HGetState( (Handle) configList);
HLock( (Handle) configList );
for (i = 0; i < NSHCountConfigurationList(configList); i++)
{
if((*configList)[i].selected)
{
configToClone = (*configList)[i];
OTMemzero(&configToCloneDigest,
sizeof(configToCloneDigest));
err = NSHGetConfiguration(&configToClone,
&configToCloneDigest);
if(err==noErr)
{
if(configToCloneDigest.fTCPv4.fUnloadAttr)
{
*(SLONG *)returnedValue = 1;
}
else
{
*(SLONG *)returnedValue = 0;
}
}
else
{
*(SLONG *)returnedValue = -4;
}

}
}
HSetState( (Handle) configList, s);
}

if ( configList != nil )
{
DisposeHandle( (Handle) configList );
MoreAssertQ(MemError() == noErr);
}

#endif

}
_______________________________________________
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.

  • Prev by Date: Which PPP Control/Status APIs to use?
  • Next by Date: MacOSX Lacks Kernel Support For PPP -- ???
  • Previous by thread: Which PPP Control/Status APIs to use?
  • Next by thread: MacOSX Lacks Kernel Support For PPP -- ???
  • Index(es):
    • Date
    • Thread