Lines Matching defs:so
201 accept_filt_getopt(struct socket *so, struct sockopt *sopt)
206 KASSERT(solocked(so));
208 if ((so->so_options & SO_ACCEPTCONN) == 0) {
212 if ((so->so_options & SO_ACCEPTFILTER) == 0) {
218 strcpy(afa.af_name, so->so_accf->so_accept_filter->accf_name);
219 if (so->so_accf->so_accept_filter_str != NULL)
220 strcpy(afa.af_arg, so->so_accf->so_accept_filter_str);
230 accept_filt_clear(struct socket *so)
237 KASSERT(solocked(so));
239 if ((so->so_options & SO_ACCEPTCONN) == 0) {
242 if (so->so_accf != NULL) {
244 for (so2 = TAILQ_FIRST(&so->so_q0); so2 != NULL; so2 = next) {
255 af = so->so_accf;
258 (*afp->accf_destroy)(so);
265 so->so_accf = NULL;
268 so->so_options &= ~SO_ACCEPTFILTER;
277 accept_filt_setopt(struct socket *so, const struct sockopt *sopt)
287 solock(so);
288 return accept_filt_clear(so);
297 solock(so);
304 solock(so);
318 * but it is so short, why bother tracking it?
332 solock(so);
333 if ((so->so_options & SO_ACCEPTCONN) == 0 || so->so_accf != NULL) {
340 * socket lock is held over this call, so create methods for filters
345 (*afp->accf_create)(so, afa.af_arg);
352 so->so_accf = newaf;
353 so->so_options |= SO_ACCEPTFILTER;