~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to server/access.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-07-20 19:48:50 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050720194850-oo61wjr33rrx2mre
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef ACCESS_H_SEEN
21
21
#define ACCESS_H_SEEN 1
22
22
 
23
 
/* possible actions for access controls */
24
 
#define ACTION_GRANT    1
25
 
#define ACTION_DENY     2
 
23
#define ACCESS_REJECT   0
 
24
#define ACCESS_ACCEPT   1
26
25
 
27
26
/* ACL structure */
28
27
struct acl_t {
29
 
        char    *name;
30
 
        unsigned int    addr;
31
 
        unsigned int    mask;
32
 
        void    *next;
 
28
        char    *name;
 
29
        unsigned int    addr;
 
30
        unsigned int    mask;
 
31
        void    *next;
33
32
};
34
33
 
35
34
/* ACCESS structure */
36
35
struct access_t {
37
36
        int     action;
38
 
        int     level;
39
37
        char    *aclname;
40
38
        void    *next;
41
39
};
42
40
 
43
41
int acl_check(const char *aclname, const struct sockaddr_in *addr);
44
 
int access_check(const struct sockaddr_in *addr, int level);
 
42
int access_check(const struct sockaddr_in *addr);
45
43
void acl_add(const char *aclname, char *ipblock);
46
 
void access_add(const char *action, const char *level, const char *aclname);
 
44
void access_add(int type, int numargs, const char **arg);
47
45
void acl_free(void);
48
46
void access_free(void);
49
47