Lines Matching defs:so
204 accept_filt_getopt(struct socket *so, struct sockopt *sopt)
209 KASSERT(solocked(so));
211 if ((so->so_options & SO_ACCEPTCONN) == 0) {
215 if ((so->so_options & SO_ACCEPTFILTER) == 0) {
221 strcpy(afa.af_name, so->so_accf->so_accept_filter->accf_name);
222 if (so->so_accf->so_accept_filter_str != NULL)
223 strcpy(afa.af_arg, so->so_accf->so_accept_filter_str);
233 accept_filt_clear(struct socket *so)
240 KASSERT(solocked(so));
242 if ((so->so_options & SO_ACCEPTCONN) == 0) {
245 if (so->so_accf != NULL) {
247 for (so2 = TAILQ_FIRST(&so->so_q0); so2 != NULL; so2 = next) {
258 af = so->so_accf;
261 (*afp->accf_destroy)(so);
268 so->so_accf = NULL;
271 so->so_options &= ~SO_ACCEPTFILTER;
280 accept_filt_setopt(struct socket *so, const struct sockopt *sopt)
290 solock(so);
291 return accept_filt_clear(so);
300 solock(so);
307 solock(so);
321 * but it is so short, why bother tracking it?
335 solock(so);
336 if ((so->so_options & SO_ACCEPTCONN) == 0 || so->so_accf != NULL) {
343 * socket lock is held over this call, so create methods for filters
348 (*afp->accf_create)(so, afa.af_arg);
355 so->so_accf = newaf;
356 so->so_options |= SO_ACCEPTFILTER;