Lines Matching refs:srs
119 ServiceRecordSet srs; // note -- variable-sized object -- must be last field in struct member
633 external_start_advertising_service(&instance->srs.RR_PTR.resrec); in external_start_advertising_helper()
634 external_start_advertising_service(&instance->srs.RR_TXT.resrec); in external_start_advertising_helper()
636 for (e = instance->srs.Extras; e; e = e->next) in external_start_advertising_helper()
655 external_stop_advertising_service(&instance->srs.RR_PTR.resrec); in external_stop_advertising_helper()
656 external_stop_advertising_service(&instance->srs.RR_TXT.resrec); in external_stop_advertising_helper()
658 for (e = instance->srs.Extras; e; e = e->next) in external_stop_advertising_helper()
686 ExtraResourceRecord *e = srv->srs.Extras, *tmp; in unlink_and_free_service_instance()
709 if (srv->srs.RR_TXT.resrec.rdata != &srv->srs.RR_TXT.rdatastorage) in unlink_and_free_service_instance()
710 freeL("TXT RData", srv->srs.RR_TXT.resrec.rdata); in unlink_and_free_service_instance()
719 mDNSexport int CountPeerRegistrations(mDNS *const m, ServiceRecordSet *const srs) in CountPeerRegistrations() argument
722 ResourceRecord *r = &srs->RR_SRV.resrec; in CountPeerRegistrations()
745 mDNSlocal void SendServiceRemovalNotification(ServiceRecordSet *const srs) in SendServiceRemovalNotification() argument
748 service_instance *instance = srs->ServiceContext; in SendServiceRemovalNotification()
749 …if (GenerateNTDResponse(srs->RR_SRV.resrec.name, srs->RR_SRV.resrec.InterfaceID, instance->request… in SendServiceRemovalNotification()
750 …alNotification: %##s is not valid DNS-SD SRV name", instance->request->sd, srs->RR_SRV.resrec.name… in SendServiceRemovalNotification()
756 mDNSlocal void regservice_callback(mDNS *const m, ServiceRecordSet *const srs, mStatus result) in regservice_callback() argument
764 if (!srs) { LogMsg("regservice_callback: srs is NULL %d", result); return; } in regservice_callback()
766 instance = srs->ServiceContext; in regservice_callback()
784 …LogOperation(fmt, prefix, srs->RR_SRV.resrec.name->c, mDNSVal16(srs->RR_SRV.resrec.rdata->u.srv.po… in regservice_callback()
795 srs->RR_ADV.AllowRemoteQuery = mDNStrue; in regservice_callback()
796 srs->RR_PTR.AllowRemoteQuery = mDNStrue; in regservice_callback()
797 srs->RR_SRV.AllowRemoteQuery = mDNStrue; in regservice_callback()
798 srs->RR_TXT.AllowRemoteQuery = mDNStrue; in regservice_callback()
799 for (e = instance->srs.Extras; e; e = e->next) e->r.AllowRemoteQuery = mDNStrue; in regservice_callback()
802 …if (GenerateNTDResponse(srs->RR_SRV.resrec.name, srs->RR_SRV.resrec.InterfaceID, instance->request… in regservice_callback()
803 …LogMsg("%3d: regservice_callback: %##s is not valid DNS-SD SRV name", instance->request->sd, srs->… in regservice_callback()
811 if (instance->request->u.servicereg.autoname && CountPeerRegistrations(m, srs) == 0) in regservice_callback()
820 err = mDNS_RenameAndReregisterService(m, srs, &instance->request->u.servicereg.name); in regservice_callback()
832 if (instance->request->u.servicereg.autoname && CountPeerRegistrations(m, srs) == 0) in regservice_callback()
840 if (instance->clientnotified) SendServiceRemovalNotification(srs); in regservice_callback()
841 mDNS_RenameAndReregisterService(m, srs, mDNSNULL); in regservice_callback()
848 …if (GenerateNTDResponse(srs->RR_SRV.resrec.name, srs->RR_SRV.resrec.InterfaceID, instance->request… in regservice_callback()
849 …rvice_callback: %##s is not valid DNS-SD SRV name", instance->request->sd, srs->RR_SRV.resrec.name… in regservice_callback()
859 …if (GenerateNTDResponse(srs->RR_SRV.resrec.name, srs->RR_SRV.resrec.InterfaceID, instance->request… in regservice_callback()
860 …rvice_callback: %##s is not valid DNS-SD SRV name", instance->request->sd, srs->RR_SRV.resrec.name… in regservice_callback()
1058 request->sd, p->srs.RR_SRV.resrec.name->c, mDNSVal16(p->srs.RR_SRV.resrec.rdata->u.srv.port)); in regservice_termination_callback()
1068 if (mDNS_DeregisterService(&mDNSStorage, &p->srs)) unlink_and_free_service_instance(p); in regservice_termination_callback()
1093 ServiceRecordSet *srs = &instance->srs; in add_record_to_service() local
1105 result = mDNS_AddRecordToService(&mDNSStorage, srs, extra, &extra->r.rdatastorage, ttl, in add_record_to_service()
1144 …(request->u.servicereg.instances) ? request->u.servicereg.instances->srs.RR_SRV.resrec.name->c : N… in handle_add_request()
1265 if (hdr->reg_index == TXT_RECORD_INDEX) rr = &i->srs.RR_TXT; in handle_update_request()
1269 for (e = i->srs.Extras; e; e = e->next) in handle_update_request()
1282 …(request->u.servicereg.instances) ? request->u.servicereg.instances->srs.RR_SRV.resrec.name->c : N… in handle_update_request()
1322 for (ptr = serv->srs.Extras; ptr; ptr = ptr->next) in remove_extra()
1328 err = mDNS_RemoveRecordFromService(&mDNSStorage, &serv->srs, ptr, FreeExtraRR, ptr); in remove_extra()
1354 …(request->u.servicereg.instances) ? request->u.servicereg.instances->srs.RR_SRV.resrec.name->c : N… in handle_removerecord_request()
1503 result = mDNS_RegisterService(&mDNSStorage, &instance->srs, in register_service_instance()
1515 …instance->request->sd, instance->srs.RR_SRV.resrec.name->c, mDNSVal16(request->u.servicereg.port)); in register_service_instance()
1570 …if (si->clientnotified) SendServiceRemovalNotification(&si->srs); // Do this *before* clearing si-… in udsserver_default_reg_domain_changed()
1581 err = mDNS_DeregisterService(&mDNSStorage, &si->srs); in udsserver_default_reg_domain_changed()
2048 if (ptr->clientnotified) SendServiceRemovalNotification(&ptr->srs); in udsserver_handle_configchange()
2049 …LogInfo("udsserver_handle_configchange: Calling deregister for Service %##s", ptr->srs.RR_PTR.resr… in udsserver_handle_configchange()
2050 if (mDNS_DeregisterService_drt(m, &ptr->srs, mDNS_Dereg_rapid)) in udsserver_handle_configchange()
2051 …regservice_callback(m, &ptr->srs, mStatus_MemFree); // If service deregistered already, we can re-… in udsserver_handle_configchange()
4157 ptr->srs.RR_SRV.resrec.name->c, mDNSVal16(req->u.servicereg.port), SRS_PORT(&ptr->srs)); in LogClientInfo()