Lines Matching defs:so
69 * Must be passed a malloc'd structure so we don't explode if the kld is
166 do_getopt_accept_filter(struct socket *so, struct sockopt *sopt)
174 SOCK_LOCK(so);
175 if ((so->so_options & SO_ACCEPTCONN) == 0) {
179 if ((so->so_options & SO_ACCEPTFILTER) == 0) {
183 strcpy(afap->af_name, so->so_accf->so_accept_filter->accf_name);
184 if (so->so_accf->so_accept_filter_str != NULL)
185 strcpy(afap->af_arg, so->so_accf->so_accept_filter_str);
187 SOCK_UNLOCK(so);
195 do_setopt_accept_filter(struct socket *so, struct sockopt *sopt)
206 SOCK_LOCK(so);
207 if ((so->so_options & SO_ACCEPTCONN) == 0) {
208 SOCK_UNLOCK(so);
211 if (so->so_accf != NULL) {
212 struct so_accf *af = so->so_accf;
215 af->so_accept_filter->accf_destroy(so);
220 so->so_accf = NULL;
222 so->so_options &= ~SO_ACCEPTFILTER;
223 SOCK_UNLOCK(so);
264 SOCK_LOCK(so);
265 if (((so->so_options & SO_ACCEPTCONN) == 0) ||
266 (so->so_accf != NULL)) {
273 * socket mutex is held over this call, so create methods for filters
278 afp->accf_create(so, afap->af_arg);
285 so->so_accf = newaf;
286 so->so_options |= SO_ACCEPTFILTER;
289 SOCK_UNLOCK(so);