• 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
Internet Connection on OS X (PPP)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Internet Connection on OS X (PPP)


  • Subject: Internet Connection on OS X (PPP)
  • From: Payman <email@hidden>
  • Date: Thu, 07 Nov 2002 14:59:42 +0100

Hi

My problem is connection errors
in OTNotifierProc i recieve always kOTNoError
- Try with wrong password nothing all is ok Display Disconnect OK ???
- Same thing with wrong phone number ...

here is my code simplified :

Init:
UOpenTptSupport::StartOpenTransport();
mEndPoint=::OTOpenEndpoint(::OTCreateConfiguration(kPPPControlName),0,nil,&err);
mEndPoint->InstallNotifier((OTNotifyProcPtr)otNotifierProc,(void*)this);
::OTSetAsynchronous(mEndPoint);
::OTIoctl(mEndPoint,I_OTGetMiscellaneousEvents,(void*)1);
::OTIoctl(mEndPoint,I_OTConnect,NULL);

pascal void ConnectionController::OTNotifierProc(ConnectionController *inconCtrl,OTEventCode code,OTResult res,void *cookie)
{
#pragma unused (context)
#pragma unused (res)
CString strerr;
OTResult err;
switch (code)
{
case kOTSyncIdleEvent:
YieldToAnyThread();
break;
case kPPPConnectCompleteEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==1)
break;
if (err==kOTNoError)
{
inconCtrl->Display("Connect OK\n");
...
}
else
{
inconCtrl->Display("Connect fail\n");
}
inconCtrl->mConError=err;
inconCtrl->CloseDlgBox();
break;
case kPPPDisconnectCompleteEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==kOTNoError)
{
inconCtrl->Display("Disconnect OK\n");
...
}
else
{
inconCtrl->Display("Disconnect fail\n");
}
inconCtrl->mConError=err;
inconCtrl->CloseDlgBox();
break;
case kPPPAuthenticationStartedEvent:
Display("Start Authentication\n");
break;
case kPPPAuthenticationFinishedEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==kOTNoError)
{
inconCtrl->Display("Authentication OK\n");
...
}
else
{
inconCtrl->Display("Authentication fail\n");
}
break;
}
...
}

any thing wrong ?
this works under OS 9 ...
Is there other techno. for doing this ?

Thanks.

PS:
- There is no docs for this in apple docs just un PDF doc 1996

- ISP Application with CW8.2 & PowerPlant & SCF ...
_______________________________________________
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.

  • Follow-Ups:
    • Re: Internet Connection on OS X (PPP)
      • From: Jens Bauer <email@hidden>
  • Prev by Date: MoreSCF and masterPort
  • Next by Date: Re: Internet Connection on OS X (PPP)
  • Previous by thread: Re: MoreSCF and masterPort
  • Next by thread: Re: Internet Connection on OS X (PPP)
  • Index(es):
    • Date
    • Thread