1#! /usr/bin/env python3 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: e9db28a4fa7dc8fe163a1d1a1dcf23771ef32990 $ 12 13# from modules.h 14 15RLM_MODULE_REJECT = 0 16RLM_MODULE_FAIL = 1 17RLM_MODULE_OK = 2 18RLM_MODULE_HANDLED = 3 19RLM_MODULE_INVALID = 4 20RLM_MODULE_USERLOCK = 5 21RLM_MODULE_NOTFOUND = 6 22RLM_MODULE_NOOP = 7 23RLM_MODULE_UPDATED = 8 24RLM_MODULE_NUMCODES = 9 25 26# from log.h 27L_AUTH = 2 28L_INFO = 3 29L_ERR = 4 30L_WARN = 5 31L_PROXY = 6 32L_ACCT = 7 33 34L_DBG = 16 35L_DBG_WARN = 17 36L_DBG_ERR = 18 37L_DBG_WARN_REQ = 19 38L_DBG_ERR_REQ = 20 39 40# log function 41def radlog(level, msg): 42 import sys 43 sys.stdout.write(msg + '\n') 44