Lines Matching defs:cpr
2278 struct prison *pr, *cpr, *lpr, *tpr;
2297 FOREACH_PRISON_DESCENDANT(pr, cpr, descend) {
2298 mtx_lock(&cpr->pr_mtx);
2299 if (cpr->pr_ref > 0) {
2300 tpr = cpr;
2301 cpr->pr_ref++;
2306 mtx_unlock(&cpr->pr_mtx);
4144 struct prison *pr, *cpr;
4159 FOREACH_PRISON_DESCENDANT(pr, cpr, descend) {
4163 mtx_lock(&cpr->pr_mtx);
4165 if (cpr->pr_ip4s > 0) {
4166 if (ip4s < cpr->pr_ip4s) {
4167 ip4s = cpr->pr_ip4s;
4168 mtx_unlock(&cpr->pr_mtx);
4173 bcopy(cpr->pr_ip4, ip4,
4174 cpr->pr_ip4s * sizeof(struct in_addr));
4178 if (cpr->pr_ip6s > 0) {
4179 if (ip6s < cpr->pr_ip6s) {
4180 ip6s = cpr->pr_ip6s;
4181 mtx_unlock(&cpr->pr_mtx);
4186 bcopy(cpr->pr_ip6, ip6,
4187 cpr->pr_ip6s * sizeof(struct in6_addr));
4190 if (cpr->pr_ref == 0) {
4191 mtx_unlock(&cpr->pr_mtx);
4196 xp->pr_id = cpr->pr_id;
4197 xp->pr_state = cpr->pr_uref > 0
4199 strlcpy(xp->pr_path, prison_path(pr, cpr), sizeof(xp->pr_path));
4200 strlcpy(xp->pr_host, cpr->pr_hostname, sizeof(xp->pr_host));
4201 strlcpy(xp->pr_name, prison_name(pr, cpr), sizeof(xp->pr_name));
4203 xp->pr_ip4s = cpr->pr_ip4s;
4206 xp->pr_ip6s = cpr->pr_ip6s;
4208 mtx_unlock(&cpr->pr_mtx);