Lines Matching refs:shad

3052 	struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie;  in nstat_userland_tu_counts()  local
3053 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_tu_counts()
3054 assert(shad->shad_live); in nstat_userland_tu_counts()
3056 …bool result = (*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, out_counts, NULL, … in nstat_userland_tu_counts()
3071 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_tu_details() local
3072 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_tu_details()
3073 assert(shad->shad_live); in nstat_userland_tu_details()
3075 …bool result = (*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, NULL, out_details,… in nstat_userland_tu_details()
3091 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_tu_copy_descriptor() local
3092 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_tu_copy_descriptor()
3093 assert(shad->shad_live); in nstat_userland_tu_copy_descriptor()
3094 struct nstat_procdetails *procdetails = shad->shad_procdetails; in nstat_userland_tu_copy_descriptor()
3097 bool result = (*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, NULL, NULL, data); in nstat_userland_tu_copy_descriptor()
3099 switch (shad->shad_provider) { in nstat_userland_tu_copy_descriptor()
3107 if (shad->shad_rnf_override == nstat_rnf_override_enabled) { in nstat_userland_tu_copy_descriptor()
3110 } else if (shad->shad_rnf_override == nstat_rnf_override_disabled) { in nstat_userland_tu_copy_descriptor()
3114 desc->ifnet_properties |= (uint32_t)shad->shad_properties; in nstat_userland_tu_copy_descriptor()
3115 desc->start_timestamp = shad->shad_start_timestamp; in nstat_userland_tu_copy_descriptor()
3126 if (shad->shad_rnf_override == nstat_rnf_override_enabled) { in nstat_userland_tu_copy_descriptor()
3129 } else if (shad->shad_rnf_override == nstat_rnf_override_disabled) { in nstat_userland_tu_copy_descriptor()
3133 desc->ifnet_properties |= (uint32_t)shad->shad_properties; in nstat_userland_tu_copy_descriptor()
3134 desc->start_timestamp = shad->shad_start_timestamp; in nstat_userland_tu_copy_descriptor()
3145 if (shad->shad_rnf_override == nstat_rnf_override_enabled) { in nstat_userland_tu_copy_descriptor()
3148 } else if (shad->shad_rnf_override == nstat_rnf_override_disabled) { in nstat_userland_tu_copy_descriptor()
3152 desc->ifnet_properties |= (uint32_t)shad->shad_properties; in nstat_userland_tu_copy_descriptor()
3153 desc->start_timestamp = shad->shad_start_timestamp; in nstat_userland_tu_copy_descriptor()
3204 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_tcp_reporting_allowed() local
3206 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_tcp_reporting_allowed()
3211 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, &ifflags, NULL, NULL, NULL, NULL)) { in nstat_userland_tcp_reporting_allowed()
3220 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, NULL, NULL, &tcp_desc)) { in nstat_userland_tcp_reporting_allowed()
3234 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_extensions() local
3235 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_extensions()
3236 assert(shad->shad_live); in nstat_userland_extensions()
3237 assert(shad->shad_procdetails->pdet_magic == NSTAT_PROCDETAILS_MAGIC); in nstat_userland_extensions()
3239 return shad->shad_get_extension_fn(shad->shad_provider_context, extension_id, buf, len); in nstat_userland_extensions()
3250 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_udp_reporting_allowed() local
3252 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_udp_reporting_allowed()
3257 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, &ifflags, NULL, NULL, NULL, NULL)) { in nstat_userland_udp_reporting_allowed()
3265 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, NULL, NULL, &udp_desc)) { in nstat_userland_udp_reporting_allowed()
3282 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)cookie; in nstat_userland_quic_reporting_allowed() local
3284 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_quic_reporting_allowed()
3289 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, &ifflags, NULL, NULL, NULL, NULL)) { in nstat_userland_quic_reporting_allowed()
3297 if ((*shad->shad_getvals_fn)(shad->shad_provider_context, NULL, NULL, NULL, NULL, &quic_desc)) { in nstat_userland_quic_reporting_allowed()
3321 struct nstat_tu_shadow *shad; in nstat_userland_protocol_add_watcher() local
3325 TAILQ_FOREACH(shad, &nstat_userprot_shad_head, shad_link) { in nstat_userland_protocol_add_watcher()
3326 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_protocol_add_watcher()
3328 if (shad->shad_provider == nstat_provider_type) { in nstat_userland_protocol_add_watcher()
3329 result = nstat_client_source_add(0, client, nstat_provider, shad, &shad->shad_locus); in nstat_userland_protocol_add_watcher()
3462 struct nstat_tu_shadow *shad; in ntstat_userland_stats_open() local
3473 shad = kalloc_type(struct nstat_tu_shadow, Z_WAITOK | Z_NOFAIL); in ntstat_userland_stats_open()
3478 kfree_type(struct nstat_tu_shadow, shad); in ntstat_userland_stats_open()
3481 TAILQ_INIT(&shad->shad_locus.ntl_src_queue); in ntstat_userland_stats_open()
3482 shad->shad_getvals_fn = req_fn; in ntstat_userland_stats_open()
3483 shad->shad_get_extension_fn = req_extension_fn; in ntstat_userland_stats_open()
3484 shad->shad_provider_context = ctx; in ntstat_userland_stats_open()
3485 shad->shad_provider = provider_id; in ntstat_userland_stats_open()
3486 shad->shad_properties = properties; in ntstat_userland_stats_open()
3487 shad->shad_procdetails = procdetails; in ntstat_userland_stats_open()
3488 shad->shad_rnf_override = nstat_rnf_override_not_set; in ntstat_userland_stats_open()
3489 shad->shad_start_timestamp = mach_continuous_time(); in ntstat_userland_stats_open()
3490 shad->shad_live = true; in ntstat_userland_stats_open()
3491 shad->shad_magic = TU_SHADOW_MAGIC; in ntstat_userland_stats_open()
3500 TAILQ_INSERT_HEAD(&nstat_userprot_shad_head, shad, shad_link); in ntstat_userland_stats_open()
3517 int result = nstat_client_source_add(0, client, provider, shad, &shad->shad_locus); in ntstat_userland_stats_open()
3527 return (nstat_userland_context)shad; in ntstat_userland_stats_open()
3534 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)nstat_ctx; in ntstat_userland_stats_close() local
3541 if (shad == NULL) { in ntstat_userland_stats_close()
3545 assert(shad->shad_magic == TU_SHADOW_MAGIC); in ntstat_userland_stats_close()
3550 TAILQ_FOREACH_SAFE(src, &shad->shad_locus.ntl_src_queue, nts_locus_link, tmpsrc) { in ntstat_userland_stats_close()
3551 assert(shad == (struct nstat_tu_shadow *)src->nts_cookie); in ntstat_userland_stats_close()
3558 if (shad->shad_live) { in ntstat_userland_stats_close()
3559 TAILQ_REMOVE(&nstat_userprot_shad_head, shad, shad_link); in ntstat_userland_stats_close()
3560 if (shad->shad_provider == NSTAT_PROVIDER_TCP_USERLAND) { in ntstat_userland_stats_close()
3562 } else if (shad->shad_provider == NSTAT_PROVIDER_UDP_USERLAND) { in ntstat_userland_stats_close()
3568 TAILQ_REMOVE(&nstat_defunct_userprot_shad_head, shad, shad_link); in ntstat_userland_stats_close()
3577 nstat_release_procdetails(shad->shad_procdetails); in ntstat_userland_stats_close()
3578 shad->shad_magic = TU_SHADOW_UNMAGIC; in ntstat_userland_stats_close()
3580 kfree_type(struct nstat_tu_shadow, shad); in ntstat_userland_stats_close()
3585 struct nstat_tu_shadow *shad, in ntstat_userland_stats_event_locked() argument
3594 assert(shad->shad_magic == TU_SHADOW_MAGIC); in ntstat_userland_stats_event_locked()
3595 provider_id = shad->shad_provider; in ntstat_userland_stats_event_locked()
3597 TAILQ_FOREACH(src, &shad->shad_locus.ntl_src_queue, nts_locus_link) { in ntstat_userland_stats_event_locked()
3598 assert(shad == (struct nstat_tu_shadow *)src->nts_cookie); in ntstat_userland_stats_event_locked()
3615 struct nstat_tu_shadow *shad = (struct nstat_tu_shadow *)nstat_ctx; in ntstat_userland_stats_event() local
3622 if (shad == NULL) { in ntstat_userland_stats_event()
3626 assert(shad->shad_magic == TU_SHADOW_MAGIC); in ntstat_userland_stats_event()
3633 TAILQ_FOREACH_SAFE(src, &shad->shad_locus.ntl_src_queue, nts_locus_link, tmpsrc) { in ntstat_userland_stats_event()
3634 assert(shad == (struct nstat_tu_shadow *)src->nts_cookie); in ntstat_userland_stats_event()
3658 struct nstat_tu_shadow *shad, *tmpshad; in nstats_userland_stats_defunct_for_process() local
3664 TAILQ_FOREACH_SAFE(shad, &nstat_userprot_shad_head, shad_link, tmpshad) { in nstats_userland_stats_defunct_for_process()
3665 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstats_userland_stats_defunct_for_process()
3668 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstats_userland_stats_defunct_for_process()
3669 assert(shad->shad_live); in nstats_userland_stats_defunct_for_process()
3671 if (shad->shad_procdetails->pdet_pid == pid) { in nstats_userland_stats_defunct_for_process()
3672 TAILQ_FOREACH_SAFE(src, &shad->shad_locus.ntl_src_queue, nts_locus_link, tmpsrc) { in nstats_userland_stats_defunct_for_process()
3673 assert(shad == (struct nstat_tu_shadow *)src->nts_cookie); in nstats_userland_stats_defunct_for_process()
3679 shad->shad_live = false; in nstats_userland_stats_defunct_for_process()
3680 if (shad->shad_provider == NSTAT_PROVIDER_TCP_USERLAND) { in nstats_userland_stats_defunct_for_process()
3682 } else if (shad->shad_provider == NSTAT_PROVIDER_UDP_USERLAND) { in nstats_userland_stats_defunct_for_process()
3687 TAILQ_REMOVE(&nstat_userprot_shad_head, shad, shad_link); in nstats_userland_stats_defunct_for_process()
3688 TAILQ_INSERT_TAIL(&nstat_defunct_userprot_shad_head, shad, shad_link); in nstats_userland_stats_defunct_for_process()
3704 struct nstat_tu_shadow *shad; in nstat_userland_mark_rnf_override() local
3710 TAILQ_FOREACH(shad, &nstat_userprot_shad_head, shad_link) { in nstat_userland_mark_rnf_override()
3711 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_userland_mark_rnf_override()
3712 assert(shad->shad_procdetails->pdet_magic == NSTAT_PROCDETAILS_MAGIC); in nstat_userland_mark_rnf_override()
3713 …if (shad->shad_get_extension_fn(shad->shad_provider_context, NSTAT_EXTENDED_UPDATE_TYPE_FUUID, fuu… in nstat_userland_mark_rnf_override()
3719 if (shad) { in nstat_userland_mark_rnf_override()
3720 if (shad->shad_procdetails->pdet_pid != proc_selfpid()) { in nstat_userland_mark_rnf_override()
3728 shad->shad_rnf_override = rnf_override ? nstat_rnf_override_enabled in nstat_userland_mark_rnf_override()
3730 ntstat_userland_stats_event_locked(shad, in nstat_userland_mark_rnf_override()
7826 struct nstat_tu_shadow *shad; in progress_indicators_for_interface() local
7906 TAILQ_FOREACH(shad, &nstat_userprot_shad_head, shad_link) { in progress_indicators_for_interface()
7907 assert(shad->shad_magic == TU_SHADOW_MAGIC); in progress_indicators_for_interface()
7910 if (shad->shad_provider == NSTAT_PROVIDER_QUIC_USERLAND) { in progress_indicators_for_interface()
7912 } else if (shad->shad_provider == NSTAT_PROVIDER_TCP_USERLAND) { in progress_indicators_for_interface()
7922 …bool result = (*shad->shad_getvals_fn)(shad->shad_provider_context, &ifflags, &digest, NULL, NULL,… in progress_indicators_for_interface()
7954 if (shad->shad_start_timestamp > min_recent_start_time) { in progress_indicators_for_interface()
8068 struct nstat_tu_shadow *shad; in nstat_gather_flow_data() local
8074 TAILQ_FOREACH(shad, &nstat_userprot_shad_head, shad_link) { in nstat_gather_flow_data()
8075 assert(shad->shad_magic == TU_SHADOW_MAGIC); in nstat_gather_flow_data()
8077 if (shad->shad_provider == provider) { in nstat_gather_flow_data()
8081 err = nstat_userland_tu_copy_descriptor((nstat_provider_cookie_t) shad, in nstat_gather_flow_data()
8087 err = nstat_userland_tu_counts((nstat_provider_cookie_t) shad, in nstat_gather_flow_data()