Lines Matching defs:unit

92 static struct kctl *ctl_find_by_id_unit(u_int32_t id, u_int32_t unit);
94 static struct socket *kcb_find_socket(struct kctl *, u_int32_t unit);
95 static struct ctl_cb *kcb_find(struct kctl *, u_int32_t unit);
329 u_int32_t unit = 1;
332 if (kcb_next->unit > unit) {
336 unit = kcb_next->unit + 1;
337 if (unit == ctl_maxunit)
341 if (unit == ctl_maxunit) {
346 sa.sc_unit = unit;
349 kcb->unit = sa.sc_unit;
375 (*kctl->disconnect)(kctl, kcb->unit, kcb->userdata);
383 kcb->unit = 0;
400 (*kctl->disconnect)(kctl, kcb->unit, kcb->userdata);
409 kcb->unit = 0;
438 sc.sc_unit = kcb->unit;
464 error = (*kctl->send)(kctl, kcb->unit, kcb->userdata, m, flags);
475 ctl_enqueuembuf(void *kctlref, u_int32_t unit, struct mbuf *m, u_int32_t flags)
484 so = kcb_find_socket(kctl, unit);
503 ctl_enqueuedata(void *kctlref, u_int32_t unit, void *data, size_t len, u_int32_t flags)
516 so = kcb_find_socket(kctl, unit);
555 ctl_getenqueuespace(kern_ctl_ref kctlref, u_int32_t unit, size_t *space)
564 so = kcb_find_socket(kctl, unit);
608 error = (*kctl->setopt)(kcb->kctl, kcb->unit, kcb->userdata, sopt->sopt_name,
628 error = (*kctl->getopt)(kcb->kctl, kcb->unit, kcb->userdata, sopt->sopt_name,
729 * CTL_FLAG_REG_ID_UNIT indicates the control ID and unit number are
916 ctl_find_by_id_unit(u_int32_t id, u_int32_t unit)
923 else if (kctl->id == id && kctl->reg_unit == unit)
933 kcb_find(struct kctl *kctl, u_int32_t unit)
938 if (kcb->unit == unit)
945 kcb_find_socket(struct kctl *kctl, u_int32_t unit)
950 struct ctl_cb *kcb = kcb_find(kctl, unit);