apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/network_io/unix sockopt.c
Date Tue, 03 Apr 2001 00:43:13 GMT
dreid       01/04/02 17:43:13

  Modified:    network_io/unix sockopt.c
  Log:
  The actual code for accept_filters on FreeBSD for APR.  This is NOT
  yet tested but does build :)  Use at your own risk.
  
  Obtained from:   Ryan Bloom <rbb@covalent.com>
  Reviewed by:	 David Reid <dreid@apache.org>
  
  Revision  Changes    Path
  1.44      +16 -0     apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- sockopt.c	2001/03/14 03:36:59	1.43
  +++ sockopt.c	2001/04/03 00:43:09	1.44
  @@ -303,3 +303,19 @@
           return APR_SUCCESS;
   }
   
  +#ifdef SO_ACCEPTFILTER
  +apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *name, 
  +                                      char *args)
  +{
  +    struct accept_filter_arg af;
  +    strncpy(af.af_name, name, 16);
  +    strncpy(af.af_arg, args, 256 - 16);
  +
  +    if ((setsockopt(sock->socketdes, SOL_SOCKET, SO_ACCEPTFILTER,
  +          &af, sizeof(af))) < 0) {
  +        return errno;
  +    }
  +    return APR_SUCCESS;
  +}
  +#endif
  +
  
  
  

Mime
View raw message