]> git.saurik.com Git - apple/mdnsresponder.git/commitdiff
mDNSResponder-58.1.tar.gz mac-os-x-1032 v58.1
authorApple <opensource@apple.com>
Fri, 19 Dec 2003 22:43:23 +0000 (22:43 +0000)
committerApple <opensource@apple.com>
Fri, 19 Dec 2003 22:43:23 +0000 (22:43 +0000)
86 files changed:
Makefile
mDNSCore/mDNS.c
mDNSCore/mDNSClientAPI.h
mDNSCore/mDNSDebug.h
mDNSCore/mDNSPlatformFunctions.h
mDNSMacOS9/CarbonResource.r
mDNSMacOS9/Mac OS Test Responder.c
mDNSMacOS9/Mac OS Test Searcher.c
mDNSMacOS9/mDNSMacOS9.c
mDNSMacOS9/mDNSMacOS9.h
mDNSMacOS9/mDNSPrefixCarbon.h
mDNSMacOS9/mDNSPrefixCarbonDebug.h
mDNSMacOS9/mDNSPrefixClassic.h
mDNSMacOSX/Applications/DNSServiceBrowser/BrowserController.h
mDNSMacOSX/Applications/DNSServiceBrowser/BrowserController.m
mDNSMacOSX/Applications/DNSServiceBrowser/main.m
mDNSMacOSX/Applications/DNSServiceRegistration/RegistrationController.h
mDNSMacOSX/Applications/DNSServiceRegistration/RegistrationController.m
mDNSMacOSX/Applications/DNSServiceRegistration/main.m
mDNSMacOSX/Applications/HAAutomounter/HAAutomounter.h
mDNSMacOSX/Applications/HAAutomounter/HAAutomounter.m
mDNSMacOSX/Applications/HAAutomounter/main.m
mDNSMacOSX/CFSocket.c
mDNSMacOSX/CFSocketPuma.c
mDNSMacOSX/DNSServiceDiscoveryDefines.h
mDNSMacOSX/DNSServiceDiscoveryReply.defs
mDNSMacOSX/DNSServiceDiscoveryRequest.defs
mDNSMacOSX/SampleUDSClient.c
mDNSMacOSX/SamplemDNSClient.c
mDNSMacOSX/daemon.c
mDNSMacOSX/dns_sd.h
mDNSMacOSX/dnssd_clientstub.c
mDNSMacOSX/dnssd_ipc.c
mDNSMacOSX/dnssd_ipc.h
mDNSMacOSX/mDNSMacOSX.h
mDNSMacOSX/mDNSResponder.pbproj/project.pbxproj
mDNSMacOSX/uds_daemon.c
mDNSPosix/Client.c
mDNSPosix/ExampleClientApp.c
mDNSPosix/ExampleClientApp.h
mDNSPosix/Identify.c
mDNSPosix/NetMonitor.c
mDNSPosix/ProxyResponder.c
mDNSPosix/Responder.c
mDNSPosix/mDNSPosix.c
mDNSPosix/mDNSPosix.h
mDNSPosix/mDNSUNP.c
mDNSPosix/mDNSUNP.h
mDNSPosix/parselog.py [new file with mode: 0755]
mDNSVxWorks/mDNSVxWorks.c
mDNSVxWorks/mDNSVxWorks.h
mDNSWindows/Applications/RendezvousBrowser/Windows/Application.sln [deleted file]
mDNSWindows/Applications/RendezvousBrowser/Windows/Application.vcproj [deleted file]
mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.sln [new file with mode: 0644]
mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.vcproj [new file with mode: 0644]
mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.sln [new file with mode: 0644]
mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.vcproj [new file with mode: 0644]
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/AboutDialog.cpp
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/AboutDialog.h
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/Application.cpp
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/Application.h
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/ChooserDialog.cpp
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/ChooserDialog.h
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/StdAfx.cpp
mDNSWindows/Applications/RendezvousBrowser/Windows/Sources/StdAfx.h
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/Application.cpp
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/Application.h
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/BrowserDialog.cpp
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/BrowserDialog.h
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/StdAfx.cpp
mDNSWindows/Applications/RendezvousBrowser/WindowsCE/Sources/StdAfx.h
mDNSWindows/Applications/RendezvousTest/Tool.c
mDNSWindows/Applications/RendezvousTest/ToolPrefixWindows.h
mDNSWindows/Applications/RendezvousTest/ToolPrefixWindowsDebug.h
mDNSWindows/Applications/RendezvousTest/ToolWin32.sln [deleted file]
mDNSWindows/Applications/RendezvousTest/ToolWin32.vcproj [deleted file]
mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.sln [new file with mode: 0644]
mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.vcproj [new file with mode: 0644]
mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.sln [new file with mode: 0644]
mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.vcproj [new file with mode: 0644]
mDNSWindows/DNSServices/DNSServiceDiscovery.c
mDNSWindows/DNSServices/DNSServiceDiscovery.h
mDNSWindows/DNSServices/DNSServices.c
mDNSWindows/DNSServices/DNSServices.h
mDNSWindows/mDNSWin32.c
mDNSWindows/mDNSWin32.h

index 96298f85082c2db1510cfb4750b1d64f791b2e22..0e843e9764ae375400d0a513e711ac29a67bf247 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 include /Developer/Makefiles/pb_makefiles/platform.make
 
-MVERS=58
+MVERS = "mDNSResponder-58.1"
 
 install:
        cd "$(SRCROOT)/mDNSMacOSX"; pbxbuild install     OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS)
 
 installsrc:
-       ditto mDNSCore ${SRCROOT}/mDNSCore
-       ditto mDNSMacOSX ${SRCROOT}/mDNSMacOSX
-       ditto Makefile $(SRCROOT)
+       ditto . ${SRCROOT}
 
 installhdrs::
        cd "$(SRCROOT)/mDNSMacOSX"; pbxbuild installhdrs OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS)
index 748da6a3f6764aede9797caa01ff42aa12a7d2da..13ff2f08ed710928f7b630471a78b6582efca588 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -44,6 +46,9 @@
     Change History (most recent first):
 
 $Log: mDNS.c,v $
+Revision 1.307.2.1  2003/12/03 11:20:27  cheshire
+<rdar://problem/3457718>: Stop and start of a service uses old ip address (with old port number)
+
 Revision 1.307  2003/09/09 20:13:30  cheshire
 <rdar://problem/3411105> Don't send a Goodbye record if we never announced it
 Ammend checkin 1.304: Off-by-one error: By this place in the function we've already decremented
@@ -2001,6 +2006,7 @@ mDNSexport void IncrementLabelSuffix(domainlabel *name, mDNSBool RichText)
 #endif
 
 #define RRIsAddressType(RR) ((RR)->resrec.rrtype == kDNSType_A || (RR)->resrec.rrtype == kDNSType_AAAA)
+#define RRTypeIsAddressType(T) ((T) == kDNSType_A || (T) == kDNSType_AAAA)
 
 #define ResourceRecordIsValidAnswer(RR) ( ((RR)->             resrec.RecordType & kDNSRecordTypeActiveMask)  && \
                ((RR)->Additional1 == mDNSNULL || ((RR)->Additional1->resrec.RecordType & kDNSRecordTypeActiveMask)) && \
@@ -3254,6 +3260,15 @@ mDNSlocal void DiscardDeregistrations(mDNS *const m)
                }
        }
 
+mDNSlocal mDNSBool HaveSentEntireRRSet(const mDNS *const m, const AuthRecord *const rr, mDNSInterfaceID InterfaceID)
+       {
+       // Try to find another member of this set that we're still planning to send on this interface
+       const AuthRecord *a;
+       for (a = m->ResourceRecords; a; a=a->next)
+               if (a->SendRNow == InterfaceID && a != rr && SameResourceRecordSignature(&a->resrec, &rr->resrec)) break;
+       return (a == mDNSNULL);         // If no more members of this set found, then we should set the cache flush bit
+       }
+
 // Note about acceleration of announcements to facilitate automatic coalescing of
 // multiple independent threads of announcements into a single synchronized thread:
 // The announcements in the packet may be at different stages of maturity;
@@ -3423,22 +3438,17 @@ mDNSlocal void SendResponses(mDNS *const m)
                                                }
                                        // Now try to see if we can fit the update in the same packet (not fatal if we can't)
                                        SetNewRData(&rr->resrec, rr->NewRData, rr->newrdlength);
+                                       if ((rr->resrec.RecordType & kDNSRecordTypeUniqueMask) && HaveSentEntireRRSet(m, rr, intf->InterfaceID))
+                                               rr->resrec.rrclass |= kDNSClass_UniqueRRSet;            // Temporarily set the cache flush bit so PutResourceRecord will set it
                                        newptr = PutResourceRecord(&response, responseptr, &response.h.numAnswers, &rr->resrec);
+                                       rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet;                   // Make sure to clear cache flush bit back to normal state
                                        if (newptr) responseptr = newptr;
                                        SetNewRData(&rr->resrec, OldRData, oldrdlength);
                                        }
                                else
                                        {
-                                       // If this record is supposed to be unique, see if we've sent its whole set
-                                       if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask)
-                                               {
-                                               // Try to find another member of this set that we're still planning to send on this interface
-                                               const AuthRecord *a;
-                                               for (a = m->ResourceRecords; a; a=a->next)
-                                                       if (a->SendRNow == intf->InterfaceID && a != rr && SameResourceRecordSignature(&a->resrec, &rr->resrec)) break;
-                                               if (a == mDNSNULL)                                                      // If no more members of this set found
-                                                       rr->resrec.rrclass |= kDNSClass_UniqueRRSet;    // Temporarily set the cache flush bit so PutResourceRecord will set it
-                                               }
+                                       if ((rr->resrec.RecordType & kDNSRecordTypeUniqueMask) && HaveSentEntireRRSet(m, rr, intf->InterfaceID))
+                                               rr->resrec.rrclass |= kDNSClass_UniqueRRSet;            // Temporarily set the cache flush bit so PutResourceRecord will set it
                                        newptr = PutResourceRecordTTL(&response, responseptr, &response.h.numAnswers, &rr->resrec, m->SleepState ? 0 : rr->resrec.rroriginalttl);
                                        rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet;                   // Make sure to clear cache flush bit back to normal state
                                        if (!newptr && response.h.numAnswers) break;
@@ -4208,6 +4218,8 @@ mDNSlocal void CheckCacheExpiration(mDNS *const m, mDNSu32 slot)
                        rp = &rr->next;
                        }
                }
+       if (m->rrcache_tail[slot] != rp) debugf("CheckCacheExpiration: Updating m->rrcache_tail[%d] from %p to %p", slot, m->rrcache_tail[slot], rp);
+       m->rrcache_tail[slot] = rp;
        m->lock_rrcache = 0;
        }
 
@@ -4253,6 +4265,9 @@ mDNSlocal void AnswerNewQuestion(mDNS *const m)
                        // MUST NOT dereference q again after calling AnswerQuestionWithResourceRecord()
                        if (m->CurrentQuestion != q) break;             // If callback deleted q, then we're finished here
                        }
