RAS Administration DLL - Your customized solution to manage the server!

Hello everyone. I understand that all of you would be busy checking out Vista and its cool features. However, for this post I decided to write about something which is very powerful but is little known - RAS administration DLL. The post will outline the use of a RAS administration DLL and will touch upon the basics of how to start writing your own customized RAS administration DLL.

The admin DLL or the RAS administration DLL is loaded by RRAS during service startup. During service startup, the MprAdminInitializeDll function of the admin DLL is called. And during service shutdown, MprAdminTerminateDll is called.

  •  When would you use a RAS administration DLL?

 When you want to control the connection to the RRAS server based on either the user who connects, or the port on which the user connects or any other property of the connection or if you want to assign an IP address of your choice to the connecting client or if you just want to audit/log the connection information for your later reference, and if RRAS inherently doesn't support it, then it is time to write your own admin DLL to do what you require. Some typicaly scenarios which would require to have a RAS administration DLL are - to ensure that there can be only one VPN connection from a particular user, to ensure that particular users not be allowed to connect, to ensure that all connections of a particular media type be rejected etc.

  • How would you start writing your own RAS administration DLL?

A RAS administration DLL must implement and export all of the following functions:

MprAdminAcceptNewLink

MprAdminInitializeDll

MprAdminLinkHangupNotification

MprAdminTerminateDll

Typically, you will write three files, say, MyRasAdminDLL.h (which contains the #includes,#defines anddatastructures that you might use in the code), MyRasAdminDLL.cpp (which implements all these above functions) and MyRASAdminDLL.def (which is the module definition file for the DLL and would export all of the above functions and anything else that you would implement)

In case, you do not want to implement any these functions, just return TRUE or return as the function requires.

 The complete list of Admin callback functions that you can implement is available here. (Be careful to note the operating system that supports the functions and use accordingly)

In the next post, we will see how to develop a RAS administration DLL using Visual Studio. See you soon!

Janani Vasudevan
Software Design Engineer/Test
RRAS, Windows Enterprise Networking

[This posting is provided "AS IS" with no warranties, and confers no rights.]