Initial commits
[freeradius-pysaml2.git] / radiusd.py
1 #! /usr/bin/env python
2 #
3 # Definitions for RADIUS programs
4 #
5 # Copyright 2002 Miguel A.L. Paraz <mparaz@mparaz.com>
6 #
7 # This should only be used when testing modules.
8 # Inside freeradius, the 'radiusd' Python module is created by the C module
9 # and the definitions are automatically created.
10 #
11 # $Id$
12
13 # from modules.h
14
15 RLM_MODULE_REJECT = 0
16 RLM_MODULE_FAIL = 1
17 RLM_MODULE_OK = 2
18 RLM_MODULE_HANDLED = 3
19 RLM_MODULE_INVALID = 4
20 RLM_MODULE_USERLOCK = 5
21 RLM_MODULE_NOTFOUND = 6
22 RLM_MODULE_NOOP = 7
23 RLM_MODULE_UPDATED = 8
24 RLM_MODULE_NUMCODES = 9
25
26
27 # from radiusd.h
28 L_DBG = 1
29 L_AUTH = 2
30 L_INFO = 3
31 L_ERR = 4
32 L_PROXY = 5
33 L_CONS = 128
34
35
36 # log function
37 def radlog(level, msg):
38     import sys
39     sys.stdout.write("<python>" + msg + '\n')
40     level = level
41