• 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
Is PPP connected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is PPP connected


  • Subject: Is PPP connected
  • From: <email@hidden>
  • Date: Mon, 30 Sep 2002 17:24:29 +0100
  • Organization: Coderus Ltd

Hi,
I am using a modified version of the below code to detect whether or not
that a machine is actually connected to the internet via PPP for MacOS 9.x,
I am now doing a MacOS-X version, but the code fails with a bad option for
CC_OPT_GETMISCINFO.

I've read the Technote 1145, which seems to imply that you should iterate
the IP address of the machine to find out if you are connected is this true
???,

Any Ideas
Thanks
Mark.


>
> OSStatus IsPPPConnected()
> {
> OSStatus err;
>
> TOptMgmt cm;
> TOption *option;
> char buffer[256];
> Str255 buf;
> CCMiscInfo c;
>
> cm.opt.buf=(unsigned char*)buffer;
> cm.opt.len=sizeof(TOptionHeader);
> cm.opt.maxlen=255;
> cm.flags=T_CURRENT;
> option = (TOption *)buffer;
> option->level='PPPC';
> option->name=CC_OPT_GETMISCINFO;
> option->status=0;
> option->len=sizeof(TOptionHeader);
> err = OTOptionManagement(gPPPEndpointRef,&cm,&cm);
>
> if(!err)
> switch(c.connectionStatus)
> {
> case kPPPConnectionStatusConnecting:
> case kPPPConnectionStatusIdle:
> case kPPPConnectionStatusDisconnecting:
> err = false;
> break;
>
> case kPPPConnectionStatusConnected:
> err = true;
> break;
>
> }
>
> return err;
> }
_______________________________________________
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: Re: programatically obtaining "Secure Web" proxy settings
  • Next by Date: Re: Re(2): programatically obtaining "Secure Web" proxy settings
  • Previous by thread: Re: programatically obtaining "Secure Web" proxy settings
  • Next by thread: Re: Is PPP connected
  • Index(es):
    • Date
    • Thread