Lines Matching defs:sps

3091 mDNSlocal void ReorderSPSByFeature(const CacheRecord *sps[3])
3093 CheckAndSwapSPS(sps[0], sps[1]);
3094 CheckAndSwapSPS(sps[0], sps[2]);
3095 CheckAndSwapSPS(sps[1], sps[2]);
3100 mDNSexport void FindSPSInCache(mDNS *const m, const DNSQuestion *const q, const CacheRecord *sps[3])
3102 sps[0] = FindSPSInCache1(m, q, mDNSNULL, mDNSNULL);
3103 sps[1] = !sps[0] ? mDNSNULL : FindSPSInCache1(m, q, sps[0], mDNSNULL);
3104 sps[2] = !sps[1] ? mDNSNULL : FindSPSInCache1(m, q, sps[0], sps[1]);
3108 ReorderSPSByFeature(sps);
5760 const int sps = intf->NextSPSAttempt / 3;
5766 if (!intf->SPSAddr[sps].type)
5771 LogSPS("SendSPSRegistration: %s SPS %d (%d) %##s not yet resolved", intf->ifname, intf->NextSPSAttempt, sps, intf->NetWakeResolve[sps].qname.c);
5887 LogSPS("SendSPSRegistration: Sending Update %s %d (%d) id %5d with %d records %d bytes to %#a:%d", intf->ifname, intf->NextSPSAttempt, sps,
5888 mDNSVal16(m->omsg.h.id), m->omsg.h.mDNS_numUpdates, p - m->omsg.data, &intf->SPSAddr[sps], mDNSVal16(intf->SPSPort[sps]));
5890 err = mDNSSendDNSMessage(m, &m->omsg, p, intf->InterfaceID, mDNSNULL, &intf->SPSAddr[sps], intf->SPSPort[sps], mDNSNULL, mDNSNULL, mDNSfalse);
5892 if (err && intf->SPSAddr[sps].type == mDNSAddrType_IPv4 && intf->NetWakeResolve[sps].ThisQInterval == -1)
5894 LogSPS("SendSPSRegistration %d %##s failed to send to IPv4 address; will try IPv6 instead", sps, intf->NetWakeResolve[sps].qname.c);
5895 intf->NetWakeResolve[sps].qtype = kDNSType_AAAA;
5896 mDNS_StartQuery_internal(m, &intf->NetWakeResolve[sps]);
6072 int sps = (int)(question - intf->NetWakeResolve);
6074 LogSPS("NetWakeResolve: SPS: %d Add: %d %s", sps, AddRecord, RRDisplayString(m, answer));
6079 // if (answer->rrtype == kDNSType_AAAA && sps == 0) return; // To test failing to resolve sleep proxy's address
6085 intf->SPSPort[sps] = answer->rdata->u.srv.port;
6095 intf->SPSAddr[sps].type = mDNSAddrType_IPv4;
6096 intf->SPSAddr[sps].ip.v4 = answer->rdata->u.ipv4;
6098 if (sps == intf->NextSPSAttempt/3) SendSPSRegistration(m, intf, zeroID); // If we're ready for this result, use it now
6105 LogSPS("NetWakeResolve: SPS %d %##s has no IPv4 address, will try IPv6 instead", sps, question->qname.c);
6114 intf->SPSAddr[sps].type = mDNSAddrType_IPv6;
6115 intf->SPSAddr[sps].ip.v6 = answer->rdata->u.ipv6;
6117 if (sps == intf->NextSPSAttempt/3) SendSPSRegistration(m, intf, zeroID); // If we're ready for this result, use it now
6250 const CacheRecord *sps[3] = { mDNSNULL };
6330 FindSPSInCache(m, &intf->NetWakeBrowse, sps);
6331 if (!sps[0]) LogSPS("BeginSleepProcessing: %-6s %#a No Sleep Proxy Server found (Next Browse Q in %d, interval %d)",
6358 if (sps[i])
6360 LogSPS("BeginSleepProcessing: %-6s Found Sleep Proxy Server %d TTL %d %s", intf->ifname, i, sps[i]->resrec.rroriginalttl, CRDisplayString(m, sps[i]));
6361 mDNS_SetupQuestion(&intf->NetWakeResolve[i], intf->InterfaceID, &sps[i]->resrec.rdata->u.name, kDNSType_SRV, NetWakeResolve, intf);
6638 int sps = (intf->NextSPSAttempt == 0) ? 0 : (intf->NextSPSAttempt-1)/3;
6639 if (intf->NetWakeResolve[sps].ThisQInterval >= 0)
6642 intf->ifname, intf->NetWakeResolve[sps].qname.c, DNSTypeName(intf->NetWakeResolve[sps].qtype));
14104 mDNSexport void mDNSCoreBeSleepProxyServer_internal(mDNS *const m, mDNSu8 sps, mDNSu8 port, mDNSu8 marginalpower, mDNSu8 totpower, mDNSu8 features)
14111 if (!sps && m->SPSSocket) { mDNSPlatformUDPClose(m->SPSSocket); m->SPSSocket = mDNSNULL; }
14115 if (m->SPSState == 1 && sps != m->SPSType)
14116 { m->SPSState = 2; mDNS_DeregisterService_drt(m, &m->SPSRecords, sps ? mDNS_Dereg_rapid : mDNS_Dereg_normal); }
14120 m->SPSType = sps;
14126 if (sps)