• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/xnu-2782.1.97/bsd/netinet/

Lines Matching defs:tfp

103 	struct tclass_for_proc *tfp;
105 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
106 if (tfp->tfp_pid == pid)
109 return (tfp);
118 struct tclass_for_proc *tfp;
120 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
121 if (strncmp(pname, tfp->tfp_pname,
122 sizeof (tfp->tfp_pname)) == 0)
125 return (tfp);
131 struct tclass_for_proc *tfp = NULL;
140 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
141 if ((tfp->tfp_pid == pid) || (tfp->tfp_pid == -1 &&
142 strncmp(pname, tfp->tfp_pname,
143 sizeof (tfp->tfp_pname)) == 0)) {
144 *sotc = tfp->tfp_class;
151 return ((tfp == NULL) ? 0 : 1);
161 struct tclass_for_proc *tfp, *tvar;
165 TAILQ_FOREACH_SAFE(tfp, &tfp_head, tfp_link, tvar) {
168 if (tfp->tfp_pid == -1)
170 if ((p = proc_find(tfp->tfp_pid)) == NULL) {
172 TAILQ_REMOVE(&tfp_head, tfp, tfp_link);
174 _FREE(tfp, M_TEMP);
190 free_tclass_for_proc(struct tclass_for_proc *tfp)
192 if (tfp == NULL)
195 TAILQ_REMOVE(&tfp_head, tfp, tfp_link);
196 _FREE(tfp, M_TEMP);
206 struct tclass_for_proc *tfp, *tvar;
210 TAILQ_FOREACH_SAFE(tfp, &tfp_head, tfp_link, tvar) {
211 free_tclass_for_proc(tfp);
226 struct tclass_for_proc *tfp;
231 tfp = _MALLOC(sizeof (struct tclass_for_proc), M_TEMP, M_NOWAIT|M_ZERO);
232 if (tfp == NULL)
235 tfp->tfp_pid = pid;
241 TAILQ_INSERT_HEAD(&tfp_head, tfp, tfp_link);
243 strlcpy(tfp->tfp_pname, pname, sizeof (tfp->tfp_pname));
244 TAILQ_INSERT_TAIL(&tfp_head, tfp, tfp_link);
249 return (tfp);
262 struct tclass_for_proc *tfp;
273 /* Need a tfp */
276 tfp = find_tfp_by_pid(pid);
277 if (tfp == NULL) {
278 tfp = alloc_tclass_for_proc(pid, NULL);
279 if (tfp == NULL) {
285 tfp->tfp_class = tclass;
289 if (tfp != NULL) {
335 struct tclass_for_proc *tfp;
339 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
340 if (tfp == NULL) {
341 tfp = alloc_tclass_for_proc(-1, so_tcdbg->so_tcdbg_pname);
342 if (tfp == NULL) {
348 tfp->tfp_class = so_tcdbg->so_tcdbg_tclass;
412 struct tclass_for_proc *tfp;
424 /* Need a tfp */
427 tfp = find_tfp_by_pid(pid);
428 if (tfp != NULL) {
429 so_tcdbg->so_tcdbg_tclass = tfp->tfp_class;
444 struct tclass_for_proc *tfp;
449 /* Need a tfp */
452 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
453 if (tfp != NULL) {
454 so_tcdbg->so_tcdbg_tclass = tfp->tfp_class;
467 struct tclass_for_proc *tfp = NULL;
472 tfp = find_tfp_by_pid(pid);
474 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
476 if (tfp != NULL) {
477 free_tclass_for_proc(tfp);
570 struct tclass_for_proc *tfp;
592 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
595 if (tfp->tfp_pid != -1) {
597 ptr->so_tcdbg_pid = tfp->tfp_pid;
602 tfp->tfp_pname,
605 ptr->so_tcdbg_tclass = tfp->tfp_class;