IPPlan API v0.95

The IPPlan API makes it possible to interact with the IPPlan database using any XML-RPC compliant language to make RPC calls. Very little programming is required and a large number of languages are supported - see http://www.xmlrpc.com/ for more info on the XML-RPC specification.

The implementations used by IPPlan are:



Included with the API are a number of example programs written in PERL to demonstrate what is possible with the XML-RPC interface to IPPlan.

There is also a simple whois server (ipplan-whoisd.php) written in php to demonstrate an example whois daemon which can query the IPplan database via XML-RPC

Some applications of the interface could be to generate:

  Sendmail access lists
  DHCP config files
  Static entries for routing tables
  Query from trouble ticket systems to obtain network details

And any other application that deals with IP addresses in some way or another.

The way it works

A server component written in PHP understands a number of RPC calls which return data via the HTTP protocol. A client application written in virtually any language (I choose PERL or PHP) talks to this server and makes calls via a pre-defined API to get information from the IPPlan databases. The information returned is native to the language requiring no additional coding work, and can be handled as usual in the native language.

Using PERL as an example, making a call is a simple as adding a couple of lines of code to your program:

use Frontier::Client;
 
# place where IPPlan server API server is installed - including userid
# and password
my $serverURL='http://userid:password@localhost/ipplanapi/server.php';
 
# setup connection to server
my $client = Frontier::Client->new( 'url' => $serverURL,
		'debug' => 0, 'encoding' => 'iso-8859-1' );
 
# and make the call! $resp will contain result
my $resp = $client->call("ipplan.FetchSubnet", $parameters);
 
  ipplanapi.txt · Last modified: 2005/04/10 06:24