• 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: Open Transport?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Transport?


  • Subject: Re: Open Transport?
  • From: Xavier Jubier <email@hidden>
  • Date: Fri, 3 Oct 2003 16:22:40 +0200

You have to set up the connection parameters either by using OTOptionManagment() if you want to control everything programmatically or by setting default options in the preferences panels (Remote access and Modem control panel under OS 9, Network pane under X).

Also you have to listen to the events returned by your notifier function as the I_OTConnect call is always asynchronous.


Xavier

Le vendredi, 3 oct 2003, ` 15:46 Europe/Paris, Todd Casey a icrit :

I am trying to write an application that will run on Mac OS 8.6 - 10.2.6 that establishes a PPP Internet Connection programmatically without the users intervention. I would also like to have the username/password/access number hidden from the user (is this possible using OTOptionManagment()?).

Here is what I currently have. The code compiles and runs but it does not seem to even open the modem port. I am currently running OS 10.2.6. Is Open Transport the best method to use in establishing a PPP connection?

// CODE BEGINS

// linked OpenTransportLib

err = InitOpenTransportInContext(kInitOTForApplicationMask, nil);

notifier = NewOTNotifyUPP(Notifier); // I have a Notifier callback function defined earlier

ep = OTOpenEndpointInContext(OTCreateConfiguration(kPPPControlName), 0, NULL, &err, nil);
if(kOTNoError == err)
{
err = OTInstallNotifier(ep, notifier, ep);
err = OTSetAsynchronous(ep);
err = OTSetBlocking(ep);
err = OTIoctl(ep, I_OTGetMiscellaneousEvents, (void *)1);
err = OTIoctl(ep, I_OTConnect, NULL);

Listen to the events returned by the notifier before disposing of the endpoint and handle error codes returned

err = OTCloseProvider(ep);
}

if(notifier)
{

Not necessary because done by OTCloseProvider()

DisposeOTNotifyUPP(notifier);
}

// CODE ENDS

What am I doing wrong? I would greatly appreciate any help/info. I am new to Mac development and I have tried to search through the Internet and developer.apple.com before posting here.

Thanks,

Todd
The New Yahoo! Shopping - with improved product search
_______________________________________________
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.
_______________________________________________
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: Open Transport?
      • From: Todd Casey <email@hidden>
References: 
 >Open Transport? (From: Todd Casey <email@hidden>)

  • Prev by Date: Open Transport?
  • Next by Date: Re: Open Transport?
  • Previous by thread: Open Transport?
  • Next by thread: Re: Open Transport?
  • Index(es):
    • Date
    • Thread