+               else if (RRTypeIsAddressType(rr->resrec.rrtype) && RRTypeIsAddressType(q->qtype))
+                       if (rr->resrec.namehash == q->qnamehash && SameDomainName(&rr->resrec.name, &q->qname))
+                               ShouldQueryImmediately = mDNSfalse;
 
        if (ShouldQueryImmediately && m->CurrentQuestion == q)
                {
@@ -4371,23 +4386,24 @@ mDNSlocal CacheRecord *GetFreeCacheRR(mDNS *const m, mDNSu16 RDLength)
                mDNSu32 oldtotalused = m->rrcache_totalused;
                #endif
                mDNSu32 slot;
-               CacheRecord **rr;
                for (slot = 0; slot < CACHE_HASH_SLOTS; slot++)
                        {
-                       rr = &(m->rrcache_hash[slot]);
-                       while (*rr)
+                       CacheRecord **rp = &(m->rrcache_hash[slot]);
+                       while (*rp)
                                {
                                // Records that answer still-active questions are not candidates for deletion
-                               if ((*rr)->CRActiveQuestion)
-                                       rr=&(*rr)->next;
+                               if ((*rp)->CRActiveQuestion)
+                                       rp=&(*rp)->next;
                                else
                                        {
-                                       CacheRecord *r = *rr;
-                                       *rr = (*rr)->next;                      // Cut record from list
+                                       CacheRecord *rr = *rp;
+                                       *rp = (*rp)->next;                      // Cut record from list
                                        m->rrcache_used[slot]--;        // Decrement counts
-                                       ReleaseCacheRR(m, r);
+                                       ReleaseCacheRR(m, rr);
                                        }
                                }
+                       if (m->rrcache_tail[slot] != rp) debugf("GetFreeCacheRR: Updating m->rrcache_tail[%d] from %p to %p", slot, m->rrcache_tail[slot], rp);
+                       m->rrcache_tail[slot] = rp;
                        }
                #if MDNS_DEBUGMSGS
                debugf("Clear unused records; m->rrcache_totalused was %lu; now %lu", oldtotalused, m->rrcache_totalused);
@@ -5537,8 +5553,9 @@ mDNSlocal void mDNSCoreReceiveResponse(mDNS *const m,
                                        // If this is an oversized record with external storage allocated, copy rdata to external storage
                                        if (pkt.r.resrec.rdlength > InlineCacheRDSize)
                                                mDNSPlatformMemCopy(pkt.r.resrec.rdata, rr->resrec.rdata, sizeofRDataHeader + pkt.r.resrec.rdlength);
-                                       rr->next = m->rrcache_hash[slot];
-                                       m->rrcache_hash[slot] = rr;
+                                       rr->next = mDNSNULL;                                    // Clear 'next' pointer
+                                       *(m->rrcache_tail[slot]) = rr;                  // Append this record to tail of cache slot list
+                                       m->rrcache_tail[slot] = &(rr->next);    // Advance tail pointer
                                        m->rrcache_used[slot]++;
                                        //debugf("Adding RR %##s to cache (%d)", pkt.r.name.c, m->rrcache_used);
                                        CacheRecordAdd(m, rr);
@@ -6398,12 +6415,12 @@ mDNSexport mStatus mDNS_RegisterInterface(mDNS *const m, NetworkInterfaceInfo *s
        // even if we believe that we previously had an active representative of this interface.
        if ((m->KnownBugs & mDNS_KnownBug_PhantomInterfaces) || FirstOfType || set->InterfaceActive)
                {
+               DNSQuestion *q;
+               AuthRecord *rr;
                // Use a small amount of randomness:
                // In the case of a network administrator turning on an Ethernet hub so that all the connected machines establish link at
                // exactly the same time, we don't want them to all go and hit the network with identical queries at exactly the same moment.
                if (!m->SuppressSending) m->SuppressSending = m->timenow + (mDNSs32)mDNSRandom((mDNSu32)InitialQuestionInterval);
-               DNSQuestion *q;
-               AuthRecord *rr;
                for (q = m->Questions; q; q=q->next)                                                    // Scan our list of questions
                        if (!q->InterfaceID || q->InterfaceID == set->InterfaceID)      // If non-specific Q, or Q on this specific interface,
                                {                                                                                                               // then reactivate this question
@@ -6855,7 +6872,7 @@ mDNSexport mStatus mDNS_Init(mDNS *const m, mDNS_PlatformSupport *const p,
        CacheRecord *rrcachestorage, mDNSu32 rrcachesize,
        mDNSBool AdvertiseLocalAddresses, mDNSCallback *Callback, void *Context)
        {
-       mDNSu32 i;
+       mDNSu32 slot;
        mDNSs32 timenow;
        mStatus result = mDNSPlatformTimeInit(&timenow);
        if (result != mStatus_NoError) return(result);
@@ -6905,10 +6922,11 @@ mDNSexport mStatus mDNS_Init(mDNS *const m, mDNS_PlatformSupport *const p,
        m->rrcache_report          = 10;
        m->rrcache_free            = mDNSNULL;
 
-       for (i = 0; i < CACHE_HASH_SLOTS; i++)
+       for (slot = 0; slot < CACHE_HASH_SLOTS; slot++)
                {
-               m->rrcache_hash[i] = mDNSNULL;
-               m->rrcache_used[i] = 0;
+               m->rrcache_hash[slot] = mDNSNULL;
+               m->rrcache_tail[slot] = &m->rrcache_hash[slot];
+               m->rrcache_used[slot] = 0;
                }
 
        mDNS_GrowCache(m, rrcachestorage, rrcachesize);
@@ -6954,6 +6972,7 @@ mDNSexport void mDNS_Close(mDNS *const m)
 
        rrcache_totalused = m->rrcache_totalused;
        for (slot = 0; slot < CACHE_HASH_SLOTS; slot++)
+               {
                while (m->rrcache_hash[slot])
                        {
                        CacheRecord *rr = m->rrcache_hash[slot];
@@ -6962,6 +6981,9 @@ mDNSexport void mDNS_Close(mDNS *const m)
                        m->rrcache_used[slot]--;
                        ReleaseCacheRR(m, rr);
                        }
+               // Reset tail pointer back to empty state (not that it really matters on exit, but we'll do it anyway, for the sake of completeness)
+               m->rrcache_tail[slot] = &m->rrcache_hash[slot];
+               }
        debugf("mDNS_Close: RR Cache was using %ld records, %d active", rrcache_totalused, rrcache_active);
        if (rrcache_active != m->rrcache_active)
                LogMsg("*** ERROR *** rrcache_active %lu != m->rrcache_active %lu", rrcache_active, m->rrcache_active);
index 975d5593c764aa5f53012038af4fa9ec6dfd39f5..e7e56cfa6749493fc217209c0e60fd397377b831 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: mDNSClientAPI.h,v $
+Revision 1.114.2.3  2003/12/05 00:03:34  cheshire
+<rdar://problem/3487869> Use buffer size MAX_ESCAPED_DOMAIN_NAME instead of 256
+
+Revision 1.114.2.2  2003/12/04 23:30:00  cheshire
+Add "#define MAX_ESCAPED_DOMAIN_NAME 1005", needed for Posix folder to build
+
+Revision 1.114.2.1  2003/12/03 11:07:58  cheshire
+<rdar://problem/3457718>: Stop and start of a service uses old ip address (with old port number)
+
 Revision 1.114  2003/08/29 19:44:15  cheshire
 <rdar://problem/3400967> Traffic reduction: Eliminate synchronized QUs when a new service appears
 1. Use m->RandomQueryDelay to impose a random delay in the range 0-500ms on queries
@@ -517,7 +528,11 @@ enum
        mStatus_Waiting           = 1,
        mStatus_NoError           = 0,
 
-       // mDNS Error codes are in the range FFFE FF00 (-65792) to FFFE FFFF (-65537)
+       // mDNS return values are in the range FFFE FF00 (-65792) to FFFE FFFF (-65537)
+       // The top end of the range (FFFE FFFF) is used for error codes;
+       // the bottom end of the range (FFFE FF00) is used for non-error values;
+
+       // Error codes:
        mStatus_UnknownErr        = -65537,             // 0xFFFE FFFF
        mStatus_NoSuchNameErr     = -65538,
        mStatus_NoMemoryErr       = -65539,
@@ -531,8 +546,14 @@ enum
        mStatus_AlreadyRegistered = -65547,
        mStatus_NameConflict      = -65548,
        mStatus_Invalid           = -65549,
-       mStatus_GrowCache         = -65550,
+       //                        = -65550,
        mStatus_Incompatible      = -65551,
+       mStatus_BadInterfaceErr   = -65552,
+
+       // -65553 - -65789 currently unused
+
+       // Non-error values:
+       mStatus_GrowCache         = -65790,
        mStatus_ConfigChanged     = -65791,
        mStatus_MemFree           = -65792              // 0xFFFE FF00
        };
@@ -549,6 +570,21 @@ typedef struct { mDNSu8 c[256]; } domainname;              // Up to 255 bytes of length-pref
 
 typedef struct { mDNSu8 c[256]; } UTF8str255;          // Null-terminated C string
 
+// The longest legal textual form of a DNS name is 1005 bytes, including the C-string terminating NULL at the end.
+// Explanation:
+// When a native domainname object is converted to printable textual form using ConvertDomainNameToCString(),
+// non-printing characters are represented in the conventional DNS way, as '\ddd', where ddd is a three-digit decimal number.
+// The longest legal domain name is 255 bytes, in the form of four labels as shown below:
+// Length byte, 63 data bytes, length byte, 63 data bytes, length byte, 63 data bytes, length byte, 61 data bytes, zero byte.
+// Each label is encoded textually as characters followed by a trailing dot.
+// If every character has to be represented as a four-byte escape sequence, then this makes the maximum textual form four labels
+// plus the C-string terminating NULL as shown below:
+// 63*4+1 + 63*4+1 + 63*4+1 + 61*4+1 + 1 = 1005.
+// Note that MAX_ESCAPED_DOMAIN_LABEL is not normally used: If you're only decoding a single label, escaping is usually not required.
+// It is for domain names, where dots are used as label separators, that proper escaping is vital.
+#define MAX_ESCAPED_DOMAIN_LABEL 254
+#define MAX_ESCAPED_DOMAIN_NAME 1005
+
 // ***************************************************************************
 #if 0
 #pragma mark - Resource Record structures
@@ -994,6 +1030,7 @@ struct mDNS_struct
        mDNSu32 rrcache_report;
        CacheRecord *rrcache_free;
        CacheRecord *rrcache_hash[CACHE_HASH_SLOTS];
+       CacheRecord **rrcache_tail[CACHE_HASH_SLOTS];
        mDNSu32 rrcache_used[CACHE_HASH_SLOTS];
 
        // Fields below only required for mDNS Responder...
@@ -1041,6 +1078,15 @@ extern const mDNSAddr        AllDNSLinkGroup_v6;
 
 // Every client should call mDNS_Init, passing in storage for the mDNS object, mDNS_PlatformSupport object, and rrcache.
 // The rrcachesize parameter is the size of (i.e. number of entries in) the rrcache array passed in.
+// Most clients use mDNS_Init_AdvertiseLocalAddresses. This causes mDNSCore to automatically
+// create the correct address records for all the hosts interfaces. If you plan to advertise
+// services being offered by the local machine, this is almost always what you want.
+// There are two cases where you might use mDNS_Init_DontAdvertiseLocalAddresses:
+// 1. A client-only device, that browses for services but doesn't advertise any of its own.
+// 2. A proxy-registration service, that advertises services being offered by other machines, and takes
+//    the appropriate steps to manually create the correct address records for those other machines.
+// In principle, a proxy-like registration service could manually create address records for its own machine too,
+// but this would be pointless extra effort when using mDNS_Init_AdvertiseLocalAddresses does that for you.
 // When mDNS has finished setting up the client's callback is called
 // A client can also spin and poll the mDNSPlatformStatus field to see when it changes from mStatus_Waiting to mStatus_NoError
 //
@@ -1055,13 +1101,12 @@ extern const mDNSAddr        AllDNSLinkGroup_v6;
 // is received containing a record which matches the question, the DNSQuestion's mDNSAnswerCallback function will be called
 // Call mDNS_StopQuery when no more answers are required
 //
-// The mDNS routines are intentionally not thread-safe -- adding locking operations would add overhead that may not
-// be necessary or appropriate on every platform. Instead, code in a pre-emptive environment calling any mDNS routine
-// (except mDNS_Init and mDNS_Close) is responsible for doing the necessary synchronization to ensure that mDNS code is
-// not re-entered. This includes both client software above mDNS, and the platform support code below. For example, if
-// the support code on a particular platform implements timer callbacks at interrupt time, then clients on that platform
-// need to disable interrupts or do similar concurrency control to ensure that the mDNS code is not entered by an
-// interrupt-time timer callback while in the middle of processing a client call.
+// Care should be taken on multi-threaded or interrupt-driven environments.
+// The main mDNS routines call mDNSPlatformLock() on entry and mDNSPlatformUnlock() on exit;
+// each platform layer needs to implement these appropriately for its respective platform.
+// For example, if the support code on a particular platform implements timer callbacks at interrupt time, then
+// mDNSPlatformLock/Unlock need to disable interrupts or do similar concurrency control to ensure that the mDNS
+// code is not entered by an interrupt-time timer callback while in the middle of processing a client call.
 
 extern mStatus mDNS_Init      (mDNS *const m, mDNS_PlatformSupport *const p,
                                                                CacheRecord *rrcachestorage, mDNSu32 rrcachesize,
@@ -1069,10 +1114,12 @@ extern mStatus mDNS_Init      (mDNS *const m, mDNS_PlatformSupport *const p,
                                                                mDNSCallback *Callback, void *Context);
 #define mDNS_Init_NoCache                     mDNSNULL
 #define mDNS_Init_ZeroCacheSize               0
+// See notes above on use of Advertise/DontAdvertiseLocalAddresses
 #define mDNS_Init_AdvertiseLocalAddresses     mDNStrue
 #define mDNS_Init_DontAdvertiseLocalAddresses mDNSfalse
 #define mDNS_Init_NoInitCallback              mDNSNULL
 #define mDNS_Init_NoInitCallbackContext       mDNSNULL
+
 extern void    mDNS_GrowCache (mDNS *const m, CacheRecord *storage, mDNSu32 numrecords);
 extern void    mDNS_Close     (mDNS *const m);
 extern mDNSs32 mDNS_Execute   (mDNS *const m);
@@ -1168,6 +1215,12 @@ extern mStatus mDNS_AdvertiseDomains(mDNS *const m, AuthRecord *rr, mDNS_DomainT
 // work with DNS's native length-prefixed strings. For convenience in C, the following utility functions
 // are provided for converting between C's null-terminated strings and DNS's length-prefixed strings.
 
+// Assignment
+// A simple C structure assignment of a domainname can cause a protection fault by accessing unmapped memory,
+// because that object is defined to be 256 bytes long, but not all domainname objects are truly the full size.
+// This macro uses mDNSPlatformMemCopy() to make sure it only touches the actual bytes that are valid.
+#define AssignDomainName(DST, SRC) mDNSPlatformMemCopy((SRC).c, (DST).c, DomainNameLength(&(SRC)))
+
 // Comparison functions
 extern mDNSBool SameDomainLabel(const mDNSu8 *a, const mDNSu8 *b);
 extern mDNSBool SameDomainName(const domainname *const d1, const domainname *const d2);
@@ -1195,6 +1248,12 @@ extern mDNSBool MakeDomainLabelFromLiteralString(domainlabel *const label, const
 extern mDNSu8  *MakeDomainNameFromDNSNameString (domainname  *const name,  const char *cstr);
 
 // Convert native format domainlabel or domainname back to C string format
+// IMPORTANT:
+// When using ConvertDomainLabelToCString, the target buffer must be MAX_ESCAPED_DOMAIN_LABEL (254) bytes long
+// to guarantee there will be no buffer overrun. It is only safe to use a buffer shorter than this in rare cases
+// where the label is known to be constrained somehow (for example, if the label is known to be either "_tcp" or "_udp").
+// Similarly, when using ConvertDomainNameToCString, the target buffer must be MAX_ESCAPED_DOMAIN_NAME (1005) bytes long.
+// See definitions of MAX_ESCAPED_DOMAIN_LABEL and MAX_ESCAPED_DOMAIN_NAME for more detailed explanation.
 extern char    *ConvertDomainLabelToCString_withescape(const domainlabel *const name, char *cstr, char esc);
 #define         ConvertDomainLabelToCString_unescaped(D,C) ConvertDomainLabelToCString_withescape((D), (C), 0)
 #define         ConvertDomainLabelToCString(D,C)           ConvertDomainLabelToCString_withescape((D), (C), '\\')
@@ -1231,6 +1290,131 @@ extern char *GetRRDisplayString_rdb(mDNS *const m, const ResourceRecord *rr, RDa
 extern mDNSBool mDNSSameAddress(const mDNSAddr *ip1, const mDNSAddr *ip2);
 extern void IncrementLabelSuffix(domainlabel *name, mDNSBool RichText);
 
+// ***************************************************************************
+#if 0
+#pragma mark - PlatformSupport interface
+#endif
+
+// This section defines the interface to the Platform Support layer.
+// Normal client code should not use any of types defined here, or directly call any of the functions defined here.
+// The definitions are placed here because sometimes clients do use these calls indirectly, via other supported client operations.
+// For example, AssignDomainName is a macro defined using mDNSPlatformMemCopy()
+
+typedef struct
+       {
+       mDNSOpaque16 id;
+       mDNSOpaque16 flags;
+       mDNSu16 numQuestions;
+       mDNSu16 numAnswers;
+       mDNSu16 numAuthorities;
+       mDNSu16 numAdditionals;
+       } DNSMessageHeader;
+
+// We can send and receive packets up to 9000 bytes (Ethernet Jumbo Frame size, if that ever becomes widely used)
+// However, in the normal case we try to limit packets to 1500 bytes so that we don't get IP fragmentation on standard Ethernet
+// 40 (IPv6 header) + 8 (UDP header) + 12 (DNS message header) + 1440 (DNS message body) = 1500 total
+#define AbsoluteMaxDNSMessageData 8940
+#define NormalMaxDNSMessageData 1440
+typedef struct
+       {
+       DNSMessageHeader h;                                             // Note: Size 12 bytes
+       mDNSu8 data[AbsoluteMaxDNSMessageData]; // 40 (IPv6) + 8 (UDP) + 12 (DNS header) + 8940 (data) = 9000
+       } DNSMessage;
+
+// Every platform support module must provide the following functions.
+// mDNSPlatformInit() typically opens a communication endpoint, and starts listening for mDNS packets.
+// When Setup is complete, the platform support layer calls mDNSCoreInitComplete().
+// mDNSPlatformSendUDP() sends one UDP packet
+// When a packet is received, the PlatformSupport code calls mDNSCoreReceive()
+// mDNSPlatformClose() tidies up on exit
+// Note: mDNSPlatformMemAllocate/mDNSPlatformMemFree are only required for handling oversized resource records.
+// If your target platform has a well-defined specialized application, and you know that all the records it uses
+// are InlineCacheRDSize or less, then you can just make a simple mDNSPlatformMemAllocate() stub that always returns
+// NULL. InlineCacheRDSize is a compile-time constant, which is set by default to 64. If you need to handle records
+// a little larger than this and you don't want to have to implement run-time allocation and freeing, then you
+// can raise the value of this constant to a suitable value (at the expense of increased memory usage).
+extern mStatus  mDNSPlatformInit        (mDNS *const m);
+extern void     mDNSPlatformClose       (mDNS *const m);
+extern mStatus  mDNSPlatformSendUDP(const mDNS *const m, const DNSMessage *const msg, const mDNSu8 *const end,
+       mDNSInterfaceID InterfaceID, mDNSIPPort srcport, const mDNSAddr *dst, mDNSIPPort dstport);
+
+extern void     mDNSPlatformLock        (const mDNS *const m);
+extern void     mDNSPlatformUnlock      (const mDNS *const m);
+
+extern void     mDNSPlatformStrCopy     (const void *src,       void *dst);
+extern mDNSu32  mDNSPlatformStrLen      (const void *src);
+extern void     mDNSPlatformMemCopy     (const void *src,       void *dst, mDNSu32 len);
+extern mDNSBool mDNSPlatformMemSame     (const void *src, const void *dst, mDNSu32 len);
+extern void     mDNSPlatformMemZero     (                       void *dst, mDNSu32 len);
+extern void *   mDNSPlatformMemAllocate (mDNSu32 len);
+extern void     mDNSPlatformMemFree     (void *mem);
+extern mStatus  mDNSPlatformTimeInit    (mDNSs32 *timenow);
+
+// The core mDNS code provides these functions, for the platform support code to call at appropriate times
+//
+// mDNS_GenerateFQDN() is called once on startup (typically from mDNSPlatformInit())
+// and then again on each subsequent change of the dot-local host name.
+//
+// mDNS_RegisterInterface() is used by the platform support layer to inform mDNSCore of what
+// physical and/or logical interfaces are available for sending and receiving packets.
+// Typically it is called on startup for each available interface, but register/deregister may be
+// called again later, on multiple occasions, to inform the core of interface configuration changes.
+// If set->Advertise is set non-zero, then mDNS_RegisterInterface() also registers the standard
+// resource records that should be associated with every publicised IP address/interface:
+// -- Name-to-address records (A/AAAA)
+// -- Address-to-name records (PTR)
+// -- Host information (HINFO)
+//
+// mDNSCoreInitComplete() is called when the platform support layer is finished.
+// Typically this is at the end of mDNSPlatformInit(), but may be later
+// (on platforms like OT that allow asynchronous initialization of the networking stack).
+//
+// mDNSCoreReceive() is called when a UDP packet is received
+//
+// mDNSCoreMachineSleep() is called when the machine sleeps or wakes
+// (This refers to heavyweight laptop-style sleep/wake that disables network access,
+// not lightweight second-by-second CPU power management modes.)
+
+extern void     mDNS_GenerateFQDN(mDNS *const m);
+extern mStatus  mDNS_RegisterInterface  (mDNS *const m, NetworkInterfaceInfo *set);
+extern void     mDNS_DeregisterInterface(mDNS *const m, NetworkInterfaceInfo *set);
+extern void     mDNSCoreInitComplete(mDNS *const m, mStatus result);
+extern void     mDNSCoreReceive(mDNS *const m, DNSMessage *const msg, const mDNSu8 *const end,
+                                                               const mDNSAddr *const srcaddr, const mDNSIPPort srcport,
+                                                               const mDNSAddr *const dstaddr, const mDNSIPPort dstport, const mDNSInterfaceID InterfaceID, mDNSu8 ttl);
+extern void     mDNSCoreMachineSleep(mDNS *const m, mDNSBool wake);
+
+// ***************************************************************************
+#if 0
+#pragma mark - Compile-Time assertion checks
+#endif
+
+// Some C compiler cleverness. We can make the compiler check certain things for
+// us, and report compile-time errors if anything is wrong. The usual way to do
+// this would be to use a run-time "if" statement, but then you don't find out
+// what's wrong until you run the software. This way, if the assertion condition
+// is false, the array size is negative, and the complier complains immediately.
+
+struct mDNS_CompileTimeAssertionChecks
+       {
+       // Check that the compiler generated our on-the-wire packet format structure definitions
+       // properly packed, without adding padding bytes to align fields on 32-bit or 64-bit boundaries.
+       char assert0[(sizeof(rdataSRV)         == 262                          ) ? 1 : -1];
+       char assert1[(sizeof(DNSMessageHeader) ==  12                          ) ? 1 : -1];
+       char assert2[(sizeof(DNSMessage)       ==  12+AbsoluteMaxDNSMessageData) ? 1 : -1];
+       char assert3[(sizeof(mDNSs8)           ==   1                          ) ? 1 : -1];
+       char assert4[(sizeof(mDNSu8)           ==   1                          ) ? 1 : -1];
+       char assert5[(sizeof(mDNSs16)          ==   2                          ) ? 1 : -1];
+       char assert6[(sizeof(mDNSu16)          ==   2                          ) ? 1 : -1];
+       char assert7[(sizeof(mDNSs32)          ==   4                          ) ? 1 : -1];
+       char assert8[(sizeof(mDNSu32)          ==   4                          ) ? 1 : -1];
+       char assert9[(sizeof(mDNSOpaque16)     ==   2                          ) ? 1 : -1];
+       char assertA[(sizeof(mDNSOpaque32)     ==   4                          ) ? 1 : -1];
+       char assertB[(sizeof(mDNSOpaque128)    ==  16                          ) ? 1 : -1];
+       };
+
+// ***************************************************************************
+
 #ifdef __cplusplus
        }
 #endif
index 65b6daf479bc29e3a40571fb19fccd953f19bff8..0ac194ffd571e68df70dafeb8c4f660be3479536 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index beef207bb3bb4216a4ffa42abbdd2bf7fd55e21b..71645b2c21d40283c85da106f480acd996642824 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -23,6 +25,9 @@
     Change History (most recent first):
 
 $Log: mDNSPlatformFunctions.h,v $
+Revision 1.22.2.1  2003/12/05 00:03:34  cheshire
+<rdar://problem/3487869> Use buffer size MAX_ESCAPED_DOMAIN_NAME instead of 256
+
 Revision 1.22  2003/08/18 22:53:37  cheshire
 <rdar://problem/3382647> mDNSResponder divide by zero in mDNSPlatformTimeNow()
 
@@ -77,109 +82,4 @@ Merge in license terms from Quinn's copy, in preparation for Darwin release
 
 */
 
-#ifndef __mDNSPlatformFunctions_h
-#define __mDNSPlatformFunctions_h
-
-// ***************************************************************************
-// Support functions which must be provided by each set of specific PlatformSupport files
-
-// mDNSPlatformInit() typically opens a communication endpoint, and starts listening for mDNS packets.
-// When Setup is complete, the callback is called.
-// mDNSPlatformSendUDP() sends one UDP packet
-// When a packet is received, the PlatformSupport code calls mDNSCoreReceive()
-// mDNSPlatformClose() tidies up on exit
-
-#ifdef __cplusplus
-       extern "C" {
-#endif
-
-// ***************************************************************************
-// DNS protocol message format
-
-typedef struct
-       {
-       mDNSOpaque16 id;
-       mDNSOpaque16 flags;
-       mDNSu16 numQuestions;
-       mDNSu16 numAnswers;
-       mDNSu16 numAuthorities;
-       mDNSu16 numAdditionals;
-       } DNSMessageHeader;
-
-// We can send and receive packets up to 9000 bytes (Ethernet Jumbo Frame size, if that ever becomes widely used)
-// However, in the normal case we try to limit packets to 1500 bytes so that we don't get IP fragmentation on standard Ethernet
-// 40 (IPv6 header) + 8 (UDP header) + 12 (DNS message header) + 1440 (DNS message body) = 1500 total
-#define AbsoluteMaxDNSMessageData 8940
-#define NormalMaxDNSMessageData 1440
-typedef struct
-       {
-       DNSMessageHeader h;                                             // Note: Size 12 bytes
-       mDNSu8 data[AbsoluteMaxDNSMessageData]; // 40 (IPv6) + 8 (UDP) + 12 (DNS header) + 8940 (data) = 9000
-       } DNSMessage;
-
-// ***************************************************************************
-// Functions
-
-// Every platform support module must provide the following functions.
-// Note: mDNSPlatformMemAllocate/mDNSPlatformMemFree are only required for handling oversized resource records.
-// If your target platform has a well-defined specialized application, and you know that all the records it uses
-// are InlineCacheRDSize or less, then you can just make a simple mDNSPlatformMemAllocate() stub that always returns
-// NULL. InlineCacheRDSize is a compile-time constant, which is set by default to 64. If you need to handle records
-// a little larger than this and you don't want to have to implement run-time allocation and freeing, then you
-// can raise the value of this constant to a suitable value (at the expense of increased memory usage).
-extern mStatus  mDNSPlatformInit        (mDNS *const m);
-extern void     mDNSPlatformClose       (mDNS *const m);
-extern mStatus  mDNSPlatformSendUDP(const mDNS *const m, const DNSMessage *const msg, const mDNSu8 *const end,
-       mDNSInterfaceID InterfaceID, mDNSIPPort srcport, const mDNSAddr *dst, mDNSIPPort dstport);
-
-extern void     mDNSPlatformLock        (const mDNS *const m);
-extern void     mDNSPlatformUnlock      (const mDNS *const m);
-
-extern void     mDNSPlatformStrCopy     (const void *src,       void *dst);
-extern mDNSu32  mDNSPlatformStrLen      (const void *src);
-extern void     mDNSPlatformMemCopy     (const void *src,       void *dst, mDNSu32 len);
-extern mDNSBool mDNSPlatformMemSame     (const void *src, const void *dst, mDNSu32 len);
-extern void     mDNSPlatformMemZero     (                       void *dst, mDNSu32 len);
-extern void *   mDNSPlatformMemAllocate (mDNSu32 len);
-extern void     mDNSPlatformMemFree     (void *mem);
-extern mStatus  mDNSPlatformTimeInit    (mDNSs32 *timenow);
-
-// The core mDNS code provides these functions, for the platform support code to call at appropriate times
-//
-// mDNS_GenerateFQDN() is called once on startup (typically from mDNSPlatformInit())
-// and then again on each subsequent dot-local host name change.
-//
-// mDNS_RegisterInterface() is used by the platform support layer to inform mDNSCore of what
-// physical and/or logical interfaces are available for sending and receiving packets.
-// Typically it is called on startup for each available interface, but register/deregister may be
-// called again later, on multiple occasions, to inform the core of interface configuration changes.
-// If set->Advertise is set non-zero, then mDNS_RegisterInterface() also registers the standard
-// resource records that should be associated with every publicised IP address/interface:
-// -- Name-to-address records (A/AAAA)
-// -- Address-to-name records (PTR)
-// -- Host information (HINFO)
-//
-// mDNSCoreInitComplete() is called when the platform support layer is finished.
-// Typically this is at the end of mDNSPlatformInit(), but may be later
-// (on platforms like OT that allow asynchronous initialization of the networking stack).
-//
-// mDNSCoreReceive() is called when a UDP packet is received
-//
-// mDNSCoreMachineSleep() is called when the machine sleeps or wakes
-// (This refers to  heavyweight laptop-style sleep/wake that disables network access,
-// not lightweight second-by-second CPU power management modes.)
-
-extern void     mDNS_GenerateFQDN(mDNS *const m);
-extern mStatus  mDNS_RegisterInterface  (mDNS *const m, NetworkInterfaceInfo *set);
-extern void     mDNS_DeregisterInterface(mDNS *const m, NetworkInterfaceInfo *set);
-extern void     mDNSCoreInitComplete(mDNS *const m, mStatus result);
-extern void     mDNSCoreReceive(mDNS *const m, DNSMessage *const msg, const mDNSu8 *const end,
-                                                               const mDNSAddr *const srcaddr, const mDNSIPPort srcport,
-                                                               const mDNSAddr *const dstaddr, const mDNSIPPort dstport, const mDNSInterfaceID InterfaceID, mDNSu8 ttl);
-extern void     mDNSCoreMachineSleep(mDNS *const m, mDNSBool wake);
-
-#ifdef __cplusplus
-       }
-#endif
-
-#endif
+// Note: All moved to mDNSClientAPI.h
index 105a3985f47c2c0bad966d472dbb83093816873e..853a4aca834a3a4cf10d7b5ba156c961223c65d1 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7c55ca3420ab84a90ba287a810b0144eaa6691eb..bd8f376016e4d21e6322f43057984a0bc4297afd 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index d55dcd5969751ef77d67d7a98447bccad51f7720..fc5d803ef77a2df191f5a4662e0036e00b28ea7d 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index cdb49b36bdcb67e13f3b34e64843618181f20e23..efef8b85723c38c5809164a2da857648fdb4b7e9 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index d707f9ffbf4bb28c8d4d0bca29b78f9fbc790523..1256183e33f38c18620247145a35d5b994307547 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 95f1a48cc2b36bd27a8079eede3cb3adec173faa..d05d2571fdcc69faded12cf648770330d289eba1 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 2c31a97df156273c7f5cc38b6e6f6b0ebc2a7ebd..4824cc2f41dc06b2057b6b903f81343dc7dcde34 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index d2753617f86fb4078428a93e4cc1d29059c4b51f..9cc2013bc168d27656e51354c58cd65866dfe7c1 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index f58c9148dc9bfab13dde17df5b6601d16603d336..8f81a9f43d3f24ddb670cb96ccfa0cefcabb87d7 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 1dbe2a4ae239db9c519e61e643e2587dc585b0b2..a3e9cb0f95cac036bb8bc14c020efb980e292dd4 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index c340509bd53847db273aaf3a07b5bb160518d72b..492c5c2331336a89785e5faab9de08c24242bc2f 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index ca53bf25cabd0fbe1e0d6133edcb4f72446dea04..df059d8f86af46d960430023a6968c73742e99ff 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 6255179964de2e9a3ce0f4d08bb6b5e924485763..3b2226ccc508e9468cf9818fe9d7ab8665479681 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index c340509bd53847db273aaf3a07b5bb160518d72b..492c5c2331336a89785e5faab9de08c24242bc2f 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7bb3e9051ba3b57fc9dc95f651213767f817d186..928cf0225b2f250bf488972494c4a81863400933 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 4aae5ed382c85d1d5a9660eba5aa185c0061b195..9647f6f29ef3a05d1ec97dd81852f86b4964b8d2 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 6ad4471fc5989dfef9ba3bd2961fd0d2fa35bc66..53b9e68dee301507f3de8630b5a4f4e2908fa772 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 519a899752b2f73b521fdbd3b40d496f76cee107..0552040c4c9d653065bd54cbbb4d5c6ffa436259 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index e0cf87c1560b65a6c9b014c87e5a715f6b406bb8..3a7e266589af5f772c80d14cb95268baec015d5f 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index b6d3a9a8d5b85482229c049654d15963682b3c9a..bd5b11bf7b0818fbd9311320c6057c3992e0d94c 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 942fb6b1802216ce7d783fb7dbc84257a8ccf931..6ae6004e76dfe581119b72753676fb5cdcb68801 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index eb400b1fd9a0c7fba74fddadaac23a1b3b48ab12..a4596af2a82e22031a3c29e440507eae62ec8158 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7838fc15fc138a9624733fb1daefcd3d6a7396ae..bca8eeaff2b8f4f324341586fdbc3c231ae27190 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index f905bd79e86d860737f2c03de3d87e1edeeef4d4..1b824ddd184816f1f44ae259d96deb1b07c935f6 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index b6aa01e98a588452205c350374cefe69e9b697e0..d0af244f12dfe70d64eb12ce4beb461c2280e990 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: daemon.c,v $
+Revision 1.134.2.2  2003/12/05 00:03:35  cheshire
+<rdar://problem/3487869> Use buffer size MAX_ESCAPED_DOMAIN_NAME instead of 256
+
+Revision 1.134.2.1  2003/12/03 11:00:09  cheshire
+Update "mDNSResponderVersion" mechanism to allow dots so we can do mDNSResponder-58.1 for SUPan
+
 Revision 1.134  2003/08/21 20:01:37  cheshire
 <rdar://problem/3387941> Traffic reduction: Detect long-lived Resolve() calls, and report them in syslog
 
@@ -264,7 +272,7 @@ struct DNSServiceBrowserResult_struct
        {
        DNSServiceBrowserResult *next;
        int resultType;
-       char name[256], type[256], dom[256];
+       domainname result;
        };
 
 typedef struct DNSServiceBrowser_struct DNSServiceBrowser;
@@ -569,7 +577,7 @@ mDNSlocal void FoundDomain(mDNS *const m, DNSQuestion *question, const ResourceR
        {
        kern_return_t status;
        #pragma unused(m)
-       char buffer[256];
+       char buffer[MAX_ESCAPED_DOMAIN_NAME];
        DNSServiceDomainEnumerationReplyResultType rt;
        DNSServiceDomainEnumeration *x = (DNSServiceDomainEnumeration *)question->QuestionContext;
 
@@ -667,9 +675,7 @@ mDNSlocal void FoundInstance(mDNS *const m, DNSQuestion *question, const Resourc
        if (!x) { LogMsg("FoundInstance: Failed to allocate memory for result %##s", answer->rdata->u.name.c); return; }
        
        verbosedebugf("FoundInstance: %s %##s", AddRecord ? "Add" : "Rmv", answer->rdata->u.name.c);
-       ConvertDomainLabelToCString_unescaped(&name, x->name);
-       ConvertDomainNameToCString(&type, x->type);
-       ConvertDomainNameToCString(&domain, x->dom);
+       AssignDomainName(x->result, answer->rdata->u.name);
        if (AddRecord)
                 x->resultType = DNSServiceBrowserReplyAddInstance;
        else x->resultType = DNSServiceBrowserReplyRemoveInstance;
@@ -1562,8 +1568,17 @@ mDNSlocal mDNSs32 mDNSDaemonIdle(void)
                        while (x->results)
                                {
                                DNSServiceBrowserResult *const r = x->results;
+                               domainlabel name;
+                               domainname type, domain;
+                               DeconstructServiceName(&r->result, &name, &type, &domain);      // Don't need to check result; already validated in FoundInstance()
+                               char cname[MAX_DOMAIN_LABEL+1];                 // Unescaped name: up to 63 bytes plus C-string terminating NULL.
+                               char ctype[MAX_ESCAPED_DOMAIN_NAME];
+                               char cdom [MAX_ESCAPED_DOMAIN_NAME];
+                               ConvertDomainLabelToCString_unescaped(&name, cname);
+                               ConvertDomainNameToCString(&type, ctype);
+                               ConvertDomainNameToCString(&domain, cdom);
                                DNSServiceDiscoveryReplyFlags flags = (r->next) ? DNSServiceDiscoverReplyFlagsMoreComing : 0;
-                               kern_return_t status = DNSServiceBrowserReply_rpc(x->ClientMachPort, r->resultType, r->name, r->type, r->dom, flags, 1);
+                               kern_return_t status = DNSServiceBrowserReply_rpc(x->ClientMachPort, r->resultType, cname, ctype, cdom, flags, 1);
                                // If we failed to send the mach message, try again in one second
                                if (status == MACH_SEND_TIMED_OUT)
                                        {
@@ -1694,8 +1709,4 @@ mDNSexport int main(int argc, char **argv)
        }
 
 // For convenience when using the "strings" command, this is the last thing in the file
-#if mDNSResponderVersion > 1
-mDNSexport const char mDNSResponderVersionString[] = "mDNSResponder-" STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
-#else
-mDNSexport const char mDNSResponderVersionString[] = "mDNSResponder (Engineering Build) (" __DATE__ " " __TIME__ ")";
-#endif
+mDNSexport const char mDNSResponderVersionString[] = STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")";
index eaed335d8531a6cb6017bd050220fe1d775a69a0..9b9c037e354bd2de5f6f4b47af1e904d877ebb45 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7277eda7c058decc09d8cba0a3444291a892f3ea..a5b1ef7ffa30113af665617ef975be8d92868e8a 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 186f4d332a772100b6d34abab53ab3a93fa4949d..3ee14b5239a9ab16487c48f1f5d2b0b6c49abc13 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 2b7b323539a8b3177ffc1ae1b01530c5df1c8c4c..45852848a0148cd3c2fc7bc7c4b49d4439e4caec 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index b255cd0166c66b75bcc5271e878c3e38c6163833..f5a7656a4cc4e27acb670b0fe6037e7bf8bd686d 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 2bd8d35fe67745e4e6b15393c167a9420be0095d..e1aad01a8f1664e065f06378edc49bb6534746f4 100644 (file)
@@ -6,11 +6,13 @@
        objectVersion = 38;
        objects = {
                000753D303367C1C0CCA2C71 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = mDNSMacOSX.h;
                        refType = 4;
                };
                0017390704CC75C30CCA2C71 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = SampleUDSClient.c;
                        refType = 2;
@@ -30,6 +32,7 @@
                        );
                        buildSettings = {
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.2;
                                OTHER_CFLAGS = "-no-cpp-precomp -DmDNSResponderVersion=$(MVERS)";
                                OTHER_LDFLAGS = "";
                                OTHER_REZFLAGS = "";
@@ -45,7 +48,6 @@
                        name = "UDS API Test Tool";
                        productName = "UDS API Test Tool";
                        productReference = 0044D34F04CC73600CCA2C71;
-                       shouldUseHeadermap = 0;
                };
                0044D34904CC73600CCA2C71 = {
                        buildActionMask = 2147483647;
@@ -84,6 +86,7 @@
                        refType = 3;
                };
                004EFB9604CC78130CCA2C71 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = dnssd_clientstub.c;
                        refType = 2;
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                HEADER_SEARCH_PATHS = "\"$(APPLE_INTERNAL_DEVELOPER_DIR)/Headers\"";
                                LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.2;
                                OPTIMIZATION_CFLAGS = "-O0";
                                OTHER_CFLAGS = "-no-cpp-precomp -D__MACOSX__ -DMDNS_DEBUGMSGS=1 -DmDNSResponderVersion=$(MVERS)";
                                OTHER_LDFLAGS = "";
                        name = "mDNSResponder debug";
                        productName = mDNSResponder;
                        productReference = 00AD62B8032D799A0CCA2C71;
-                       shouldUseHeadermap = 1;
                };
                00AD62A4032D799A0CCA2C71 = {
                        buildActionMask = 2147483647;
                                00AD62AE032D799A0CCA2C71,
                                00AD62AF032D799A0CCA2C71,
                                00AD62B0032D799A0CCA2C71,
-                               00AD62B1032D799A0CCA2C71,
                                F5E11B5E04A28126019798ED,
                                F525E72B04AA167A01F1CF4D,
+                               00AD62B1032D799A0CCA2C71,
                        );
                        isa = PBXSourcesBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                        isa = PBXAggregateTarget;
                        name = "Build All";
                        productName = "Build All";
-                       shouldUseHeadermap = 0;
                };
                00AD62BC032D7A160CCA2C71 = {
                        isa = PBXTargetDependency;
                        buildRules = (
                        );
                        buildSettings = {
-                               MVERS = 1;
+                               MVERS = "\"mDNSResponder (Engineering Build)\"";
                        };
                        isa = PBXBuildStyle;
                        name = Development;
                        buildStyles = (
                                00B2AB0C032D7B220CCA2C71,
                        );
+                       hasScannedForEncodings = 1;
                        isa = PBXProject;
                        mainGroup = 08FB7794FE84155DC02AAC07;
                        projectDirPath = "";
                                HEADER_SEARCH_PATHS = "\"$(APPLE_INTERNAL_DEVELOPER_DIR)/Headers\"";
                                INSTALL_PATH = /usr/sbin;
                                LIBRARY_SEARCH_PATHS = "";
+                               MACOSX_DEPLOYMENT_TARGET = 10.2;
                                OTHER_CFLAGS = "-no-cpp-precomp -D__MACOSX__ -DmDNSResponderVersion=$(MVERS)";
                                OTHER_LDFLAGS = "";
                                OTHER_REZFLAGS = "";
                        productInstallPath = "$(HOME)/bin";
                        productName = mDNSResponder;
                        productReference = 034768E2FF38A6DC11DB9C8B;
-                       shouldUseHeadermap = 1;
                };
                08FB77A0FE84155DC02AAC07 = {
                        buildActionMask = 2147483647;
                                6575FC0E022EB18700000109,
                                6575FBEA022EAF5A00000109,
                                6575FBED022EAF7200000109,
-                               6575FBEE022EAF7200000109,
                                F5E11B5C04A28126019798ED,
                                F525E72904AA167501F1CF4D,
+                               6575FBEE022EAF7200000109,
                        );
                        isa = PBXSourcesBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
 //653
 //654
                654BE64F02B63B93000001D1 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        name = mDNSClientAPI.h;
                        path = ../mDNSCore/mDNSClientAPI.h;
                        refType = 4;
                };
                654BE65002B63B93000001D1 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        name = mDNSDebug.h;
                        path = ../mDNSCore/mDNSDebug.h;
                        refType = 4;
                };
                654BE65202B63B93000001D1 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        name = mDNSPlatformFunctions.h;
                        path = ../mDNSCore/mDNSPlatformFunctions.h;
                        };
                };
                6575FBE9022EAF5A00000109 = {
+                       fileEncoding = 4;
                        indentWidth = 4;
                        isa = PBXFileReference;
                        name = mDNS.c;
                        };
                };
                6575FBEB022EAF7200000109 = {
+                       fileEncoding = 4;
                        indentWidth = 4;
                        isa = PBXFileReference;
                        path = CFSocket.c;
                        usesTabs = 1;
                };
                6575FBEC022EAF7200000109 = {
+                       fileEncoding = 4;
                        indentWidth = 4;
                        isa = PBXFileReference;
                        path = daemon.c;
                        refType = 4;
                };
                6575FBFF022EAFBA00000109 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = DNSServiceDiscoveryDefines.h;
                        refType = 4;
                };
                6575FC00022EAFBA00000109 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = DNSServiceDiscoveryReply.defs;
                        refType = 4;
                };
                6575FC01022EAFBA00000109 = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = DNSServiceDiscoveryRequest.defs;
                        refType = 4;
                        buildSettings = {
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                INSTALL_PATH = /usr/bin;
+                               MACOSX_DEPLOYMENT_TARGET = 10.2;
                                OTHER_CFLAGS = "-no-cpp-precomp -DmDNSResponderVersion=$(MVERS)";
                                OTHER_LDFLAGS = "";
                                OTHER_REZFLAGS = "";
                        productInstallPath = /usr/bin;
                        productName = "Sample mDNS Client";
                        productReference = 6575FC1D022EB76000000109;
-                       shouldUseHeadermap = 0;
                };
                6575FC1D022EB76000000109 = {
                        isa = PBXExecutableFileReference;
                        refType = 4;
                };
                6575FC20022EB7AA00000109 = {
+                       fileEncoding = 4;
                        indentWidth = 4;
                        isa = PBXFileReference;
                        path = SamplemDNSClient.c;
                        };
                };
                F525E72804AA167501F1CF4D = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = uds_daemon.c;
                        refType = 4;
                        };
                };
                F5E11B5A04A28126019798ED = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = dnssd_ipc.c;
                        refType = 4;
                };
                F5E11B5B04A28126019798ED = {
+                       fileEncoding = 4;
                        isa = PBXFileReference;
                        path = dnssd_ipc.h;
                        refType = 4;
index c7df012fe47772d22f31b0a26b0054151819eea8..9c5a6537fb3d7935fc81b8b1dc83bba6e3628271 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -23,6 +25,9 @@
     Change History (most recent first):
 
 $Log: uds_daemon.c,v $
+Revision 1.22.2.1  2003/12/05 00:03:35  cheshire
+<rdar://problem/3487869> Use buffer size MAX_ESCAPED_DOMAIN_NAME instead of 256
+
 Revision 1.22  2003/08/19 16:03:55  ksekar
 Bug #: <rdar://problem/3380097>: ER: SIGINFO dump should include resolves started by DNSServiceQueryRecord
 Check termination_context for NULL before dereferencing.
@@ -707,7 +712,7 @@ static void handle_resolve_request(request_state *rstate)
     {
     DNSServiceFlags flags;
     uint32_t interfaceIndex;
-    char name[256], regtype[256], domain[256];  
+    char name[256], regtype[MAX_ESCAPED_DOMAIN_NAME], domain[MAX_ESCAPED_DOMAIN_NAME];  
     char *ptr;  // message data pointer
     domainname fqdn;
     resolve_t *srv, *txt;
@@ -736,8 +741,8 @@ static void handle_resolve_request(request_state *rstate)
     mDNSInterfaceID InterfaceID = mDNSPlatformInterfaceIDfromInterfaceIndex(&mDNSStorage, interfaceIndex);
     if (interfaceIndex && !InterfaceID) goto bad_param;
     if (get_string(&ptr, name, 256) < 0 ||
-        get_string(&ptr, regtype, 256) < 0 ||
-        get_string(&ptr, domain, 256) < 0)
+        get_string(&ptr, regtype, MAX_ESCAPED_DOMAIN_NAME) < 0 ||
+        get_string(&ptr, domain, MAX_ESCAPED_DOMAIN_NAME) < 0)
         goto bad_param;
 
     // free memory in rstate since we don't need it anymore
@@ -843,7 +848,7 @@ static void resolve_termination_callback(void *context)
 static void resolve_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, mDNSBool AddRecord)
 {
     int len = 0;
-    char fullname[MAX_DOMAIN_NAME], target[MAX_DOMAIN_NAME];
+    char fullname[MAX_ESCAPED_DOMAIN_NAME], target[MAX_ESCAPED_DOMAIN_NAME];
     char *data;
     transfer_state result;
     reply_state *rep;
@@ -939,7 +944,7 @@ static mStatus do_question(request_state *rstate, domainname *name, uint32_t ifi
 static void question_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, mDNSBool AddRecord)
     {
     char *data;
-    char name[256];
+    char name[MAX_ESCAPED_DOMAIN_NAME];
     request_state *req;
     reply_state *rep;
     int len;
@@ -988,7 +993,7 @@ static void handle_browse_request(request_state *request)
     {
     DNSServiceFlags flags;
     uint32_t interfaceIndex;
-    char regtype[256], domain[256];
+    char regtype[MAX_ESCAPED_DOMAIN_NAME], domain[MAX_ESCAPED_DOMAIN_NAME];
     DNSQuestion *q;
     domainname typedn, domdn;
     char *ptr;
@@ -1013,8 +1018,8 @@ static void handle_browse_request(request_state *request)
     ptr = request->msgdata;
     flags = get_flags(&ptr);
     interfaceIndex = get_long(&ptr);
-    if (get_string(&ptr, regtype, 256) < 0 || 
-        get_string(&ptr, domain, 256) < 0)
+    if (get_string(&ptr, regtype, MAX_ESCAPED_DOMAIN_NAME) < 0 || 
+        get_string(&ptr, domain, MAX_ESCAPED_DOMAIN_NAME) < 0)
         goto bad_param;
         
     freeL("handle_browse_request", request->msgbuf);
@@ -1076,7 +1081,7 @@ static void handle_regservice_request(request_state *request)
     {
     DNSServiceFlags flags;
     uint32_t ifi;
-    char name[256], regtype[256], domain[256], host[256];
+    char name[256], regtype[MAX_ESCAPED_DOMAIN_NAME], domain[MAX_ESCAPED_DOMAIN_NAME], host[MAX_ESCAPED_DOMAIN_NAME];
     uint16_t txtlen;
     mDNSIPPort port;
     void *txtdata;
@@ -1106,9 +1111,9 @@ static void handle_regservice_request(request_state *request)
     mDNSInterfaceID InterfaceID = mDNSPlatformInterfaceIDfromInterfaceIndex(&mDNSStorage, ifi);
     if (ifi && !InterfaceID) goto bad_param;
     if (get_string(&ptr, name, 256) < 0 ||
-        get_string(&ptr, regtype, 256) < 0 || 
-        get_string(&ptr, domain, 256) < 0 ||
-        get_string(&ptr, host, 256) < 0)
+        get_string(&ptr, regtype, MAX_ESCAPED_DOMAIN_NAME) < 0 || 
+        get_string(&ptr, domain, MAX_ESCAPED_DOMAIN_NAME) < 0 ||
+        get_string(&ptr, host, MAX_ESCAPED_DOMAIN_NAME) < 0)
         goto bad_param;
         
     port.NotAnInteger = get_short(&ptr);
@@ -1651,7 +1656,7 @@ static void handle_enum_request(request_state *rstate)
 
 static void enum_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, mDNSBool AddRecord)
     {
-    char domain[256];
+    char domain[MAX_ESCAPED_DOMAIN_NAME];
     domain_enum_t *de = question->QuestionContext;
     DNSServiceFlags flags = 0;
     reply_state *reply;
@@ -1809,7 +1814,9 @@ static mStatus gen_rr_response(domainname *servicename, mDNSInterfaceID id, requ
     int len;
     domainlabel name;
     domainname type, dom;
-    char namestr[256], typestr[256], domstr[256];
+       char namestr[MAX_DOMAIN_LABEL+1];               // Unescaped name: up to 63 bytes plus C-string terminating NULL.
+       char typestr[MAX_ESCAPED_DOMAIN_NAME];
+       char domstr [MAX_ESCAPED_DOMAIN_NAME];
 
     *rep = NULL;
     
index f3f98010d186252ced00d868aca4ea446b1b110c..193272d27237ed33d9a9bffc1b0f23e4f029b335 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: Client.c,v $
+Revision 1.11  2003/11/17 20:14:32  cheshire
+Typo: Wrote "domC" where it should have said "domainC"
+
+Revision 1.10  2003/11/14 21:27:09  cheshire
+<rdar://problem/3484766>: Security: Crashing bug in mDNSResponder
+Fix code that should use buffer size MAX_ESCAPED_DOMAIN_NAME (1005) instead of 256-byte buffers.
+
 Revision 1.9  2003/08/14 02:19:55  cheshire
 <rdar://problem/3375491> Split generic ResourceRecord type into two separate types: AuthRecord and CacheRecord
 
@@ -81,9 +90,9 @@ static void BrowseCallback(mDNS *const m, DNSQuestion *question, const ResourceR
     domainlabel name;
     domainname  type;
     domainname  domain;
-    char nameC[256];
-    char typeC[256];
-    char domainC[256];
+       char nameC  [MAX_DOMAIN_LABEL+1];                       // Unescaped name: up to 63 bytes plus C-string terminating NULL.
+       char typeC  [MAX_ESCAPED_DOMAIN_NAME];
+       char domainC[MAX_ESCAPED_DOMAIN_NAME];
     const char *state;
 
        (void)m;                // Unused
index a0531bccc67dbfc6ade814e04a0ca78be1373d3d..85613882e1d850979e8664c4f72a3ab43c0edf88 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 4274a46cc37686dda140d49e46ccc9ada1052bad..d9b20c5bb569ae93f1c448c0aad0706ad964a3cb 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 228f0a69cc9ebc35bcf6656126338a3202a29f19..f773796a58504e7863328595801001e53b84ff99 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: Identify.c,v $
+Revision 1.12  2003/11/14 21:27:09  cheshire
+<rdar://problem/3484766>: Security: Crashing bug in mDNSResponder
+Fix code that should use buffer size MAX_ESCAPED_DOMAIN_NAME (1005) instead of 256-byte buffers.
+
+Revision 1.11  2003/10/30 19:26:38  cheshire
+Fix warnings on certain compilers
+
 Revision 1.10  2003/09/02 20:38:57  cheshire
 #include <signal.h> for Linux
 
@@ -106,7 +115,7 @@ static CacheRecord gRRCache[RR_CACHE_SIZE];
 
 static volatile int StopNow;   // 0 means running, 1 means stop because we got an answer, 2 means stop because of Ctrl-C
 static volatile int NumAnswers, NumAddr, NumAAAA, NumHINFO;
-static char hostname[256], hardware[256], software[256];
+static char hostname[MAX_ESCAPED_DOMAIN_NAME], hardware[256], software[256];
 static mDNSOpaque16 lastid, id;
 
 //*************************************************************************************************************
@@ -171,10 +180,10 @@ static void InfoCallback(mDNS *const m, DNSQuestion *question, const ResourceRec
        else if (answer->rrtype == kDNSType_HINFO)
                {
                mDNSu8 *p = answer->rdata->u.data;
-               strncpy(hardware, p+1, p[0]);
+               strncpy(hardware, (char*)(p+1), p[0]);
                hardware[p[0]] = 0;
                p += 1 + p[0];
-               strncpy(software, p+1, p[0]);
+               strncpy(software, (char*)(p+1), p[0]);
                software[p[0]] = 0;
                NumAnswers++;
                NumHINFO++;
@@ -248,7 +257,11 @@ mDNSlocal void HandleSIG(int signal)
 mDNSexport int main(int argc, char **argv)
        {
        mStatus status;
-       
+       struct in_addr s4;
+       struct in6_addr s6;
+       char buffer[256];
+       DNSQuestion q;
+
        if (argc < 2) goto usage;
        
     // Initialise the mDNS core.
@@ -261,12 +274,6 @@ mDNSexport int main(int argc, char **argv)
        signal(SIGINT, HandleSIG);      // SIGINT is what you get for a Ctrl-C
        signal(SIGTERM, HandleSIG);
 
-       struct in_addr s4;
-       struct in6_addr s6;
-
-       char buffer[256];
-       DNSQuestion q;
-
        if (inet_pton(AF_INET, argv[1], &s4) == 1)
                {
                mDNSu8 *p = (mDNSu8 *)&s4;
index b495d9aae0c248f24c0096aa050d88be5945977a..3b7aff09fd1dfab03fa3adf1bb98356e8ac47506 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: NetMonitor.c,v $
+Revision 1.49  2003/10/30 19:38:56  cheshire
+Fix warning on certain compilers
+
+Revision 1.48  2003/10/30 19:30:00  cheshire
+Fix warnings on certain compilers
+
 Revision 1.47  2003/09/05 18:49:57  cheshire
 Add total packet size to display
 
@@ -307,7 +315,7 @@ typedef enum
        HostPkt_L        = 1,           // Legacy Query
        HostPkt_R        = 2,           // Response
        HostPkt_B        = 3,           // Bad
-       HostPkt_NumTypes = 4,
+       HostPkt_NumTypes = 4
        } HostPkt_Type;
 
 typedef struct
@@ -629,12 +637,11 @@ mDNSlocal void DisplayQuery(mDNS *const m, const DNSMessage *const msg, const mD
        for (i=0; i<msg->h.numQuestions; i++)
                {
                DNSQuestion q;
-               mDNSu8 *p2;
-               const mDNSu8 *ep = ptr;
-               ptr = getQuestion(msg, ptr, end, InterfaceID, &q);
-               if (!ptr) { DisplayError(srcaddr, ep, end, "QUESTION"); return; }
+               mDNSu8 *p2 = (mDNSu8 *)getQuestion(msg, ptr, end, InterfaceID, &q);
                mDNSu16 ucbit = q.qclass & kDNSQClass_UnicastResponse;
                q.qclass &= ~kDNSQClass_UnicastResponse;
+               if (!p2) { DisplayError(srcaddr, ptr, end, "QUESTION"); return; }
+               ptr = p2;
                p2 = (mDNSu8 *)FindUpdate(m, msg, auth, end, &q, &pkt);
                if (p2)
                        {
@@ -748,12 +755,12 @@ mDNSexport void mDNSCoreReceive(mDNS *const m, DNSMessage *const msg, const mDNS
        const mDNSu8 StdQ = kDNSFlag0_QR_Query    | kDNSFlag0_OP_StdQuery;
        const mDNSu8 StdR = kDNSFlag0_QR_Response | kDNSFlag0_OP_StdQuery;
        const mDNSu8 QR_OP = (mDNSu8)(msg->h.flags.b[0] & kDNSFlag0_QROP_Mask);
+       mDNSu8 *ptr = (mDNSu8 *)&msg->h.numQuestions;
 
        (void)dstaddr;  // Unused
        (void)dstport;  // Unused
        
        // Read the integer parts which are in IETF byte-order (MSB first, LSB second)
-       mDNSu8 *ptr = (mDNSu8 *)&msg->h.numQuestions;
        msg->h.numQuestions   = (mDNSu16)((mDNSu16)ptr[0] <<  8 | ptr[1]);
        msg->h.numAnswers     = (mDNSu16)((mDNSu16)ptr[2] <<  8 | ptr[3]);
        msg->h.numAuthorities = (mDNSu16)((mDNSu16)ptr[4] <<  8 | ptr[5]);
@@ -863,6 +870,7 @@ mDNSexport int main(int argc, char **argv)
 
        for (i=1; i<argc; i++)
                {
+               FilterList *f;
                struct in_addr s4;
                struct in6_addr s6;
                mDNSAddr a;
@@ -882,7 +890,7 @@ mDNSexport int main(int argc, char **argv)
                        else goto usage;
                        }
                
-               FilterList *f = malloc(sizeof(*f));
+               f = malloc(sizeof(*f));
                f->FilterAddr = a;
                f->next = Filters;
                Filters = f;
index 3bf4f1171ccbc28059cca6e3f1c79642d6139e77..193b082574f628c5ff3c4fd92bf858dcc4daef69 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
     Change History (most recent first):
 
 $Log: ProxyResponder.c,v $
+Revision 1.24  2003/11/14 21:27:09  cheshire
+<rdar://problem/3484766>: Security: Crashing bug in mDNSResponder
+Fix code that should use buffer size MAX_ESCAPED_DOMAIN_NAME (1005) instead of 256-byte buffers.
+
+Revision 1.23  2003/10/30 19:39:28  cheshire
+Fix warnings on certain compilers
+
 Revision 1.22  2003/08/14 02:19:55  cheshire
 <rdar://problem/3375491> Split generic ResourceRecord type into two separate types: AuthRecord and CacheRecord
 
@@ -151,17 +160,17 @@ mDNSlocal void ServiceCallback(mDNS *const m, ServiceRecordSet *const sr, mStatu
 
        if (result == mStatus_NoError)
                {
-               char buffer[256];
-               ConvertDomainNameToCString_unescaped(&sr->RR_SRV.resrec.name, buffer);
+               char buffer[MAX_ESCAPED_DOMAIN_NAME];
+               ConvertDomainNameToCString(&sr->RR_SRV.resrec.name, buffer);
                printf("Service %s now registered and active\n", buffer);
                }
 
        if (result == mStatus_NameConflict)
                {
-               char buffer1[256], buffer2[256];
-               ConvertDomainNameToCString_unescaped(&sr->RR_SRV.resrec.name, buffer1);
+               char buffer1[MAX_ESCAPED_DOMAIN_NAME], buffer2[MAX_ESCAPED_DOMAIN_NAME];
+               ConvertDomainNameToCString(&sr->RR_SRV.resrec.name, buffer1);
                mDNS_RenameAndReregisterService(m, sr, mDNSNULL);
-               ConvertDomainNameToCString_unescaped(&sr->RR_SRV.resrec.name, buffer2);
+               ConvertDomainNameToCString(&sr->RR_SRV.resrec.name, buffer2);
                printf("Name Conflict! %s renamed as %s\n", buffer1, buffer2);
                }
        }
@@ -175,7 +184,8 @@ mDNSlocal void RegisterService(mDNS *m, ServiceRecordSet *recordset,
        domainlabel n;
        domainname t, d;
        mDNSIPPort port;
-       unsigned char buffer[1024], *bptr = buffer;
+       unsigned char txtbuffer[1024], *bptr = txtbuffer;
+       char buffer[MAX_ESCAPED_DOMAIN_NAME];
 
        MakeDomainLabelFromLiteralString(&n, name);
        MakeDomainNameFromDNSNameString(&t, type);
@@ -187,7 +197,7 @@ mDNSlocal void RegisterService(mDNS *m, ServiceRecordSet *recordset,
                int len = strlen(argv[0]);
                printf("STR: %s\n", argv[0]);
                bptr[0] = len;
-               strcpy(bptr+1, argv[0]);
+               strcpy((char*)(bptr+1), argv[0]);
                bptr += 1 + len;
                argc--;
                argv++;
@@ -196,12 +206,12 @@ mDNSlocal void RegisterService(mDNS *m, ServiceRecordSet *recordset,
        mDNS_RegisterService(m, recordset,
                &n, &t, &d,                                     // Name, type, domain
                host, port,                                     // Host and port
-               buffer, bptr-buffer,            // TXT data, length
+               txtbuffer, bptr-txtbuffer,      // TXT data, length
                mDNSNULL, 0,                            // Subtypes
                mDNSInterface_Any,                      // Interace ID
                ServiceCallback, mDNSNULL);     // Callback and context
 
-       ConvertDomainNameToCString_unescaped(&recordset->RR_SRV.resrec.name, buffer);
+       ConvertDomainNameToCString(&recordset->RR_SRV.resrec.name, buffer);
        printf("Made Service Records for %s\n", buffer);
        }
 
@@ -226,8 +236,8 @@ mDNSlocal void NoSuchServiceCallback(mDNS *const m, AuthRecord *const rr, mStatu
 
        if (result == mStatus_NoError)
                {
-               char buffer[256];
-               ConvertDomainNameToCString_unescaped(&rr->resrec.name, buffer);
+               char buffer[MAX_ESCAPED_DOMAIN_NAME];
+               ConvertDomainNameToCString(&rr->resrec.name, buffer);
                printf("Non-existence assertion %s now registered and active\n", buffer);
                }
 
@@ -235,12 +245,12 @@ mDNSlocal void NoSuchServiceCallback(mDNS *const m, AuthRecord *const rr, mStatu
                {
                domainlabel n;
                domainname t, d;
-               char buffer1[256], buffer2[256];
-               ConvertDomainNameToCString_unescaped(&rr->resrec.name, buffer1);
+               char buffer1[MAX_ESCAPED_DOMAIN_NAME], buffer2[MAX_ESCAPED_DOMAIN_NAME];
+               ConvertDomainNameToCString(&rr->resrec.name, buffer1);
                DeconstructServiceName(&rr->resrec.name, &n, &t, &d);
                IncrementLabelSuffix(&n, mDNStrue);
                mDNS_RegisterNoSuchService(m, rr, &n, &t, &d, proxyhostname, mDNSInterface_Any, NoSuchServiceCallback, mDNSNULL);
-               ConvertDomainNameToCString_unescaped(&rr->resrec.name, buffer2);
+               ConvertDomainNameToCString(&rr->resrec.name, buffer2);
                printf("Name Conflict! %s renamed as %s\n", buffer1, buffer2);
                }
        }
@@ -250,12 +260,12 @@ mDNSlocal void RegisterNoSuchService(mDNS *m, AuthRecord *const rr, domainname *
        {
        domainlabel n;
        domainname t, d;
-       unsigned char buffer[256];
+       char buffer[MAX_ESCAPED_DOMAIN_NAME];
        MakeDomainLabelFromLiteralString(&n, name);
        MakeDomainNameFromDNSNameString(&t, type);
        MakeDomainNameFromDNSNameString(&d, domain);
        mDNS_RegisterNoSuchService(m, rr, &n, &t, &d, proxyhostname, mDNSInterface_Any, NoSuchServiceCallback, proxyhostname);
-       ConvertDomainNameToCString_unescaped(&rr->resrec.name, buffer);
+       ConvertDomainNameToCString(&rr->resrec.name, buffer);
        printf("Made Non-existence Record for %s\n", buffer);
        }
 
index 6130e0c925005532c7630fcb730a6e4e35d80a78..d6446755f0560fa3c182a6a86a6799a4ba0e62d4 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 345b2f42b674769b4c84ba0ebf4ffec88378fc99..3d289e66d05d1fb2306a2cc0f262d81a61bc36fa 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -36,6 +38,9 @@
        Change History (most recent first):
 
 $Log: mDNSPosix.c,v $
+Revision 1.25  2003/10/30 19:25:49  cheshire
+Fix signed/unsigned warning on certain compilers
+
 Revision 1.24  2003/08/18 23:12:23  cheshire
 <rdar://problem/3382647> mDNSResponder divide by zero in mDNSPlatformTimeNow()
 
@@ -412,7 +417,7 @@ mDNSlocal void GetUserSpecifiedFriendlyComputerName(domainlabel *const namelabel
 mDNSlocal void GetUserSpecifiedRFC1034ComputerName(domainlabel *const namelabel)
        {
        int len = 0;
-       gethostname(&namelabel->c[1], MAX_DOMAIN_LABEL);
+       gethostname((char *)(&namelabel->c[1]), MAX_DOMAIN_LABEL);
        while (len < MAX_DOMAIN_LABEL && namelabel->c[len+1] && namelabel->c[len+1] != '.') len++;
        namelabel->c[0] = len;
        }
index 53f7fe95863f31bce8ce7bc8d79186844e87f3c5..915acb72b174af0779849d650efe4fdeb98b0860 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -23,6 +25,9 @@
     Change History (most recent first):
 
 $Log: mDNSPosix.h,v $
+Revision 1.9  2003/10/30 19:25:19  cheshire
+Fix warning on certain compilers
+
 Revision 1.8  2003/08/12 19:56:26  cheshire
 Update to APSL 2.0
 
@@ -70,6 +75,7 @@ extern int gMDNSPlatformPosixVerboseLevel;
 struct mDNS_PlatformSupport_struct
        {
     // No additional data required for Posix at this time
+       long dummy[1];  // Some compilers don't like empty structures
        };
 
 extern mStatus mDNSPlatformPosixRefreshInterfaceList(mDNS *const m);
index fa9bda0682509ab3d30f275583f6b074e7221f7e..26699f086029b7ad68571015c649cd753dfb8e11 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 21d13f1966fa28b7f51d26463ee3ce92e86c9bb2..a764aa0f9baf3738bb7ecd6a0b080dd959f946e0 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
diff --git a/mDNSPosix/parselog.py b/mDNSPosix/parselog.py
new file mode 100755 (executable)
index 0000000..ac14fc5
--- /dev/null
@@ -0,0 +1,259 @@
+#!/usr/bin/python
+
+# parselog.py, written and contributed by Kevin Marks
+#
+# Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
+#
+# @APPLE_LICENSE_HEADER_START@
+#
+# This file contains Original Code and/or Modifications of Original Code
+# as defined in and that are subject to the Apple Public Source License
+# Version 2.0 (the 'License'). You may not use this file except in
+# compliance with the License. Please obtain a copy of the License at
+# http://www.opensource.apple.com/apsl/ and read it before using this
+# file.
+#
+# The Original Code and all software distributed under the License are
+# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+# Please see the License for the specific language governing rights and
+# limitations under the License.
+#
+# @APPLE_LICENSE_HEADER_END@
+#
+# Requires OS X 10.3 Panther for Python and Core Graphics Python APIs
+# Invoke from the command line with "parselog.py fname" where fname is a log file made by mDNSNetMonitor
+#
+# Caveats:
+# It expects plain ASCII, and doesn't handle spaces in record names very well right now
+# There's a procedure you can follow to 'sanitize' an mDNSNetMonitor log file to make it more paletable to parselog.py:
+# 1. Run mDNSNetMonitor in a terminal window.
+#    When you have enough traffic, type Ctrl-C and save the content of the terminal window to disk.
+#    Alternatively, you can use "mDNSNetMonitor > logfile" to write the text directly to a file.
+#    You now have a UTF-8 text file.
+# 2. Open the UTF-8 text file using BBEdit or some other text editor.
+#    (These instructions are for BBEdit, which I highly recommend you use when doing this.)
+# 3. Make sure BBEdit correctly interprets the file as UTF-8.
+#    Either set your "Text Files Opening" preference to "UTF-8 no BOM", and drop the file onto BBEdit,
+#    or manually open the File using "File -> Open" and make sure the "Read As" setting is set to "UTF-8 no BOM"
+#    Check in the document pulldown menu in the window toolbar to make sure that it says "Encoding: UTF-8 no BOM"
+# 4. Use "Tools -> Convert to ASCII" to replace all special characters with their seven-bit ascii equivalents.
+#    (e.g. curly quotes are converted to straight quotes)
+# 5. Do a grep search and replace. (Cmd-F; make sure Grep checkbox is turned on.)
+#    Enter this search text     : ^(.................\(................\S*) (.* -> .*)$
+#    Enter this replacement text: \1-\2
+#    Click "Replace All"
+#    Press Cmd-Opt-= repeatedly until there are no more instances to be replaced.
+#    You now have text file with all spaces in names changed to hyphens
+# 6. Save the new file. You can save it as "UTF-8 no BOM", or as "Mac Roman". It really doesn't matter which --
+#    the file now contains only seven-bit ascii, so it's all the same no matter how you save it.
+# 7. Run "parselog.py fname"
+# 8. Open the resulting fname.pdf file with a PDF viewer like Preview on OS X
+#
+# Key to what you see:
+# Time is on the horizontal axis
+# Individual machines are shown on the vertical axis
+# Filled red    circle: Normal query              Hollow red    circle: Query requesting unicast reply
+# Filled orange circle: Probe (service starting)  Hollow orange circle: First probe (requesting unicast reply)
+# Filled green  circle: Normal answer             Hollow green  circle: Goodbye message (record going away)
+#                                                 Hollow blue   circle: Legacy query (from old client)
+# $Log: parselog.py,v $
+# Revision 1.2  2003/12/01 21:47:44  cheshire
+# APSL
+#
+# Revision 1.1  2003/10/10 02:14:17  cheshire
+# First checkin of parselog.py, a tool to create graphical representations of mDNSNetMonitor logs
+
+from CoreGraphics import *
+import math   # for pi
+
+import string
+import sys, os
+import re
+
+def parselog(inFile):
+       f = open(inFile)
+       hunt = 'getTime'
+       ipList = {}
+       querySource = {}
+       plotPoints = []
+       maxTime=0
+       minTime = 36*60*60
+       spaceExp = re.compile(r'\s+')
+       print "Reading " + inFile
+       while 1:
+               lines = f.readlines(100000)
+               if not lines:
+                       break
+               for line in lines:
+                       if (hunt == 'skip'):
+                               if (line == '\n' or line == '\r' or line ==''): 
+                                       hunt = 'getTime'
+#                              else:
+#                                      msg = ("skipped" , line)
+#                                      print msg
+                       elif (hunt == 'getTime'):
+                               if (line == "^C\n" ):
+                                       break
+                               time = line.split(' ')[0].split(':')
+                               if (len(time)<3):
+                                       #print "bad time, skipping",time
+                                       hunt = 'skip'
+                               else:
+                                       hunt = 'getIP'
+                               #print (("getTime:%s" % (line)), time)
+                       elif (hunt == 'getIP'):
+                               ip = line.split(' ',1)
+                               ip = ip[0]
+                               secs=0
+                               for t in time:
+                                       secs = secs*60 +float(t)
+                               if (secs>maxTime):
+                                       maxTime=secs
+                               if (secs<minTime):
+                                       minTime=secs
+                               if (not ip in ipList):
+                                       ipList[ip] = [len(ipList), "", ""]
+                               #print (("getIP:%s" % (line)), time, secs)
+                               hunt = 'getQA'
+                       elif (hunt == 'getQA'):
+                               qaList = spaceExp.split(line)
+                               # qaList[0] Source Address
+                               # qaList[1] Operation type (PU/PM/QU/QM/AN etc.)
+                               # qaList[2] Record type (PTR/SRV/TXT etc.)
+                               # For QU/QM/LQ:
+                               # qaList[3] RR name
+                               # For PU/PM/AN/AN+/AD/AD+/KA:
+                               # qaList[3] TTL
+                               # qaList[4] RR name
+                               # qaList[5...] "->" symbol and following rdata
+                               #print qaList
+                               if (qaList[0] == ip):
+                                       if (qaList[1] == '(QU)' or qaList[1] == '(LQ)' or qaList[1] == '(PU)'):
+                                               plotPoints.append([secs, ipList[ip][0], (qaList[1])[1:-1]])
+                                       elif (qaList[1] == '(QM)'):
+                                               plotPoints.append([secs, ipList[ip][0], (qaList[1])[1:-1]])
+                                               querySource[qaList[3]] = len(plotPoints)-1
+                                       elif (qaList[1] == '(PM)'):
+                                               plotPoints.append([secs, ipList[ip][0], (qaList[1])[1:-1]])
+                                               querySource[qaList[4]] = len(plotPoints)-1
+                                       elif (qaList[1] == '(AN)' or qaList[1] == '(AN+)' or qaList[1] == '(DE)'):
+                                               plotPoints.append([secs, ipList[ip][0], (qaList[1])[1:-1]])
+                                               try:
+                                                       theQuery = querySource[qaList[4]]
+                                                       theDelta = secs - plotPoints[theQuery][0]
+                                                       if (theDelta < 1.0):
+                                                               plotPoints[-1].append(querySource[qaList[4]])
+                                                       #print "Answer AN+ %s points to %d" % (qaList[4],querySource[qaList[4]])
+                                               except:
+                                                       #print "Couldn't find any preceeding question for", qaList
+                                                       pass
+                                       elif (qaList[1] != '(KA)' and qaList[1] != '(AD)' and qaList[1] != '(AD+)'):
+                                               print "Operation unknown", qaList
+
+                                       if (qaList[1] == '(AN)' or qaList[1] == '(AN+)' or qaList[1] == '(AD)' or qaList[1] == '(AD+)'):
+                                               if (qaList[2] == 'HINFO'):
+                                                       ipList[ip][1] = qaList[4]
+                                                       ipList[ip][2] = string.join(qaList[6:])
+                                                       #print ipList[ip][1]
+                                               elif (qaList[2] == 'AAAA'):
+                                                       if (ipList[ip][1] == ""):
+                                                               ipList[ip][1] = qaList[4]
+                                                               ipList[ip][2] = "Panther"
+                                               elif (qaList[2] == 'Addr'):
+                                                       if (ipList[ip][1] == ""):
+                                                               ipList[ip][1] = qaList[4]
+                                                               ipList[ip][2] = "Jaguar"
+                               else:
+                                       if (line == '\n'): 
+                                               hunt = 'getTime'
+                                       else:
+                                               hunt = 'skip'
+       f.close()
+       #print plotPoints
+       #print querySource
+       #width=20.0*(maxTime-minTime)
+       if (maxTime < minTime + 10.0):
+               maxTime = minTime + 10.0
+       typesize = 12
+       width=20.0*(maxTime-minTime)
+       pageHeight=(len(ipList)+1) * typesize
+       scale = width/(maxTime-minTime)
+       leftMargin = typesize * 60
+       bottomMargin = typesize
+       pageRect = CGRectMake (-leftMargin, -bottomMargin,  leftMargin + width, bottomMargin + pageHeight)   #  landscape
+       outFile = "%s.pdf" % (".".join(inFile.split('.')[:-1]))
+       c = CGPDFContextCreateWithFilename (outFile, pageRect)
+       print "Writing " + outFile
+       ourColourSpace = c.getColorSpace()
+       # QM/QU red    solid/hollow
+       # PM/PU orange solid/hollow
+       # LQ    blue         hollow
+       # AN/DA green  solid/hollow
+       #colourLookup = {"L":(0.0,0.0,.75), "Q":(.75,0.0,0.0), "P":(.75,0.5,0.0), "A":(0.0,0.75,0.0), "D":(0.0,0.75,0.0), "?":(.25,0.25,0.25)}
+       colourLookup = {"L":(0.0,0.0,1.0), "Q":(1.0,0.0,0.0), "P":(1.0,0.8,0.0), "A":(0.0,1.0,0.0), "D":(0.0,1.0,0.0), "?":(1.0,1.0,1.0)}
+       c.beginPage (pageRect)
+       c.setRGBFillColor(.75,0.0,0.0,1.0)
+       c.setRGBStrokeColor(.25,0.75,0.25,1.0)
+       c.setLineWidth(0.25)
+       for point in plotPoints:
+               #c.addArc((point[0]-minTime)*scale,point[1]*typesize+6,5,0,2*math.pi,1)
+               c.addArc((point[0]-minTime)*scale,point[1]*typesize+6,typesize/4,0,2*math.pi,1)
+               theColour = colourLookup[(point[2])[0]]
+               if (((point[2])[0]) != "L") and (((point[2])[0]) != "Q") and (((point[2])[0]) != "P") and (((point[2])[0]) != "A") and (((point[2])[0]) != "D"):
+                       print "Unknown", point
+               if ((point[2])[-1] == "M" or (point[2])[0]== "A"):
+                       c.setRGBFillColor(theColour[0],theColour[1],theColour[2],.5)
+                       c.fillPath()
+               else:
+                       c.setRGBStrokeColor(theColour[0],theColour[1],theColour[2],.5)
+                       c.setLineWidth(1.0)
+                       c.strokePath()
+               c.setRGBStrokeColor(.25,0.75,0.25,1.0)
+               c.setLineWidth(0.25)
+               for index in point[3:]:
+                       c.beginPath()
+                       c.moveToPoint((point[0]-minTime)*scale,point[1]*typesize+6)
+                       c.addLineToPoint(((plotPoints[index])[0]-minTime)*scale,(plotPoints[index])[1]*typesize+6)
+                       c.closePath()
+                       c.strokePath()
+       c.setRGBFillColor (0,0,0, 1)
+       c.setTextDrawingMode (kCGTextFill)
+       c.setTextMatrix (CGAffineTransformIdentity)
+       c.selectFont ('Gill Sans', typesize, kCGEncodingMacRoman)
+       c.setRGBStrokeColor(0.25,0.0,0.0,1.0)
+       c.setLineWidth(0.1)
+       for ip,[height,hname,hinfo] in ipList.items():
+               c.beginPath()
+               c.moveToPoint(pageRect.origin.x,height*typesize+6)
+               c.addLineToPoint(width,height*typesize+6)
+               c.closePath()
+               c.strokePath()
+               c.showTextAtPoint(pageRect.origin.x + 2,               height*typesize + 2, ip,    len(ip))
+               c.showTextAtPoint(pageRect.origin.x + 2 + typesize*8,  height*typesize + 2, hname, len(hname))
+               c.showTextAtPoint(pageRect.origin.x + 2 + typesize*25, height*typesize + 2, hinfo, len(hinfo))
+       for time in range (int(minTime),int(maxTime)+1):
+               c.beginPath()
+               c.moveToPoint((time-minTime)*scale,pageRect.origin.y)
+               c.addLineToPoint((time-minTime)*scale,pageHeight)
+               c.closePath()
+               if (int(time) % 10 == 0):
+                       theHours = time/3600
+                       theMinutes = time/60 % 60
+                       theSeconds = time % 60
+                       theTimeString = '%d:%02d:%02d' % (theHours, theMinutes, theSeconds)
+                       # Should measure string width, but don't know how to do that
+                       theStringWidth = typesize * 3.5
+                       c.showTextAtPoint((time-minTime)*scale - theStringWidth/2, pageRect.origin.y + 2, theTimeString, len(theTimeString))
+                       c.setLineWidth(0.3)
+               else:
+                       c.setLineWidth(0.1)
+               c.strokePath()
+       c.endPage()
+       c.finish()
+
+                       
+for arg in sys.argv[1:]:
+       parselog(arg)
index b482fb89c643c30f0f98e3c39c1d8b38a97486a7..560c75ff3e36688dbee600ff1d46e3f414ed42f5 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index de026a47dcbedb22f2b6f6b48e5758283710b3bf..537c0eedcc7576c146cef683478057af02ea4962 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/Application.sln b/mDNSWindows/Applications/RendezvousBrowser/Windows/Application.sln
deleted file mode 100644 (file)
index f588af6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "Application.vcproj", "{EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}"
-EndProject
-Global
-       GlobalSection(SolutionConfiguration) = preSolution
-               ConfigName.0 = Debug
-               ConfigName.1 = Release
-       EndGlobalSection
-       GlobalSection(ProjectDependencies) = postSolution
-       EndGlobalSection
-       GlobalSection(ProjectConfiguration) = postSolution
-               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.ActiveCfg = Debug|Win32
-               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.Build.0 = Debug|Win32
-               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.ActiveCfg = Release|Win32
-               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.Build.0 = Release|Win32
-       EndGlobalSection
-       GlobalSection(ExtensibilityGlobals) = postSolution
-       EndGlobalSection
-       GlobalSection(ExtensibilityAddIns) = postSolution
-       EndGlobalSection
-EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/Application.vcproj b/mDNSWindows/Applications/RendezvousBrowser/Windows/Application.vcproj
deleted file mode 100644 (file)
index 3f64b2a..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="7.00"
-       Name="Application"
-       ProjectGUID="{EDE4B529-4CF5-4a49-9B6F-C10F0EA24278}"
-       Keyword="MFCProj">
-       <Platforms>
-               <Platform
-                       Name="Win32"/>
-       </Platforms>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="Debug"
-                       IntermediateDirectory="Debug"
-                       ConfigurationType="1"
-                       UseOfMFC="1"
-                       CharacterSet="2">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG"
-                               StringPooling="TRUE"
-                               MinimalRebuild="FALSE"
-                               BasicRuntimeChecks="3"
-                               SmallerTypeCheck="FALSE"
-                               RuntimeLibrary="1"
-                               BufferSecurityCheck="TRUE"
-                               EnableFunctionLevelLinking="FALSE"
-                               ForceConformanceInForLoopScope="TRUE"
-                               RuntimeTypeInfo="TRUE"
-                               UsePrecompiledHeader="2"
-                               PrecompiledHeaderThrough="StdAfx.h"
-                               PrecompiledHeaderFile=".\Debug/Application.pch"
-                               AssemblerListingLocation=".\Debug/"
-                               ObjectFile=".\Debug/"
-                               ProgramDataBaseFileName=".\Debug/"
-                               BrowseInformation="1"
-                               WarningLevel="4"
-                               WarnAsError="TRUE"
-                               SuppressStartupBanner="TRUE"
-                               Detect64BitPortabilityProblems="TRUE"
-                               DebugInformationFormat="3"
-                               CompileAs="0"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalOptions="/MACHINE:I386"
-                               AdditionalDependencies="ws2_32.lib nafxcwd.lib LIBCMTD.lib"
-                               OutputFile="Rendezvous Browser Debug.exe"
-                               LinkIncremental="1"
-                               SuppressStartupBanner="TRUE"
-                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcwd.lib;LIBCMTD.lib"
-                               GenerateDebugInformation="TRUE"
-                               ProgramDatabaseFile=".\Debug/Application.pdb"
-                               SubSystem="2"/>
-                       <Tool
-                               Name="VCMIDLTool"
-                               PreprocessorDefinitions="_DEBUG"
-                               MkTypLibCompatible="FALSE"
-                               SuppressStartupBanner="TRUE"
-                               TargetEnvironment="1"
-                               TypeLibraryName=".\Debug/Application.tlb"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="_AFXDLL;_DEBUG"
-                               Culture="1033"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory=".\Release"
-                       IntermediateDirectory=".\Release"
-                       ConfigurationType="1"
-                       UseOfMFC="1"
-                       CharacterSet="2"
-                       WholeProgramOptimization="FALSE">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="1"
-                               GlobalOptimizations="TRUE"
-                               InlineFunctionExpansion="0"
-                               FavorSizeOrSpeed="2"
-                               OmitFramePointers="FALSE"
-                               OptimizeForWindowsApplication="FALSE"
-                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
-                               StringPooling="TRUE"
-                               MinimalRebuild="FALSE"
-                               RuntimeLibrary="0"
-                               BufferSecurityCheck="FALSE"
-                               EnableFunctionLevelLinking="FALSE"
-                               ForceConformanceInForLoopScope="TRUE"
-                               RuntimeTypeInfo="TRUE"
-                               UsePrecompiledHeader="2"
-                               PrecompiledHeaderThrough="stdafx.h"
-                               PrecompiledHeaderFile=".\Release/Application.pch"
-                               AssemblerListingLocation=".\Release/"
-                               ObjectFile=".\Release/"
-                               ProgramDataBaseFileName=".\Release/"
-                               BrowseInformation="1"
-                               WarningLevel="4"
-                               WarnAsError="TRUE"
-                               SuppressStartupBanner="TRUE"
-                               Detect64BitPortabilityProblems="TRUE"
-                               CompileAs="0"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalOptions="/MACHINE:I386"
-                               AdditionalDependencies="ws2_32.lib nafxcw.lib LIBCMT.lib"
-                               OutputFile="Rendezvous Browser.exe"
-                               LinkIncremental="1"
-                               SuppressStartupBanner="TRUE"
-                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcw.lib;LIBCMT.lib"
-                               ProgramDatabaseFile=".\Release/Application.pdb"
-                               SubSystem="2"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"/>
-                       <Tool
-                               Name="VCMIDLTool"
-                               PreprocessorDefinitions="NDEBUG"
-                               MkTypLibCompatible="TRUE"
-                               SuppressStartupBanner="TRUE"
-                               TargetEnvironment="1"
-                               TypeLibraryName=".\Release/Application.tlb"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                               PreprocessorDefinitions="_AFXDLL;NDEBUG"
-                               Culture="1033"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-               <Configuration
-                       Name="All|Win32"
-                       OutputDirectory="All"
-                       IntermediateDirectory="All"
-                       ConfigurationType="1">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories=""/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-       </Configurations>
-       <Files>
-               <Filter
-                       Name="Source Files"
-                       Filter="">
-                       <File
-                               RelativePath="Sources\AboutDialog.cpp">
-                       </File>
-                       <File
-                               RelativePath="Sources\AboutDialog.h">
-                       </File>
-                       <File
-                               RelativePath="Sources\Application.cpp">
-                       </File>
-                       <File
-                               RelativePath="Sources\Application.h">
-                       </File>
-                       <File
-                               RelativePath="Sources\ChooserDialog.cpp">
-                       </File>
-                       <File
-                               RelativePath="Sources\ChooserDialog.h">
-                       </File>
-                       <File
-                               RelativePath="Sources\StdAfx.cpp">
-                       </File>
-                       <File
-                               RelativePath="Sources\StdAfx.h">
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Resource Files"
-                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;rc">
-                       <File
-                               RelativePath="Resources\Application.ico">
-                       </File>
-                       <File
-                               RelativePath="Resources\Application.rc">
-                       </File>
-                       <File
-                               RelativePath="Resources\Application.rc2">
-                       </File>
-                       <File
-                               RelativePath=".\Resources\Resource.h">
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Rendezvous"
-                       Filter="">
-                       <File
-                               RelativePath="..\..\..\DNSServices\DNSServices.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\..\mDNSCore\mDNS.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\mDNSWin32.c">
-                       </File>
-               </Filter>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.sln b/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.sln
new file mode 100644 (file)
index 0000000..fe6ce77
--- /dev/null
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "ApplicationVS2002.vcproj", "{EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}"
+EndProject
+Global
+       GlobalSection(SolutionConfiguration) = preSolution
+               ConfigName.0 = All
+               ConfigName.1 = Debug
+               ConfigName.2 = Release
+       EndGlobalSection
+       GlobalSection(ProjectDependencies) = postSolution
+       EndGlobalSection
+       GlobalSection(ProjectConfiguration) = postSolution
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.All.ActiveCfg = All|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.All.Build.0 = All|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.ActiveCfg = Debug|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.Build.0 = Debug|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.ActiveCfg = Release|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+       EndGlobalSection
+       GlobalSection(ExtensibilityAddIns) = postSolution
+       EndGlobalSection
+EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.vcproj b/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2002.vcproj
new file mode 100644 (file)
index 0000000..89316d2
--- /dev/null
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.00"
+       Name="Application"
+       ProjectGUID="{EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}"
+       Keyword="MFCProj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG"
+                               StringPooling="TRUE"
+                               MinimalRebuild="FALSE"
+                               BasicRuntimeChecks="3"
+                               SmallerTypeCheck="FALSE"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="TRUE"
+                               EnableFunctionLevelLinking="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               RuntimeTypeInfo="TRUE"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderThrough="StdAfx.h"
+                               PrecompiledHeaderFile=".\Debug/Application.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="ws2_32.lib nafxcwd.lib LIBCMTD.lib"
+                               OutputFile="Rendezvous Browser Debug.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="TRUE"
+                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcwd.lib;LIBCMTD.lib"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile=".\Debug/Application.pdb"
+                               SubSystem="2"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="FALSE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Debug/Application.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_AFXDLL;_DEBUG"
+                               Culture="1033"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory=".\Release"
+                       IntermediateDirectory=".\Release"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2"
+                       WholeProgramOptimization="FALSE">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="1"
+                               GlobalOptimizations="TRUE"
+                               InlineFunctionExpansion="0"
+                               FavorSizeOrSpeed="2"
+                               OmitFramePointers="FALSE"
+                               OptimizeForWindowsApplication="FALSE"
+                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+                               StringPooling="TRUE"
+                               MinimalRebuild="FALSE"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="FALSE"
+                               EnableFunctionLevelLinking="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               RuntimeTypeInfo="TRUE"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderThrough="stdafx.h"
+                               PrecompiledHeaderFile=".\Release/Application.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="ws2_32.lib nafxcw.lib LIBCMT.lib"
+                               OutputFile="Rendezvous Browser.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="TRUE"
+                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcw.lib;LIBCMT.lib"
+                               ProgramDatabaseFile=".\Release/Application.pdb"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Release/Application.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_AFXDLL;NDEBUG"
+                               Culture="1033"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+               <Configuration
+                       Name="All|Win32"
+                       OutputDirectory="All"
+                       IntermediateDirectory="All"
+                       ConfigurationType="1">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories=""/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+       </Configurations>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="">
+                       <File
+                               RelativePath="Sources\AboutDialog.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\AboutDialog.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\Application.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\Application.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\ChooserDialog.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\ChooserDialog.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\StdAfx.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\StdAfx.h">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;rc">
+                       <File
+                               RelativePath="Resources\Application.ico">
+                       </File>
+                       <File
+                               RelativePath="Resources\Application.rc">
+                       </File>
+                       <File
+                               RelativePath="Resources\Application.rc2">
+                       </File>
+                       <File
+                               RelativePath=".\Resources\Resource.h">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Rendezvous"
+                       Filter="">
+                       <File
+                               RelativePath="..\..\..\DNSServices\DNSServices.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\..\mDNSCore\mDNS.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSWin32.c">
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.sln b/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.sln
new file mode 100644 (file)
index 0000000..0bdb334
--- /dev/null
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "ApplicationVS2003.vcproj", "{EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}"
+       ProjectSection(ProjectDependencies) = postProject
+       EndProjectSection
+EndProject
+Global
+       GlobalSection(SolutionConfiguration) = preSolution
+               All = All
+               Debug = Debug
+               Release = Release
+       EndGlobalSection
+       GlobalSection(ProjectConfiguration) = postSolution
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.All.ActiveCfg = All|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.All.Build.0 = All|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.ActiveCfg = Debug|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Debug.Build.0 = Debug|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.ActiveCfg = Release|Win32
+               {EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}.Release.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+       EndGlobalSection
+       GlobalSection(ExtensibilityAddIns) = postSolution
+       EndGlobalSection
+EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.vcproj b/mDNSWindows/Applications/RendezvousBrowser/Windows/ApplicationVS2003.vcproj
new file mode 100644 (file)
index 0000000..4f9b2bd
--- /dev/null
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.10"
+       Name="Application"
+       ProjectGUID="{EDE4B529-4CF5-4A49-9B6F-C10F0EA24278}"
+       Keyword="MFCProj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DEBUG"
+                               StringPooling="TRUE"
+                               MinimalRebuild="FALSE"
+                               BasicRuntimeChecks="3"
+                               SmallerTypeCheck="FALSE"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="TRUE"
+                               EnableFunctionLevelLinking="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               RuntimeTypeInfo="TRUE"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderThrough="StdAfx.h"
+                               PrecompiledHeaderFile=".\Debug/Application.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="ws2_32.lib nafxcwd.lib LIBCMTD.lib"
+                               OutputFile="Rendezvous Browser Debug.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="TRUE"
+                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcwd.lib;LIBCMTD.lib"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile=".\Debug/Application.pdb"
+                               SubSystem="2"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="FALSE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Debug/Application.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_AFXDLL;_DEBUG"
+                               Culture="1033"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory=".\Release"
+                       IntermediateDirectory=".\Release"
+                       ConfigurationType="1"
+                       UseOfMFC="1"
+                       CharacterSet="2"
+                       WholeProgramOptimization="FALSE">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="1"
+                               GlobalOptimizations="TRUE"
+                               InlineFunctionExpansion="0"
+                               FavorSizeOrSpeed="2"
+                               OmitFramePointers="FALSE"
+                               OptimizeForWindowsApplication="FALSE"
+                               AdditionalIncludeDirectories=".\Resources;..\;..\..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+                               StringPooling="TRUE"
+                               MinimalRebuild="FALSE"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="FALSE"
+                               EnableFunctionLevelLinking="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               RuntimeTypeInfo="TRUE"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderThrough="stdafx.h"
+                               PrecompiledHeaderFile=".\Release/Application.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="ws2_32.lib nafxcw.lib LIBCMT.lib"
+                               OutputFile="Rendezvous Browser.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="TRUE"
+                               IgnoreDefaultLibraryNames="wsock32.lib;nafxcw.lib;LIBCMT.lib"
+                               ProgramDatabaseFile=".\Release/Application.pdb"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Release/Application.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_AFXDLL;NDEBUG"
+                               Culture="1033"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="All|Win32"
+                       OutputDirectory="All"
+                       IntermediateDirectory="All"
+                       ConfigurationType="1">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalIncludeDirectories=""/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="">
+                       <File
+                               RelativePath="Sources\AboutDialog.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\AboutDialog.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\Application.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\Application.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\ChooserDialog.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\ChooserDialog.h">
+                       </File>
+                       <File
+                               RelativePath="Sources\StdAfx.cpp">
+                       </File>
+                       <File
+                               RelativePath="Sources\StdAfx.h">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;rc">
+                       <File
+                               RelativePath="Resources\Application.ico">
+                       </File>
+                       <File
+                               RelativePath="Resources\Application.rc">
+                       </File>
+                       <File
+                               RelativePath="Resources\Application.rc2">
+                       </File>
+                       <File
+                               RelativePath=".\Resources\Resource.h">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Rendezvous"
+                       Filter="">
+                       <File
+                               RelativePath="..\..\..\DNSServices\DNSServices.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\..\mDNSCore\mDNS.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSWin32.c">
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index cd8cafb1a963519ca6e448ea1e344ad878e5efb6..6e23cf336e5021b9bd5ceb007c1da4b669cdb084 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 11c9149ddacd28ea0a43e59ff5b7c5e15e71d565..40256a0d96580546ec2f8a32b6c66c18f21704f9 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 396b7e9fd5c06a555278806fbd6f7abfcf85ade0..de05091330340e3544be8a6f7576730c54e07b9d 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index e174e4f06a7c278fdafa4d207f95f79ae1b183bd..37df61a118feab63771a1e3cb7a58b78d56bd7ed 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index ddd81f901a83d3fd0f196aa6b924fe399b1ae91e..0dfbd5b0ca00dcf05813a75a8cea44472eb149ef 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7acb0b512a1be39de67aa0228c2b499cdeaaf054..3a0cdb24054abda14d847e3fbcbb6f83fe786447 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index a26a1e759b68fda74fe0281d5f9fc8df7c43fc0c..e5dc4f799ccd8aad59778005f96c266f40c5bd36 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 3c16ff761f4a3b88ca416c6b2adc742c5d14b7c3..73c2505811f0fcf91add4a3f5284a4d52d7c68d6 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index ba28f412b32572e06e1e9bae165ab7fafe9b148b..5bc823ef56c1f63fdf33321de83950439da63603 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 1f4fe133816f955cb4f09d80b1d8861faa56f3d4..fb1437ff298649ef64c492bffdbc2e84763da86c 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 991fc08b97ae6815528e53aa6c330483ed25ab77..de86ab868acdb5eca8f9a63bdcdf879dbc579953 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 77775105d88e217313d0571970e29c9a4db8cb34..43f3e6d6f510af0fc6b98f67c378d29cb8893598 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 6622a5dd2d1b53baf16dd772eddda1eba412b7c9..506a6bef902ce2f4bbcb887a524b3d028efbded7 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 3672152459ed954d69746d50ca97362325ce8d7d..fb4331e9bcbe8162173954550ebb1e50374be2d9 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 7e49566e1d1f4cbac12812184d72edec03334c29..beda06624cf9870934032f6d86aa4d31f0e8f932 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index eaa6a70e675a9ac7bdf1f691da1e2780621fe864..af1135d16484193dc6b0bdc6ec884b0a8ddf40a7 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 1f76fc225f4d84ab84adf32267013e46fda91931..41f56e8075c2e603abae71bccbaff4b2b98e93fc 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32.sln b/mDNSWindows/Applications/RendezvousTest/ToolWin32.sln
deleted file mode 100644 (file)
index 495d5df..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tool", "ToolWin32.vcproj", "{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
-EndProject
-Global
-       GlobalSection(SolutionConfiguration) = preSolution
-               ConfigName.0 = Debug
-               ConfigName.1 = Release
-       EndGlobalSection
-       GlobalSection(ProjectDependencies) = postSolution
-       EndGlobalSection
-       GlobalSection(ProjectConfiguration) = postSolution
-               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.ActiveCfg = Debug|Win32
-               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.Build.0 = Debug|Win32
-               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.ActiveCfg = Release|Win32
-               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.Build.0 = Release|Win32
-       EndGlobalSection
-       GlobalSection(ExtensibilityGlobals) = postSolution
-       EndGlobalSection
-       GlobalSection(ExtensibilityAddIns) = postSolution
-       EndGlobalSection
-EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32.vcproj b/mDNSWindows/Applications/RendezvousTest/ToolWin32.vcproj
deleted file mode 100644 (file)
index d5e1868..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="7.00"
-       Name="Tool"
-       ProjectGUID="{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
-       Keyword="Win32Proj">
-       <Platforms>
-               <Platform
-                       Name="Win32"/>
-       </Platforms>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="Debug"
-                       IntermediateDirectory="Debug"
-                       ConfigurationType="1"
-                       CharacterSet="1">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-                               StringPooling="TRUE"
-                               MinimalRebuild="TRUE"
-                               BasicRuntimeChecks="3"
-                               SmallerTypeCheck="FALSE"
-                               RuntimeLibrary="1"
-                               BufferSecurityCheck="TRUE"
-                               ForceConformanceInForLoopScope="TRUE"
-                               UsePrecompiledHeader="2"
-                               BrowseInformation="1"
-                               WarningLevel="4"
-                               WarnAsError="TRUE"
-                               Detect64BitPortabilityProblems="TRUE"
-                               DebugInformationFormat="4"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="ws2_32.lib"
-                               OutputFile="$(OutDir)/Tool.exe"
-                               LinkIncremental="2"
-                               GenerateDebugInformation="TRUE"
-                               ProgramDatabaseFile="$(OutDir)/Tool.pdb"
-                               SubSystem="1"
-                               TargetMachine="1"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="Release"
-                       IntermediateDirectory="Release"
-                       ConfigurationType="1"
-                       CharacterSet="1"
-                       WholeProgramOptimization="FALSE">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="2"
-                               InlineFunctionExpansion="2"
-                               FavorSizeOrSpeed="2"
-                               OmitFramePointers="TRUE"
-                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
-                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-                               StringPooling="TRUE"
-                               ExceptionHandling="FALSE"
-                               RuntimeLibrary="0"
-                               BufferSecurityCheck="FALSE"
-                               EnableFunctionLevelLinking="FALSE"
-                               DisableLanguageExtensions="FALSE"
-                               ForceConformanceInForLoopScope="TRUE"
-                               UsePrecompiledHeader="2"
-                               WarningLevel="4"
-                               WarnAsError="TRUE"
-                               Detect64BitPortabilityProblems="TRUE"
-                               DebugInformationFormat="3"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="ws2_32.lib"
-                               OutputFile="$(OutDir)/Tool.exe"
-                               LinkIncremental="1"
-                               GenerateDebugInformation="TRUE"
-                               SubSystem="1"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               TargetMachine="1"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-               <Configuration
-                       Name="all|Win32"
-                       OutputDirectory="all"
-                       IntermediateDirectory="all"
-                       ConfigurationType="1">
-                       <Tool
-                               Name="VCCLCompilerTool"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLinkerTool"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCWebDeploymentTool"/>
-               </Configuration>
-       </Configurations>
-       <Files>
-               <Filter
-                       Name="Rendezvous"
-                       Filter="">
-                       <File
-                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\DNSServices\DNSServices.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\DNSServices\DNSServices.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\mDNSCore\mDNS.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\mDNSCore\mDNSClientAPI.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\mDNSCore\mDNSDebug.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\..\mDNSCore\mDNSPlatformFunctions.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\mDNSWin32.c">
-                       </File>
-                       <File
-                               RelativePath="..\..\mDNSWin32.h">
-                       </File>
-               </Filter>
-               <File
-                       RelativePath="Tool.c">
-               </File>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.sln b/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.sln
new file mode 100644 (file)
index 0000000..bc86b75
--- /dev/null
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tool", "ToolWin32VS2002.vcproj", "{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
+EndProject
+Global
+       GlobalSection(SolutionConfiguration) = preSolution
+               ConfigName.0 = all
+               ConfigName.1 = Debug
+               ConfigName.2 = Release
+       EndGlobalSection
+       GlobalSection(ProjectDependencies) = postSolution
+       EndGlobalSection
+       GlobalSection(ProjectConfiguration) = postSolution
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.all.ActiveCfg = all|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.all.Build.0 = all|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.ActiveCfg = Debug|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.Build.0 = Debug|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.ActiveCfg = Release|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+       EndGlobalSection
+       GlobalSection(ExtensibilityAddIns) = postSolution
+       EndGlobalSection
+EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.vcproj b/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2002.vcproj
new file mode 100644 (file)
index 0000000..d5e1868
--- /dev/null
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.00"
+       Name="Tool"
+       ProjectGUID="{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
+       Keyword="Win32Proj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="1"
+                       CharacterSet="1">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+                               StringPooling="TRUE"
+                               MinimalRebuild="TRUE"
+                               BasicRuntimeChecks="3"
+                               SmallerTypeCheck="FALSE"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="TRUE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               UsePrecompiledHeader="2"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="4"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="ws2_32.lib"
+                               OutputFile="$(OutDir)/Tool.exe"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile="$(OutDir)/Tool.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="Release"
+                       IntermediateDirectory="Release"
+                       ConfigurationType="1"
+                       CharacterSet="1"
+                       WholeProgramOptimization="FALSE">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="2"
+                               FavorSizeOrSpeed="2"
+                               OmitFramePointers="TRUE"
+                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               StringPooling="TRUE"
+                               ExceptionHandling="FALSE"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="FALSE"
+                               EnableFunctionLevelLinking="FALSE"
+                               DisableLanguageExtensions="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               UsePrecompiledHeader="2"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="ws2_32.lib"
+                               OutputFile="$(OutDir)/Tool.exe"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="TRUE"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+               <Configuration
+                       Name="all|Win32"
+                       OutputDirectory="all"
+                       IntermediateDirectory="all"
+                       ConfigurationType="1">
+                       <Tool
+                               Name="VCCLCompilerTool"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+       </Configurations>
+       <Files>
+               <Filter
+                       Name="Rendezvous"
+                       Filter="">
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServices.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServices.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNS.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSClientAPI.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSDebug.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSPlatformFunctions.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\mDNSWin32.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\mDNSWin32.h">
+                       </File>
+               </Filter>
+               <File
+                       RelativePath="Tool.c">
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.sln b/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.sln
new file mode 100644 (file)
index 0000000..53a2ba2
--- /dev/null
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tool", "ToolWin32VS2003.vcproj", "{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
+       ProjectSection(ProjectDependencies) = postProject
+       EndProjectSection
+EndProject
+Global
+       GlobalSection(SolutionConfiguration) = preSolution
+               all = all
+               Debug = Debug
+               Release = Release
+       EndGlobalSection
+       GlobalSection(ProjectConfiguration) = postSolution
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.all.ActiveCfg = all|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.all.Build.0 = all|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.ActiveCfg = Debug|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Debug.Build.0 = Debug|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.ActiveCfg = Release|Win32
+               {F66EFE7E-50A6-44D4-87C7-742B303BA852}.Release.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+       EndGlobalSection
+       GlobalSection(ExtensibilityAddIns) = postSolution
+       EndGlobalSection
+EndGlobal
diff --git a/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.vcproj b/mDNSWindows/Applications/RendezvousTest/ToolWin32VS2003.vcproj
new file mode 100644 (file)
index 0000000..2349cb9
--- /dev/null
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.10"
+       Name="Tool"
+       ProjectGUID="{F66EFE7E-50A6-44D4-87C7-742B303BA852}"
+       Keyword="Win32Proj">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="1"
+                       CharacterSet="1">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+                               StringPooling="TRUE"
+                               MinimalRebuild="TRUE"
+                               BasicRuntimeChecks="3"
+                               SmallerTypeCheck="FALSE"
+                               RuntimeLibrary="1"
+                               BufferSecurityCheck="TRUE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               UsePrecompiledHeader="2"
+                               BrowseInformation="1"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="4"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="ws2_32.lib"
+                               OutputFile="$(OutDir)/Tool.exe"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile="$(OutDir)/Tool.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="Release"
+                       IntermediateDirectory="Release"
+                       ConfigurationType="1"
+                       CharacterSet="1"
+                       WholeProgramOptimization="FALSE">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="2"
+                               FavorSizeOrSpeed="2"
+                               OmitFramePointers="TRUE"
+                               AdditionalIncludeDirectories="..\..\..\mDNSCore;..\..\..\mDNSWindows;..\..\DNSServices"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               StringPooling="TRUE"
+                               ExceptionHandling="FALSE"
+                               RuntimeLibrary="0"
+                               BufferSecurityCheck="FALSE"
+                               EnableFunctionLevelLinking="FALSE"
+                               DisableLanguageExtensions="FALSE"
+                               ForceConformanceInForLoopScope="TRUE"
+                               UsePrecompiledHeader="2"
+                               WarningLevel="4"
+                               WarnAsError="TRUE"
+                               Detect64BitPortabilityProblems="TRUE"
+                               DebugInformationFormat="3"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="ws2_32.lib"
+                               OutputFile="$(OutDir)/Tool.exe"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="TRUE"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+               <Configuration
+                       Name="all|Win32"
+                       OutputDirectory="all"
+                       IntermediateDirectory="all"
+                       ConfigurationType="1">
+                       <Tool
+                               Name="VCCLCompilerTool"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"/>
+                       <Tool
+                               Name="VCMIDLTool"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+                       <Tool
+                               Name="VCManagedWrapperGeneratorTool"/>
+                       <Tool
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Rendezvous"
+                       Filter="">
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServiceDiscovery.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServices.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\DNSServices\DNSServices.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNS.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSClientAPI.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSDebug.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mDNSCore\mDNSPlatformFunctions.h">
+                       </File>
+                       <File
+                               RelativePath="..\..\mDNSWin32.c">
+                       </File>
+                       <File
+                               RelativePath="..\..\mDNSWin32.h">
+                       </File>
+               </Filter>
+               <File
+                       RelativePath="Tool.c">
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 77e3dcb13e72718abbaa21d31bd0c54b310f21e1..0fa57f3f2f37d589db54717a0c5ad13a9a2c10ee 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 618bbb3d3e37459b43ea8f48afda5ef60bfaa2b9..d1323002214b6ea500222acb68129a3fec04cbe3 100644 (file)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index ca84436895996fc920521ca60ea7b3e77ecac04e..edb704759f72de4220d720a97f4f326b409e1f8d 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index f5be4aabc1f4b1b042187139b9a7614a42563ae9..d1fb0393008b8a81dd96bbf17cea316d44c96c5d 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 161e635e0f50e8b23f24c5ff85050928ac8ed558..e1f012e597bcb23d4fdb10438dffef59bae5f563 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
index 2bf5ddd55da27ba8f962f47c6a1b3c11cca0a7bc..492dbb6a366d62caf9a8c63362517bc05ca0eb5e 100755 (executable)
@@ -3,6 +3,8 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in