Home | History | Annotate | Download | only in mDNSShared

Lines Matching refs:domain

118 	domainname domain;
122 // for multi-domain default browsing
126 domainname domain;
396 // Generates a response message giving name, type, domain, plus interface index,
550 mDNSlocal int build_domainname_from_strings(domainname *srv, char *name, char *regtype, char *domain)
557 if (!MakeDomainNameFromDNSNameString(&d, domain)) return -1;
565 // On a freshly-created Unix Domain Socket, the kernel should *never* fail to buffer a small write for us
806 if (instance->request->u.servicereg.InterfaceID == mDNSInterface_P2P || (!instance->request->u.servicereg.InterfaceID && SameDomainName(&instance->domain, &localdomain) && (instance->request->flags & kDNSServiceFlagsIncludeP2P)))
1110 if (instance->external_advertise && (instance->request->u.servicereg.InterfaceID == mDNSInterface_P2P || (!instance->request->u.servicereg.InterfaceID && SameDomainName(&instance->domain, &localdomain) && (instance->request->flags & kDNSServiceFlagsIncludeP2P))))
1438 mDNSlocal mStatus register_service_instance(request_state *request, const domainname *domain)
1442 const mDNSBool DomainIsLocal = SameDomainName(domain, &localdomain);
1459 // If the client specified an interface, but no domain, then we honor the specified interface for the "local" (mDNS)
1462 // (Specifying an interface with an apparently wide-area domain (i.e. something other than "local")
1463 // currently forces the registration to use mDNS multicast despite the apparently wide-area domain.)
1468 if (SameDomainName(&(*ptr)->domain, domain))
1470 LogMsg("register_service_instance: domain %##s already registered for %#s.%##s",
1471 domain->c, &request->u.servicereg.name, &request->u.servicereg.type);
1483 DomainAuthInfo *AuthInfo = GetAuthInfoForName(&mDNSStorage, domain);
1498 AssignDomainName(&instance->domain, domain);
1504 &request->u.servicereg.name, &request->u.servicereg.type, domain,
1520 &request->u.servicereg.name, &request->u.servicereg.type, domain->c, result);
1535 LogMsg("%s registration domain %##s", add ? "Adding" : "Removing", d->name.c);
1543 while (*ptr && !SameDomainName(&(*ptr)->domain, &d->name)) ptr = &(*ptr)->next;
1546 // If we don't already have this domain in our list for this registration, add it now
1556 LogMsg("udsserver_default_reg_domain_changed domain %##s not found for service %#s type %s",
1593 char domain[MAX_ESCAPED_DOMAIN_NAME], host[MAX_ESCAPED_DOMAIN_NAME];
1606 get_string(&request->msgptr, request->msgend, domain, MAX_ESCAPED_DOMAIN_NAME) < 0 ||
1608 { LogMsg("ERROR: handle_regservice_request - Couldn't read name/regtype/domain"); return(mStatus_BadParamErr); }
1661 if (*domain)
1664 if (!MakeDomainNameFromDNSNameString(&d, domain))
1665 { LogMsg("ERROR: handle_regservice_request - domain bad %s", domain); return(mStatus_BadParamErr); }
1696 request->sd, flags, interfaceIndex, name, request->u.servicereg.type_as_string, domain, host, mDNSVal16(request->u.servicereg.port));
1715 if (!*domain)
1775 if (SameDomainName(&p->domain, d))
1781 AssignDomainName(&b->domain, d);
1786 LogMsg("mDNS_StartBrowse returned %d for type %##s domain %##s", err, info->u.browser.regtype.c, d->c);
1794 if (info->u.browser.interface_id == mDNSInterface_P2P || (!info->u.browser.interface_id && SameDomainName(&b->domain, &localdomain) && (info->flags & kDNSServiceFlagsIncludeP2P)))
1797 ConstructServiceName(&tmp, NULL, &info->u.browser.regtype, &b->domain);
1811 if (info->u.browser.interface_id == mDNSInterface_P2P || (!info->u.browser.interface_id && SameDomainName(&ptr->domain, &localdomain) && (info->flags & kDNSServiceFlagsIncludeP2P)))
1814 ConstructServiceName(&tmp, NULL, &info->u.browser.regtype, &ptr->domain);
1829 debugf("udsserver_automatic_browse_domain_changed: %s default browse domain %##s", add ? "Adding" : "Removing", d->name.c);
1842 while (*ptr && !SameDomainName(&(*ptr)->domain, &d->name)) ptr = &(*ptr)->next;
1845 // If we don't already have this domain in our list for this browse operation, add it now
1901 (type == mDNS_DomainTypeBrowse ) ? "browse domain " :
1928 (type == mDNS_DomainTypeBrowse ) ? "browse domain " :
1963 if (!*p) LogMsg("RmvAutoBrowseDomain: Got remove event for domain %##s not in list", name->c);
2063 if (!*pp) // If not found in our existing list, this is a new default registration domain
2086 // Now we have our new updated automatic registration domain list
2113 LogOperation("AutomaticBrowseDomainChange: %s automatic browse domain %##s",
2149 char regtype[MAX_ESCAPED_DOMAIN_NAME], domain[MAX_ESCAPED_DOMAIN_NAME];
2160 get_string(&request->msgptr, request->msgend, domain, MAX_ESCAPED_DOMAIN_NAME) < 0) return(mStatus_BadParamErr);
2164 if (domain[0] == '\0') uDNS_SetupSearchDomains(&mDNSStorage, UDNS_START_WAB_QUERY);
2175 // For over-long service types, we only allow domain "local"
2176 if (temp.c[0] > 15 && domain[0] == 0) mDNSPlatformStrCopy(domain, "local.");
2182 request->u.browser.default_domain = !domain[0];
2186 request->sd, request->flags, interfaceIndex, request->u.browser.regtype.c, domain);
2193 if (domain[0])
2195 if (!MakeDomainNameFromDNSNameString(&d, domain)) return(mStatus_BadParamErr);
2290 char name[256], regtype[MAX_ESCAPED_DOMAIN_NAME], domain[MAX_ESCAPED_DOMAIN_NAME];
2310 get_string(&request->msgptr, request->msgend, domain, MAX_ESCAPED_DOMAIN_NAME) < 0)
2311 { LogMsg("ERROR: handle_resolve_request - Couldn't read name/regtype/domain"); return(mStatus_BadParamErr); }
2315 if (build_domainname_from_strings(&fqdn, name, regtype, domain) < 0)
2316 { LogMsg("ERROR: handle_resolve_request bad ?%s? ?%s? ?%s?", name, regtype, domain); return(mStatus_BadParamErr); }
2377 // If the user explicitly passed in P2P, we don't restrict the domain in which we resolve.
2402 // Returns 1 on successfully appending a search domain and the caller should reissue the new query
2442 // Not a common case. Perhaps, we should try the next search domain if it exceeds ?
2445 LogMsg("AppendNewSearchDomain: ERROR!! exceeding max domain length for %##s (%s) SearchDomain %##s length %d, Question name length %d", question->qnameOrig->c, DNSTypeName(question->qtype), sd->c, DomainNameLength(question->qnameOrig), DomainNameLength(sd));
2478 mDNSlocal mDNSBool DomainInSearchList(domainname *domain)
2482 if (SameDomainName(&s->domain, domain)) return mDNStrue;
2487 // top-level domain
2542 // domain e.g., mycompany.local, we get "somehost.mycompany.local".
2553 // If the name being queried is exactly the same as the name in the DHCP "domain" option (e.g. the DHCP
2554 // "domain" is my-small-company.local, and the user types "my-small-company.local" into their web browser)
2557 // for names in the "local" domain will be safely answered privately before they hit the root name servers.
2584 // This function tries to append a search domain if valid and possible. If so, returns true.
2593 // If we get e.g., NXDOMAIN and the query is neither suppressed nor exhausted the domain search list and
2611 LogOperation("%3d: RetryQuestionWithSearchDomains(%##s, %s), retrying after appending search domain", req->sd, question->qname.c, DNSTypeName(question->qtype));
2700 // Fall through and get the next search domain. The question is pointing at .local
2701 // and we don't want to try that. Try the next search domain. Don't try with local
2705 // before we pick the next search domain below. RetryQuestionWithSearchDomains assumes that the
2721 // If "local" is the last search domain, we need to stop the question so that we don't send the "local"
2784 // Note: We need to call SendAdditionalQuery every time after appending a search domain as .local could
2785 // be anywhere in the search domain list.
3007 // Don't append search domains for fully qualified domain names including queries
3062 const char *domain, DNSServiceFlags flags, mDNSu32 ifi, DNSServiceErrorType err)
3071 len += strlen(domain) + 1;
3078 put_string(domain, &data);
3091 char domain[MAX_ESCAPED_DOMAIN_NAME];
3113 ConvertDomainNameToCString(&answer->rdata->u.name, domain);
3114 // Note that we do NOT propagate specific interface indexes to the client - for example, a domain we learn from
3117 reply = format_enumeration_reply(request, domain, flags, kDNSServiceInterfaceIndexAny, kDNSServiceErr_NoError);
3120 domain);
3197 domainname domain;
3201 !MakeDomainNameFromDNSNameString(&domain, domainstr))
3204 LogOperation("%3d: DNSServiceSetDefaultDomainForUser(%##s)", request->sd, domain.c);
3585 // with 64kB of rdata. Adding 1009 byte for a maximal domain name, plus a safety margin
3773 case reg_service_request: min_size += sizeof(mDNSu32) + 4 /* name, type, domain, host */ + 4 /* port, textlen */; break;
3777 case browse_request: min_size += sizeof(mDNSu32) + 2 /* type, domain */; break;
3778 case resolve_request: min_size += sizeof(mDNSu32) + 3 /* type, type, domain */; break;
3783 case setdomain_request: min_size += 1 /* domain */; break;
3967 else LogOperation("%3d: Listening for incoming Unix Domain Socket client requests", skt);
4072 // We start a "LocalOnly" query looking for Automatic Browse Domain records.
4073 // When Domain Enumeration in uDNS.c finds an "lb" record from the network, its "FoundDomain" routine
4078 // Add "local" as recommended registration domain ("dns-sd -E"), recommended browsing domain ("dns-sd -F"), and automatic browsing domain
4113 // to give up unnecessary privilege, but we need to be root to remove this Unix Domain Socket.
4459 LogMsgNoIdent("%##s %##s %##s %d %s", a->domain.c, a->keyname.c, a->hostname.c, (a->port.b[0] << 8 | a->port.b[1]), a->AutoTunnel ? a->AutoTunnel : "");
4506 LogMsgNoIdent("%##s %s", s->domain.c, ifname ? ifname : "");