• Home
  • Raw
  • Download

Lines Matching +full:srv +full:- +full:ipv6 +full:- +full:single +full:- +full:target

1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2003-2004, Apple Computer, Inc. All rights reserved.
36 * of zero-configuration networking (ZEROCONF).
42 * all the information -- such as name, IP address, and port --
46 * AppleTalk. Bonjour allows applications to provide user-friendly printer
61 * For example, Mac OS X 10.4.9 has mDNSResponder-108.4, which would be represented as
62 * version 1080400. This allows C code to do simple greater-than and less-than comparisons:
63 …* e.g. an application that requires the DNSServiceGetProperty() call (new in mDNSResponder-126) ca…
69 * The version defined in this header file symbol allows for compile-time
72 * in those earlier versions. Similar checks may also be performed at run-time:
73 * => weak linking -- to avoid link failures if run with an earlier
75 * => DNSServiceGetProperty(DaemonVersion) -- to verify whether the running daemon
156 * Most DNS-SD API functions and callbacks include a DNSServiceFlags parameter.
157 * As a general rule, any given bit in the 32-bit flags field has a specific fixed meaning,
166 * will fail if, in a future release, another bit in the 32-bit flags field is also set.
199 * non-shared records. By default, name conflicts are automatically handled
200 * by renaming the service. NoAutoRename overrides this behavior - with this
211 * record's name is to be unique on the network (e.g. SRV records).
222 /* Flag for creating a long-lived unicast query for the DNSServiceQueryRecord call. */
240 * on the network, forcing its removal will result in a user-interface flap -- the
241 * discovered service instance will disappear, and then re-appear moments later.
248 * cancelled -- it remains active and if the answer subsequently changes
262 * there is no end-user benefit to browsing to find a long list of opaque GUIDs.
263 * Using the NonBrowsable flag creates SRV+TXT without the cost of also advertising
269 * single Unix Domain Socket connection with the background daemon, instead of having a
315 * guideline applies more broadly -- any time you cancel an operation on
326 * 4. Don't Double-Deallocate
347 * wire. If "hostname" is a wide-area unicast DNS hostname (i.e. not a ".local." name)
348 * but this host has no routable IPv6 address, then the call will not try to look up IPv6 addresses
398 * the DNS-SD programming APIs can use these constants, so that the same code
436 kDNSServiceType_AAAA = 28, /* IPv6 Address. */
446 kDNSServiceType_A6 = 38, /* IPv6 Address (deprecated) */
447 kDNSServiceType_DNAME = 39, /* Non-terminal DNAME (for IPv6) */
449 kDNSServiceType_OPT = 41, /* EDNS0 option (meta-RR) */
463 kDNSServiceType_SPF = 99, /* Sender Policy Framework for E-Mail */
464 kDNSServiceType_UINFO = 100, /* IANA-Reserved */
465 kDNSServiceType_UID = 101, /* IANA-Reserved */
466 kDNSServiceType_GID = 102, /* IANA-Reserved */
467 kDNSServiceType_UNSPEC = 103, /* IANA-Reserved */
482 kDNSServiceErr_Unknown = -65537, /* 0xFFFE FFFF */
483 kDNSServiceErr_NoSuchName = -65538,
484 kDNSServiceErr_NoMemory = -65539,
485 kDNSServiceErr_BadParam = -65540,
486 kDNSServiceErr_BadReference = -65541,
487 kDNSServiceErr_BadState = -65542,
488 kDNSServiceErr_BadFlags = -65543,
489 kDNSServiceErr_Unsupported = -65544,
490 kDNSServiceErr_NotInitialized = -65545,
491 kDNSServiceErr_AlreadyRegistered = -65547,
492 kDNSServiceErr_NameConflict = -65548,
493 kDNSServiceErr_Invalid = -65549,
494 kDNSServiceErr_Firewall = -65550,
495 … kDNSServiceErr_Incompatible = -65551, /* client library incompatible with daemon */
496 kDNSServiceErr_BadInterfaceIndex = -65552,
497 kDNSServiceErr_Refused = -65553,
498 kDNSServiceErr_NoSuchRecord = -65554,
499 kDNSServiceErr_NoAuth = -65555,
500 kDNSServiceErr_NoSuchKey = -65556,
501 kDNSServiceErr_NATTraversal = -65557,
502 kDNSServiceErr_DoubleNAT = -65558,
503 kDNSServiceErr_BadTime = -65559, /* Codes up to here existed in Tiger */
504 kDNSServiceErr_BadSig = -65560,
505 kDNSServiceErr_BadKey = -65561,
506 kDNSServiceErr_Transient = -65562,
507 kDNSServiceErr_ServiceNotRunning = -65563, /* Background daemon not running */
508 kDNSServiceErr_NATPortMappingUnsupported = -65564, /* NAT doesn't support NAT-PMP or UPnP */
509 …kDNSServiceErr_NATPortMappingDisabled = -65565, /* NAT supports NAT-PMP or UPnP but it's disab…
510 …kDNSServiceErr_NoRouter = -65566, /* No router currently configured (probably no…
511 kDNSServiceErr_PollingMode = -65567,
512 kDNSServiceErr_Timeout = -65568
515 * FFFE FF00 (-65792) to FFFE FFFF (-65537) */
519 /* literal C-String, including the terminating NULL at the end. */
523 /* Maximum length, in bytes, of a domain name represented as an *escaped* C-String */
524 /* including the final trailing dot, and the C-String terminating NULL at the end. */
530 * -- or --
533 * All strings used in the DNS-SD APIs are UTF-8 strings. Apart from the exceptions noted below,
536 * '\\' represents a single literal '\' in the name
537 * '\.' represents a single literal '.' in the name
538 * '\ddd', where ddd is a three-digit decimal value from 000 to 255,
539 * represents a single literal byte with that value.
545 * it is, by definition, just a single literal string. Any characters in that string
551 * As DNS-SD becomes more popular, rich-text domains for service discovery will
554 * The servicename may be up to 63 bytes of UTF-8 text (not counting the C-String
556 * _service._udp, where the "service" part is 1-15 characters, which may be
557 * letters, digits, or hyphens. The domain part of the three-part name may be
562 * servicenames should simply be displayed as-is. When resolving, the discovered
566 * For converting from servicename/regtype/domain to a single properly-escaped
572 * The full (escaped) DNS name of this service's SRV record would be:
580 * Specific interface indexes are identified via a 32-bit unsigned integer returned
585 * (e.g. 'local.', '254.169.in-addr.arpa.', '{8,9,A,B}.E.F.ip6.arpa.') then multicast
613 * - If kDNSServiceInterfaceIndexP2P is passed to DNSServiceBrowse or
616 * - If kDNSServiceInterfaceIndexP2P is passed to DNSServiceResolve, it is
630 #define kDNSServiceInterfaceIndexLocalOnly ((uint32_t)-1)
631 #define kDNSServiceInterfaceIndexUnicast ((uint32_t)-2)
632 #define kDNSServiceInterfaceIndexP2P ((uint32_t)-3)
657 * future properties could be defined which return variable-sized results.
672 * to a 32-bit unsigned integer, and the size parameter must be set to sizeof(uint32_t).
674 * On return, the 32-bit unsigned integer contains the version number, formatted as follows:
678 * For example, Mac OS X 10.4.9 has mDNSResponder-108.4, which would be represented as
679 * version 1080400. This allows applications to do simple greater-than and less-than comparisons:
680 * e.g. an application that requires at least mDNSResponder-108.4 can check:
716 * in a timely fashion -- if the client allows a large backlog of data to build up the daemon
721 * return value: The DNSServiceRef's underlying socket descriptor, or -1 on
736 * a reply from the daemon - the daemon may terminate its connection with a client that does not
760 * created via this reference will be invalidated by this call - the resource records are
764 * is invalidated when this function is called - the DNSRecordRef may not be used in subsequent
768 * not compatible with dns_service_discovery_ref objects defined in the legacy Mach-based
791 * Note that the names returned are (like all of DNS-SD) UTF-8 strings,
794 * A graphical browser displaying a hierarchical tree-structured view should cut
795 * the names at the bare dots to yield individual labels, then de-escape each
796 * label according to the escaping rules, and then display the resulting UTF-8 text.
842 * interfaceIndex: If non-zero, specifies the interface on which to look for domains.
882 * invoked with the kDNSServiceFlagsAdd flag set. When Wide-Area
883 * DNS-SD is in use, it is possible for a single service to get
885 * DNS domain, and another in a wide-area unicast DNS domain).
886 * If a successfully-registered name later suffers a name conflict
929 * interfaceIndex: If non-zero, specifies the interface on which to register the service
937 * name: If non-NULL, specifies the service name to be registered.
940 * If a name is specified, it must be 1-63 bytes of UTF-8 text.
947 * by 1-15 characters, which may be letters, digits, or hyphens.
949 * should be registered at <http://www.dns-sd.org/ServiceTypes.html>.
953 * comma-separated list, with no additional spaces, e.g.
962 * dns-sd command-line tool:
964 * % dns-sd -R Simple _test._tcp "" 1001 &
965 * % dns-sd -R Better _test._tcp,HasFeatureA "" 1002 &
966 * % dns-sd -R Best _test._tcp,HasFeatureA,HasFeatureB "" 1003 &
969 * % dns-sd -B _test._tcp # will find all three services
970 * % dns-sd -B _test._tcp,HasFeatureA # finds "Better" and "Best"
971 * % dns-sd -B _test._tcp,HasFeatureB # finds only "Best"
973 * Subtype labels may be up to 63 bytes long, and may contain any eight-
975 * using a C-string-based API, conventional DNS escaping must be used for
978 * % dns-sd -R Test '_test._tcp,s\.one,s\,two,s\\three,s\000four' local 123
980 * domain: If non-NULL, specifies the domain on which to advertise the service.
984 * host: If non-NULL, specifies the SRV target host name. Most applications
986 * default host name(s). Note that specifying a non-NULL host does NOT
987 * create an address record for that host - the application is responsible
998 * txtRecord: The TXT record rdata. A non-NULL txtRecord MUST be a properly formatted DNS
1001 * i.e. it creates a TXT record of length one containing a single empty string.
1002 * RFC 1035 doesn't allow a TXT record to contain *zero* strings, so a single empty
1009 …* fails. The client MAY pass NULL for the callback - The client will NOT be noti…
1048 * Note that the DNSServiceAddRecord/UpdateRecord/RemoveRecord are *NOT* thread-safe
1049 * with respect to a single DNSServiceRef. If you plan to have multiple threads
1094 * - The primary txt record of a service registered via DNSServiceRegister()
1095 * - A record added to a registered service via DNSServiceAddRecord()
1096 * - An individual record registered by DNSServiceRegisterRecord()
1226 * interfaceIndex: If non-zero, specifies the interface on which to browse for services
1233 * A client may optionally specify a single subtype to perform filtered browsing:
1238 * domain: If non-NULL, specifies the domain on which to browse for services.
1268 * Resolve a service name discovered via DNSServiceBrowse() to a target host name, port number, and
1271 * Note: Applications should NOT use DNSServiceResolve() solely for txt record monitoring - use
1277 * Note: DNSServiceResolve() behaves correctly for typical services that have a single SRV record
1278 * and a single TXT record. To resolve non-standard services with multiple SRV or TXT records,
1296 * special-purpose functions included in this API that take fullname parameters.
1299 * hosttarget: The target hostname of the machine providing the service. This name can
1311 …* This is incorrect, since it contains length bytes which are values in the range 0 to 255, not -1…
1316 …* as being -6 instead, with various bad consequences ranging from incorrect operation to software …
1350 * performed with a link-local mDNS query, even if the name is an
1351 * apparently non-local name (i.e. a name not ending in ".local.")
1435 * again, it should be re-fetched with a new query. Of course, this
1469 * Pass kDNSServiceFlagsLongLivedQuery to create a "long-lived" unicast
1470 * query in a non-local domain. Without setting this flag, unicast queries
1471 * will be one-shot - that is, only answers available at the time of the call
1474 * callbacks. This flag has no effect on link-local multicast queries.
1476 * interfaceIndex: If non-zero, specifies the interface on which to issue the query
1515 * Unified lookup of both IPv4 and IPv6 addresses for a fully qualified hostname
1538 * address: IPv4 or IPv6 address.
1544 * again, it should be re-fetched with a new query. Of course, this
1575 * Pass kDNSServiceFlagsLongLivedQuery to create a "long-lived" unicast
1576 * query in a non-local domain. Without setting this flag, unicast queries
1577 * will be one-shot - that is, only answers available at the time of the call
1580 * callbacks. This flag has no effect on link-local multicast queries.
1586 * to look up IPv6 addresses, or both to look up both kinds. If neither flag is
1590 * * If "hostname" is a wide-area unicast DNS hostname (i.e. not a ".local." name)
1591 * but this host has no routable IPv6 address, then the call will not try to
1592 * look up IPv6 addresses for "hostname", since any addresses it found would be
1689 * (To deregister ALL records registered on a single connected DNSServiceRef
1696 * interfaceIndex: If non-zero, specifies the interface on which to register the record
1747 * to be out of date (e.g. because TCP connection to a service's target failed.)
1798 * to an external port on the NAT. The NAT should support either the NAT-PMP or the UPnP IGD
1807 * (Clients advertising services using Wide-Area DNS-SD DO NOT need to use this API
1808 * -- when a client calls DNSServiceRegister() NAT mappings are automatically created
1810 * Only clients using some directory mechanism other than Wide-Area DNS-SD need to use
1815 * different external port being mapped for this client. Over the lifetime of any long-lived
1824 * gateway, then the API returns an error code -- it can't get you a NAT mapping if there's no
1826 * whether or not you need a NAT mapping can be tricky and non-obvious, particularly on
1833 * your client needs to call the PortMapping API -- just call it anyway, and if it wasn't
1836 * - If the machine already has a routable public IP address, then your callback
1838 * - If a NAT mapping is required and obtained, then your callback will be invoked
1840 * - If a NAT mapping is required but not obtained from the local NAT gateway,
1882 * This controls how quickly stale mappings will be garbage-collected
1934 * will garbage-collect old stale NAT port mappings when their lifetime expires.
1935 * Requesting a short TTL causes such orphaned mappings to be garbage-collected
1939 …* client vanishing, stale NAT port mappings will not be garbage-collected as quic…
1940 * Most clients should pass 0 to use a system-wide default value.
1996 * Concatenate a three-part domain name (as returned by the above callbacks) into a
1997 * properly-escaped full domain name. Note that callbacks in the above functions ALREADY ESCAPE
2006 * service: The service name - any dots or backslashes must NOT be escaped.
2053 * Note: Represents a DNS-SD TXT record.
2075 * key/value pairs to be added, or simply provide a fixed-sized buffer
2077 * A no-value (key-only) key requires (1 + key length) bytes.
2079 * A key with non-empty value requires (1 + key length + 1 + value length).
2080 * For most applications, DNS-SD TXT records are generally
2081 * less than 100 bytes, so in most cases a simple fixed-sized
2082 * 256-byte buffer will be more than sufficient.
2083 * Recommended size limits for DNS-SD TXT Records are discussed in
2084 * <http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt>
2088 * is the separator between the key and value in the on-the-wire
2095 * buffer: Optional caller-supplied storage used to hold the TXTRecord data.
2130 * - Absent (key does not appear at all)
2131 * - Present with no value ("key" appears alone)
2132 * - Present with empty value ("key=" appears in TXT record)
2133 * - Present with non-empty value ("key=value" appears in TXT record)
2134 * For more details refer to "Data Syntax for DNS-SD TXT Records" in
2135 * <http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt>
2139 * key: A null-terminated string which only contains printable ASCII
2140 * values (0x20-0x7E), excluding '=' (0x3D). Keys should be
2146 * textual data, UTF-8 is STRONGLY recommended.
2151 * If non-NULL but valueSize is zero, then "key=" will be
2268 * key: A null-terminated ASCII string containing the key name.
2290 * key: A null-terminated ASCII string containing the key name.
2298 * if the key exists with empty or non-empty value.
2300 * For non-empty value, valueLen will be length of value data.
2335 * a TXT Record. Legal index values range from zero to TXTRecordGetCount()-1.
2342 * For keys with empty value, *value is non-NULL and *valueLen is zero.
2343 * For keys with non-empty value, *value is non-NULL and *valueLen is non-zero.
2354 * On return, the buffer contains a null-terminated C string
2355 * giving the key name. DNS-SD TXT keys are usually
2367 * TXTRecordGetCount()-1.
2437 * and report errors at compile-time if anything is wrong. The usual way to do this would
2438 * be to use a run-time "if" statement or the conventional run-time "assert" mechanism, but
2445 char assert0[(sizeof(union _TXTRecordRef_t) == 16) ? 1 : -1];