Regarding adding a module

Mitchell, Michael J Michael.Mitchell at team.telstra.com
Sat Aug 5 12:54:00 CEST 2006


Hi Ravi,

If you're even remotely proficient in C, you'll find it is not a
difficult task to add a new module.

Use the "example" module, or one of the other modules (including
Makefile) as a basis. Start with an "empty" module that just returns
RLM_MODULE_OK from each function, get it to compile and run, then you
can start adding your specific functionality.

The module definition at the end of the ".c" file defines the functions
that are called for initialization and destruction of your module, and
for each stage of request processing. Don't forget to change the module
name in the module definition, and also in the Makefile.

Its easiest to start with a static Makefile, but you can add your module
into the auto configure system if required - a little extra
configuration is then required in the modules configure files.

To get your module to compile when you run make in the top level
directory, you can do two things:

1) Add your module name to the "stable" file in src/modules before you
run "./configure", or
2) Add your module name to the "MODULES" definition in Make.inc after
you've run configure.

Once you get your module to compile and install, add its configuration
to radiusd.conf and it will be automagically linked into the server at
run time.

It really is not difficult, so give it a go and you'll soon see what
else is required as you reach each stage. If you run into trouble you
can ask specific questions on this list. And as always, search the list
archives, as chances are other people have come across similar hurdles
to what you will encounter.

cheers,
Mike


------------------------------------------------------------------------
--------
From:
freeradius-users-bounces+mitchell.michael=bigpond.com at lists.freeradius.o
rg
[mailto:freeradius-users-bounces+mitchell.michael=bigpond.com at lists.free
radius.org] On Behalf Of Ravi S M
Sent: Saturday, 5 August 2006 6:25 PM
To: freeradius-users at lists.freeradius.org
Subject: Regarding adding a module

Hi 

I wanted to add our own module for free radius code on Solaris box. So
please through some light on this.

With best regards
Ravi




More information about the Freeradius-Users mailing list