- * Formatting notes:
- * This code follows the "Whitesmiths style" C indentation rules. Plenty of discussion
- * on C indentation can be found on the web, such as <http://www.kafejo.com/komp/1tbs.htm>,
- * but for the sake of brevity here I will say just this: Curly braces are not syntactially
- * part of an "if" statement; they are the beginning and ending markers of a compound statement;
- * therefore common sense dictates that if they are part of a compound statement then they
- * should be indented to the same level as everything else in that compound statement.
- * Indenting curly braces at the same level as the "if" implies that curly braces are
- * part of the "if", which is false. (This is as misleading as people who write "char* x,y;"
- * thinking that variables x and y are both of type "char*" -- and anyone who doesn't
- * understand why variable y is not of type "char*" just proves the point that poor code
- * layout leads people to unfortunate misunderstandings about how the C language really works.)
-
- Change History (most recent first):
-
-$Log: Identify.c,v $
-Revision 1.34 2004/12/16 20:17:11 cheshire
-<rdar://problem/3324626> Cache memory management improvements
-
-Revision 1.33 2004/11/30 22:37:00 cheshire
-Update copyright dates and add "Mode: C; tab-width: 4" headers
-
-Revision 1.32 2004/10/19 21:33:21 cheshire
-<rdar://problem/3844991> Cannot resolve non-local registrations using the mach API
-Added flag 'kDNSServiceFlagsForceMulticast'. Passing through an interface id for a unicast name
-doesn't force multicast unless you set this flag to indicate explicitly that this is what you want
-
-Revision 1.31 2004/10/16 00:17:00 cheshire
-<rdar://problem/3770558> Replace IP TTL 255 check with local subnet source address check
-
-Revision 1.30 2004/09/21 23:29:51 cheshire
-<rdar://problem/3680045> DNSServiceResolve should delay sending packets
-
-Revision 1.29 2004/09/17 01:08:53 cheshire
-Renamed mDNSClientAPI.h to mDNSEmbeddedAPI.h
- The name "mDNSClientAPI.h" is misleading to new developers looking at this code. The interfaces
- declared in that file are ONLY appropriate to single-address-space embedded applications.
- For clients on general-purpose computers, the interfaces defined in dns_sd.h should be used.
-
-Revision 1.28 2004/09/17 00:31:52 cheshire
-For consistency with ipv6, renamed rdata field 'ip' to 'ipv4'
-
-Revision 1.27 2004/09/16 01:58:22 cheshire
-Fix compiler warnings
-
-Revision 1.26 2004/08/24 21:55:07 cheshire
-Don't try to build IPv6 code on systems that don't have IPv6
-
-Revision 1.25 2004/07/20 23:42:37 cheshire
-Update to use only "_services._dns-sd._udp.local." meta-query for service enumeration
-
-Revision 1.24 2004/06/15 02:39:47 cheshire
-When displaying error message, only show command name, not entire path
-
-Revision 1.23 2004/05/18 23:51:26 cheshire
-Tidy up all checkin comments to use consistent "<rdar://problem/xxxxxxx>" format for bug numbers
-
-Revision 1.22 2004/04/20 22:43:28 cheshire
-Use _services._dns-sd._udp query, as documented in
-<http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd-02.txt>
-
-Revision 1.21 2004/01/28 21:38:57 cheshire
-Also ask target host for _services._mdns._udp.local. list
-
-Revision 1.20 2004/01/28 19:04:38 cheshire
-Fix Ctrl-C handling when multiple targets are specified
-
-Revision 1.19 2004/01/28 03:49:30 cheshire
-Enhanced mDNSIdentify to make use of new targeted-query capability
-
-Revision 1.18 2004/01/27 19:06:51 cheshire
-Remove workaround for WWDC 2003 bug; no one has run that buggy build for a long time
-
-Revision 1.17 2004/01/22 03:57:00 cheshire
-Use the new meta-interface mDNSInterface_ForceMCast. This restores mDNSIdentify's
-ability to use multicast queries with non-link-local target addresses, like 17.x.x.x.
-
-Revision 1.16 2004/01/22 00:03:32 cheshire
-Add while() loop so that a list of targets may be specified on the command line
-
-Revision 1.15 2004/01/21 21:55:06 cheshire
-Don't need to wait for timeout once we've got the information we wanted
-
-Revision 1.14 2003/12/17 00:51:22 cheshire
-Changed mDNSNetMonitor and mDNSIdentify to link the object files
-instead of #including the "DNSCommon.c" "uDNS.c" and source files
-
-Revision 1.13 2003/12/13 03:05:28 ksekar
-<rdar://problem/3192548>: DynDNS: Unicast query of service records
-
-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
-
-Revision 1.9 2003/08/14 23:57:46 cheshire
-Report if there is no answer at all from the target host
-
-Revision 1.8 2003/08/14 02:19:55 cheshire
-<rdar://problem/3375491> Split generic ResourceRecord type into two separate types: AuthRecord and CacheRecord
-
-Revision 1.7 2003/08/12 19:56:26 cheshire
-Update to APSL 2.0
-
-Revision 1.6 2003/08/06 01:46:18 cheshire
-Distinguish no answer from partial answer
-
-Revision 1.5 2003/08/05 23:56:26 cheshire
-Update code to compile with the new mDNSCoreReceive() function that requires a TTL
-(Right now mDNSPosix.c just reports 255 -- we should fix this)
-
-Revision 1.4 2003/08/04 17:24:48 cheshire
-Combine the three separate A/AAAA/HINFO queries into a single qtype "ANY" query
-
-Revision 1.3 2003/08/04 17:14:08 cheshire
-Do both AAAA queries in parallel
-
-Revision 1.2 2003/08/02 02:25:13 cheshire
-Multiple improvements: Now displays host's name, and all v4 and v6 addresses, as well as HINFO record
-
-Revision 1.1 2003/08/01 02:20:02 cheshire
-Add mDNSIdentify tool, used to discover what version of mDNSResponder a particular host is running
-