• 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: Non Carbon OT APIs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Non Carbon OT APIs?


  • Subject: RE: Non Carbon OT APIs?
  • From: Quinn <email@hidden>
  • Date: Tue, 19 Mar 2002 10:40:59 +0000

At 17:02 -0800 15/3/02, Joe Kelly wrote:
My shared library was calling InitOpenTransport(), and when I removed the
call, it no longer crashed.

This is probably wrong. Your InterfaceLib-based shared library should call InitOpenTransport and link with the "Extn" flavour of the OT libraries. This will prevent the crash and cause OT to do the right thing as far as tracking its assets (endpoints, memory, etc).

Alternatively, you can use the OTClassicContext library, which gives you the Carbon "InContext" calls under InterfaceLib, and then use InitOpenTransportInContext and pass it kInitOTForExtensionMask.

<http://developer.apple.com/samplecode/Sample_Code/Networking/OTClassicContext.htm>

FWIW: the app does call
InitOpenTransportInContext() down in the PowerPlant network classes.

That's fine, but OT needs you to create an OT context for each set of global variables in your application. Your app and your shared library have different globals, and thus you need two OT contexts. This is set out in gratuitous detail in DTS Technote 1173 "Understanding Open Transport Asset Tracking".

<http://developer.apple.com/technotes/tn/tn1173.html>

Can anyone suggest to a network programming newbie an OS 9 CarbonLib 1.5
alternative to using OTStream calls to get the router's MAC address? (why no
OTGetRouterMacAddress() call? : )

You will need to do some BSD stuff here. I think the easiest way to do this is with the SIOCGARP ioctl. This ioctl is covered in "UNIX Network Programming". You may need to communicate with the router (send any packet to it) to populate the ARP cache before issuing the ioctl.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >RE: Non Carbon OT APIs? (From: Joe Kelly <email@hidden>)

  • Prev by Date: Re: OTFindAndRemoveLink debugging
  • Next by Date: help: Is it still possible to write pap server on OS X ?
  • Previous by thread: RE: Non Carbon OT APIs?
  • Next by thread: SIGPIPE and EPIPE
  • Index(es):
    • Date
    • Thread