• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..28-Aug-201415

CarbonResource.rH A D10-Aug-2009691

Mac OS Test Responder.cH A D10-Aug-20098.9 KiB

Mac OS Test Searcher.cH A D10-Aug-20099.1 KiB

mDNS.mcpH A D28-Jun-2004978.8 KiB

mDNSLibrary.cH A D01-Dec-20112.3 KiB

mDNSLibraryLoader.cH A D01-Dec-20112 KiB

mDNSLibraryResources.rH A D10-Aug-20096.4 KiB

mDNSMacOS9.cH A D01-Dec-201126.1 KiB

mDNSMacOS9.hH A D01-Dec-20112.3 KiB

mDNSPrefix.hH A D01-Dec-20112.5 KiB

README.txtH A D12-Mar-20042.3 KiB

Responder.cH A D01-Dec-20117.2 KiB

Searcher.cH A D01-Dec-20119 KiB

ShowInitIcon.cH A D01-Dec-20116.6 KiB

ShowInitIcon.hH A D02-Apr-2004586

SubTypeTester.cH A D01-Dec-20119 KiB

README.txt

1This directory contains support files for running mDNS on Mac OS 9
2(and Carbon).
3
4mDNS.mcp is a CodeWarrior 8 project file.
5
6mDNSMacOS9.c and mDNSMacOS9.h are the Platform Support files that go below
7mDNS Core.
8
9"Mac OS Test Responder.c" and "Mac OS Test Searcher.c" build an example
10standalone (embedded) mDNS Responder and Searcher, respectively.
11
12"mDNSLibrary.c" builds a CFM Shared Library that goes in the Extensions Folder
13
14The CFM Shared Library inplements the same "/usr/include/dns_sd.h" API
15that exists on OS X, Windows, Linux, etc., one exception:
16
17 - You don't need to call DNSServiceRefSockFD() to get a file descriptor,
18   and add that file descriptor to your select loop (or equivalent),
19   wait for data,
20   and then call DNSServiceProcessResult() every time data arrives.
21
22   On OS 9, your callback functions are called "by magic" without having
23   to do any of this. Of course no magic comes without a price, and
24   the magic being used here is an OT Notifier function. Your callback
25   functions are called directly from the OT Notifier function that
26   received the UDP packet from the wire, which is fast and efficient,
27   but it does mean that you're being called at OT Notifier time -- so
28   no QuickDraw calls. If you need to allocate memory in your callback
29   function, use OTAllocMem(), not NewPtr() or NewHandle(). Typically
30   what you'll do in your callback function is just update your program's
31   data structures, and leave screen updating and UI to some foreground
32   code.
33
34"Searcher.c" and "Responder.c" build sample applications that link with
35this CFM Shared Library in the Extensions Folder. You'll see that if
36you try to run them without first putting the "Multicast DNS & DNS-SD"
37library in the Extensions Folder and restarting, they will report an
38error message.
39
40"Searcher.c" builds a sample application that browses for HTTP servers.
41
42"Responder.c" builds a sample application that advertises some test
43services. By default it advertises a couple of (nonexistent) HTTP servers
44called "Web Server One" and "Web Server Two". In addition, if it finds that
45TCP port 548 is occupied, then it concludes that personal file sharing is
46running, and advertises the existence of an AFP server. Similarly, if it
47finds that TCP port 80 is occupied, then it concludes that personal Web
48sharing is running, advertises the existence of an HTTP server.
49