1 Python module for freeradius
2 Copyright 2002 Miguel A Paraz <mparaz@mparaz.com>
3 Copyright 2002 Imperium Technology, Inc.
6 To allow module writers to write modules in a high-level language,
7 for implementation or for prototyping.
10 Python - tested with 2.2
13 ./configure --with-experimental-modules
17 Make your module available to the Python interpreter by either putting it
18 in a standard location, or 'EXPORT PYTHONPATH=$location'.
25 1. Can't compile statically (./configure --enable-shared=no) - causes
26 SIGSEGV on the first malloc() in main().
29 1. Support for all module functions.
30 2. One module per function allowed, for example, from experimental.conf:
33 mod_instantiate = radiusd_test
34 func_instantiate = instantiate
36 mod_authorize = radiusd_test
37 func_authorize = authorize
39 mod_accounting = radiusd_test
40 func_accounting = accounting
42 mod_preacct = radiusd_test
43 func_preacct = preacct
45 mod_detach = radiusd_test
51 3. Different functions are wrappers around the same core.
52 4. func_detach is passed no parameters, returns module return value.
53 5. If functions returns None (plain 'return' no return), default to RLM_OK
54 6. Python instantation function can return -1 to signal failure and abort
59 radiusd.rad_log(radiusd.L_XXX, message_string)
65 1. Do we need to support other pair operations beyond set (:=) ?
66 2. Should we pass the value pair info as a dict and not a tuple? Faster?
67 2. Give access to more radiusd variables like the dictionary.
68 3. Give access to other C functions.
69 Let the Python module deal with the structures directly, instead of
70 letting our C code do it afterwards.
71 What's a good way to represent this?