]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOS9/README.txt
mDNSResponder-161.1.tar.gz
[apple/mdnsresponder.git] / mDNSMacOS9 / README.txt
1 This directory contains support files for running mDNS on Mac OS 9
2 (and Carbon).
3
4 mDNS.mcp is a CodeWarrior 8 project file.
5
6 mDNSMacOS9.c and mDNSMacOS9.h are the Platform Support files that go below
7 mDNS Core.
8
9 "Mac OS Test Responder.c" and "Mac OS Test Searcher.c" build an example
10 standalone (embedded) mDNS Responder and Searcher, respectively.
11
12 "mDNSLibrary.c" builds a CFM Shared Library that goes in the Extensions Folder
13
14 The CFM Shared Library inplements the same "/usr/include/dns_sd.h" API
15 that 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
35 this CFM Shared Library in the Extensions Folder. You'll see that if
36 you try to run them without first putting the "Multicast DNS & DNS-SD"
37 library in the Extensions Folder and restarting, they will report an
38 error 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
43 services. By default it advertises a couple of (nonexistent) HTTP servers
44 called "Web Server One" and "Web Server Two". In addition, if it finds that
45 TCP port 548 is occupied, then it concludes that personal file sharing is
46 running, and advertises the existence of an AFP server. Similarly, if it
47 finds that TCP port 80 is occupied, then it concludes that personal Web
48 sharing is running, advertises the existence of an HTTP server.