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

Re: Is PPP connected


  • Subject: Re: Is PPP connected
  • From: <email@hidden>
  • Date: Mon, 30 Sep 2002 23:59:32 +0100
  • Organization: Coderus Ltd

Thanks for the pointer, I guess MacOS - X is more strict, than 9.x was.

Will I be able to re-use my code from MacOS 9.x for initiating a connection
via

::OTIoctl ( endPoint, I_OTConnect, NULL );

Also adding
OTInstallNotifier(endPoint, (OTNotifyProcPtr)notifyProc, NULL);
OTSetAsynchronous(endPoint);

::OTIoctl( endPoint, I_OTGetMiscellaneousEvents, (void*)1 );

To track how the connection is going

And Closing

OTIoctl ( endPoint, I_OTDisconnect, NULL );

Or do I need to do something else now for MacOS - X, I can tell that I need
something else for setting up the configuration.

Thanks
Mark.

> The size of the option is too small.
> The following code snippet should fix the problem:
>
> option = (TOption *)buffer;
> option->level='PPPC';
> option->name=CC_OPT_GETMISCINFO;
> option->status=0;
> option->len=sizeof(TOptionHeader) + sizeof(CCMiscInfo);
> err = OTOptionManagement(gPPPEndpointRef,&cm,&cm);
>
> Vincent
>
> On Monday, September 30, 2002, at 08:07 AM, email@hidden
> wrote:
>
>> Hi,
>> I was wondering if you found an answer for this, as having the same
>> problem, as I have code which works great for MacOS 9.x, but MacOS-X
>> the
>> code fails with -3155, which is a bad option :-).
>>
>> I found the updated TechNote, but doesn't look the answer is there,
>> although I might not fully understand the TechNote as I'm not a network
>> guru.
>>
>> I have also got the MoreSCF samples, but just seems to fail on my
>> system
>> :-(
>>
>> Any ideas
>>
>> Thanks
>> Mark.
>>
>>
>>> Message: 5
>>> Date: Sun, 08 Jul 2001 08:52:44 -0700
>>> Subject: Is PPP connected
>>> From: Trygve Inda <email@hidden>
>>> To: Carbon Development <email@hidden>
>>>
>>> I am looking for a Carbon/OS X/OS 9 way of determining if the user is
>>> on a
>>> dialup connection and if it is connected at the moment. I have looked
>>> an
>>> Technote 1145 but it says...
>>>
>>> "The algorithms described below for avoiding unsolicited dials will
>>> not work
>>> on multi-link multi-homing implementations, such as Mac OS X Public
>>> Beta and
>>> future versions of Open Transport on Mac OS 9. This technote will be
>>> updated
>>> to describe multi-homing compatible solutions as they become
>>> available (rr.
>>> 2514329, 2514335)."
>>>
>>> I found this code on the list archives, but don't know where the
>>> gPPPEndpointRef came from...
>>>
>>> Any ideas on a good solution?
>>>
>>> Thanks,
>>>
>>> Trygve
>>>
>>> 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;
>>> }
>> _______________________________________________
>> openplay-development mailing list |
>> email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/openplay-development
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
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: Re(4): programatically obtaining "Secure Web" proxy settings
  • Next by Date: Re: Is PPP connected
  • Previous by thread: Is PPP connected
  • Next by thread: Re: Is PPP connected
  • Index(es):
    • Date
    • Thread