Lines Matching refs:sol
1856 struct nstat_sock_locus *sol; in nstat_sock_locus_alloc_internal() local
1873 sol = &esol->nesl_sock_locus; in nstat_sock_locus_alloc_internal()
1875 sol = kalloc_type(struct nstat_sock_locus, Z_WAITOK | Z_ZERO); in nstat_sock_locus_alloc_internal()
1876 if (!sol) { in nstat_sock_locus_alloc_internal()
1886 kfree_type(struct nstat_sock_locus, sol); in nstat_sock_locus_alloc_internal()
1891 sol->nsl_inp = inp; in nstat_sock_locus_alloc_internal()
1892 sol->nsl_magic = NSTAT_SOCK_LOCUS_MAGIC; in nstat_sock_locus_alloc_internal()
1893 bzero(sol->nsl_pname, sizeof(sol->nsl_pname)); in nstat_sock_locus_alloc_internal()
1896 proc_best_name_for_pid(initial_pid, sol->nsl_pname, sizeof(sol->nsl_pname)); in nstat_sock_locus_alloc_internal()
1897 if (sol->nsl_pname[0] != '\0') { in nstat_sock_locus_alloc_internal()
1898 sol->nsl_pid = initial_pid; in nstat_sock_locus_alloc_internal()
1902 inp->inp_nstat_locus = sol; in nstat_sock_locus_alloc_internal()
1903 return sol; in nstat_sock_locus_alloc_internal()
1915 struct nstat_sock_locus *sol, in nstat_sock_locus_release() argument
1921 struct inpcb *inp = sol->nsl_inp; in nstat_sock_locus_release()
1924 esol = (struct nstat_extended_sock_locus *)sol; in nstat_sock_locus_release()
1926 sol->nsl_magic = NSTAT_SOCK_LOCUS_UNMAGIC; in nstat_sock_locus_release()
1932 kfree_type(struct nstat_sock_locus, sol); in nstat_sock_locus_release()
2028 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcp_gone() local
2032 return (!(inp = sol->nsl_inp) || in nstat_tcp_gone()
2043 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcp_counts() local
2057 if (!(inp = sol->nsl_inp) || !intotcpcb(inp)) { in nstat_tcp_counts()
2061 inp = sol->nsl_inp; in nstat_tcp_counts()
2097 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcp_details() local
2111 if (!(inp = sol->nsl_inp) || !intotcpcb(inp)) { in nstat_tcp_details()
2115 inp = sol->nsl_inp; in nstat_tcp_details()
2156 struct nstat_sock_locus *sol; in nstat_tcp_add_watcher() local
2158 TAILQ_FOREACH(sol, &nstat_tcp_sock_locus_head, nsl_link) { in nstat_tcp_add_watcher()
2159 assert(sol->nsl_magic == NSTAT_SOCK_LOCUS_MAGIC); in nstat_tcp_add_watcher()
2160 assert(sol->nsl_inp != NULL); in nstat_tcp_add_watcher()
2161 assert(sol->nsl_is_tcp != 0); in nstat_tcp_add_watcher()
2162 struct inpcb *inp = sol->nsl_inp; in nstat_tcp_add_watcher()
2172 nstat_client_source_add(0, client, &nstat_tcp_provider, sol, &sol->nsl_locus); in nstat_tcp_add_watcher()
2190 struct nstat_sock_locus *sol = NULL; in nstat_tcp_new_pcb() local
2194 sol = nstat_sock_locus_alloc_locked(inp); in nstat_tcp_new_pcb()
2195 if (sol == NULL) { in nstat_tcp_new_pcb()
2198 sol->nsl_is_tcp = 1; in nstat_tcp_new_pcb()
2200 TAILQ_INSERT_HEAD(&nstat_tcp_sock_locus_head, sol, nsl_link); in nstat_tcp_new_pcb()
2208 nstat_client_source_add(0, client, &nstat_tcp_provider, sol, &sol->nsl_locus); in nstat_tcp_new_pcb()
2221 struct nstat_sock_locus *sol = NULL; in nstat_pcb_detach() local
2229 sol = inp->inp_nstat_locus; in nstat_pcb_detach()
2230 if (sol) { in nstat_pcb_detach()
2233 assert(sol == (struct nstat_sock_locus *)src->nts_cookie); in nstat_pcb_detach()
2240 if (sol->nsl_is_tcp) { in nstat_pcb_detach()
2242 TAILQ_REMOVE(&nstat_tcp_sock_locus_head, sol, nsl_link); in nstat_pcb_detach()
2245 TAILQ_REMOVE(&nstat_udp_sock_locus_head, sol, nsl_link); in nstat_pcb_detach()
2257 if (sol != NULL) { in nstat_pcb_detach()
2258 nstat_sock_locus_release(sol, TRUE); in nstat_pcb_detach()
2267 struct nstat_sock_locus *sol; in nstat_pcb_event() local
2280 sol = inp->inp_nstat_locus; in nstat_pcb_event()
2284 TAILQ_FOREACH(src, &sol->nsl_locus.ntl_src_queue, nts_locus_link) { in nstat_pcb_event()
2285 assert(sol == (struct nstat_sock_locus *)src->nts_cookie); in nstat_pcb_event()
2373 struct nstat_sock_locus *sol = inp->inp_nstat_locus; in nstat_pcb_update_last_owner() local
2374 if (sol != NULL) { in nstat_pcb_update_last_owner()
2376 if (sol->nsl_pid != current_pid) { in nstat_pcb_update_last_owner()
2377 proc_best_name_for_pid(current_pid, sol->nsl_pname, sizeof(sol->nsl_pname)); in nstat_pcb_update_last_owner()
2378 if (sol->nsl_pname[0] != '\0') { in nstat_pcb_update_last_owner()
2379 sol->nsl_pid = current_pid; in nstat_pcb_update_last_owner()
2409 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcp_copy_descriptor() local
2410 struct inpcb *inp = sol->nsl_inp; in nstat_tcp_copy_descriptor()
2457 sol->nsl_ifnet_properties = NSTAT_SOURCE_IS_LISTENER; in nstat_tcp_copy_descriptor()
2460 sol->nsl_ifnet_properties = NSTAT_SOURCE_IS_OUTBOUND; in nstat_tcp_copy_descriptor()
2462 desc->ifnet_properties |= sol->nsl_ifnet_properties; in nstat_tcp_copy_descriptor()
2464 if ((desc->pid == sol->nsl_pid) && (sol->nsl_pname[0] != '\0')) { in nstat_tcp_copy_descriptor()
2466 strbufcpy(desc->pname, sol->nsl_pname); in nstat_tcp_copy_descriptor()
2472 strbufcpy(sol->nsl_pname, desc->pname); in nstat_tcp_copy_descriptor()
2473 sol->nsl_pid = desc->pid; in nstat_tcp_copy_descriptor()
2521 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcpudp_reporting_allowed() local
2522 struct inpcb *inp = sol->nsl_inp; in nstat_tcpudp_reporting_allowed()
2605 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_tcp_extensions() local
2606 struct inpcb *inp = sol->nsl_inp; in nstat_tcp_extensions()
2664 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_udp_gone() local
2667 return (!(inp = sol->nsl_inp) || in nstat_udp_gone()
2677 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_udp_counts() local
2688 if (!sol->nsl_inp) { in nstat_udp_counts()
2692 struct inpcb *inp = sol->nsl_inp; in nstat_udp_counts()
2716 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_udp_details() local
2728 struct inpcb *inp = sol->nsl_inp; in nstat_udp_details()
2757 struct nstat_sock_locus *sol; in nstat_udp_add_watcher() local
2759 TAILQ_FOREACH(sol, &nstat_udp_sock_locus_head, nsl_link) { in nstat_udp_add_watcher()
2760 assert(sol->nsl_magic == NSTAT_SOCK_LOCUS_MAGIC); in nstat_udp_add_watcher()
2761 assert(sol->nsl_inp != NULL); in nstat_udp_add_watcher()
2762 struct inpcb *inp = sol->nsl_inp; in nstat_udp_add_watcher()
2772 nstat_client_source_add(0, client, &nstat_udp_provider, sol, &sol->nsl_locus); in nstat_udp_add_watcher()
2790 struct nstat_sock_locus *sol = NULL; in nstat_udp_new_pcb() local
2794 sol = nstat_sock_locus_alloc_locked(inp); in nstat_udp_new_pcb()
2795 if (sol == NULL) { in nstat_udp_new_pcb()
2798 sol->nsl_is_tcp = 0; in nstat_udp_new_pcb()
2800 TAILQ_INSERT_HEAD(&nstat_udp_sock_locus_head, sol, nsl_link); in nstat_udp_new_pcb()
2808 nstat_client_source_add(0, client, &nstat_udp_provider, sol, &sol->nsl_locus); in nstat_udp_new_pcb()
2941 struct nstat_sock_locus *sol = (struct nstat_sock_locus *)cookie; in nstat_udp_extensions() local
2942 struct inpcb *inp = sol->nsl_inp; in nstat_udp_extensions()
5770 struct nstat_sock_locus *sol, *tmpsol; in nstat_idle_check() local
5778 TAILQ_FOREACH_SAFE(sol, &nstat_tcp_sock_locus_head, nsl_link, tmpsol) { in nstat_idle_check()
5779 assert(sol->nsl_magic == NSTAT_SOCK_LOCUS_MAGIC); in nstat_idle_check()
5780 assert(sol->nsl_inp != NULL); in nstat_idle_check()
5781 assert(sol->nsl_is_tcp != 0); in nstat_idle_check()
5782 struct inpcb *inp = sol->nsl_inp; in nstat_idle_check()
5783 assert(inp->inp_nstat_locus == sol); in nstat_idle_check()
5789 assert(sol == (struct nstat_sock_locus *)src->nts_cookie); in nstat_idle_check()
5796 TAILQ_REMOVE(&nstat_tcp_sock_locus_head, sol, nsl_link); in nstat_idle_check()
5798 nstat_sock_locus_release(sol, FALSE); in nstat_idle_check()
5804 TAILQ_FOREACH_SAFE(sol, &nstat_udp_sock_locus_head, nsl_link, tmpsol) { in nstat_idle_check()
5805 assert(sol->nsl_magic == NSTAT_SOCK_LOCUS_MAGIC); in nstat_idle_check()
5806 assert(sol->nsl_inp != NULL); in nstat_idle_check()
5807 assert(sol->nsl_is_tcp == 0); in nstat_idle_check()
5808 struct inpcb *inp = sol->nsl_inp; in nstat_idle_check()
5814 assert(sol == (struct nstat_sock_locus *)src->nts_cookie); in nstat_idle_check()
5821 TAILQ_REMOVE(&nstat_tcp_sock_locus_head, sol, nsl_link); in nstat_idle_check()
5823 nstat_sock_locus_release(sol, FALSE); in nstat_idle_check()