- struct ctl_cb *kcb = (struct ctl_cb *)so->so_pcb;
- struct kern_ctl_info *kcsi =
- &si->soi_proto.pri_kern_ctl;
- struct kctl *kctl = kcb->kctl;
-
- si->soi_kind = SOCKINFO_KERN_CTL;
-
- if (kctl == 0)
- break;
- kcsi->kcsi_id = kctl->id;
- kcsi->kcsi_reg_unit = kctl->id;
- kcsi->kcsi_flags = kctl->flags;
- kcsi->kcsi_recvbufsize = kctl->recvbufsize;
- kcsi->kcsi_sendbufsize = kctl->sendbufsize;
- kcsi->kcsi_unit = kcb->unit;
- strlcpy(kcsi->kcsi_name, kctl->name, MAX_KCTL_NAME);