2
* (c) Copyright 1992 by Panagiotis Tsirigotis
3
* (c) Sections Copyright 1998-2001 by Rob Braun
4
* All rights reserved. The file named COPYRIGHT specifies the terms
5
* and conditions for redistribution.
12
* $Id: access.h,v 1.2 2004/01/02 21:07:42 steveg Exp $
16
#include "util.h" /* for nv_get_name() */
17
#include "defs.h" /* bool_int */
18
#include "connection.h"
22
* These flags are used to form a mask for access_control.
23
* The mask determines which checks will be performed.
27
#define CF_SERVICE_LIMIT 3
31
AC_OK, /* ok to start a server */
32
AC_FORK, /* tried to start a server but fork failed */
33
AC_ADDRESS, /* we do not accept requests from that address */
34
AC_TIME, /* we do not accept requests at this time */
35
AC_SERVICE_LIMIT, /* server limit would be exceeded for this */
37
AC_PER_SOURCE_LIMIT, /* server limit would be exceeded for this */
38
/* service and source address */
39
AC_PROCESS_LIMIT, /* total process limit would be exceeded */
46
#define ACCESS_EXPLAIN( code ) nv_get_name( access_code_names, (int) (code) )
49
extern const struct name_value access_code_names[];
50
void cps_service_stop(struct service *sp, const char *reason);
51
access_e access_control(struct service *sp,
52
const connection_s *cp,const mask_t *check_mask);
53
access_e parent_access_control(struct service *sp,const connection_s *cp);