Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Problems using accf_data and accf_http

I'm having problems using the dataready filter, and the httpready
filter, in a small sample bit of code.

Here's the snippit that sets the filter:

setup_filter(int sock)
    struct accept_filter_arg afa;
    bzero(&afa, sizeof(afa));
    strncpy(afa.af_name, "httpready", sizeof(afa.af_name));
    if (setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa,
                   sizeof(afa)) == -1) {

When I run my test code:

SO_ACCEPTFILTER: No such file or directory

I have tried "dataready" as well.

sysctl net.inet.accf shows:

        net.inet.accf.http.parsehttpversion = 1

I expected to see a net.inet.accf.filters or something from reading the

The filters are included in my kernel config:

  pseudo-device   accf_data       # "dataready" accept filter
  pseudo-device   accf_http       # "httpready" accept filter

And they are compiled in the build directory:

  netbsd-amd64-5# ls -l accf*
  -rw-r--r--  1 root  wheel   7033 Nov 30 18:44 accf_data.d
  -rw-r--r--  1 root  wheel  76208 Nov 30 18:46 accf_data.o
  -rw-r--r--  1 root  wheel   7062 Nov 30 18:44 accf_http.d
  -rw-r--r--  1 root  wheel  87280 Nov 30 18:46 accf_http.o
  netbsd-amd64-5# ls -l uipc_accf.*
  -rw-r--r--  1 root  wheel   7094 Nov 30 18:45 uipc_accf.d
  -rw-r--r--  1 root  wheel  94096 Nov 30 18:50 uipc_accf.o

Home | Main Index | Thread Index | Old Index