source: trunk/cgi-bin/MyIPDB.pm@ 708

Last change on this file since 708 was 691, checked in by Kris Deugau, 10 years ago

/trunk

Expose VRF field, and add a similar VLAN field (see #10).

  • Property svn:keywords set to Date Rev Author
File size: 3.4 KB
RevLine 
[142]1# ipdb/cgi-bin/MyIPDB.pm
2# Contains site-specific functions for IPDB
3# May override some functions from IPDB.pm, wraps others
4###
5# SVN revision info
6# $Date: 2015-02-06 22:42:26 +0000 (Fri, 06 Feb 2015) $
7# SVN revision $Rev: 691 $
8# Last update by $Author: kdeugau $
9###
[417]10# Copyright (C) 2004-2010 - Kris Deugau
[142]11
[417]12# don't remove! required for GNU/FHS-ish install from tarball
13##uselib##
14
[142]15use IPDB 2.0 qw(:ALL);
16
17
[432]18# DSN, user, and password for database. These **MUST** be set.
19my $dbname = 'ipdb';
20my $dbuser = 'ipdb';
21my $dbpass = 'ipdbpwd';
22# DB host is optional.
[659]23my $dbhost = 'localhost';
[432]24
[660]25# ACL for RPC shim. A hash of arrays; the hash keys are the remote system
26# names, the array contents are the IPs allowed to claim that system name.
27#%IPDB::rpcacl = (
28# cli_test => ['192.168.99.115','209.91.179.62'],
29# devel => ['10.0.10.5'],
30# );
[661]31# Only you can prevent memory leaks!
32#$IPDB::maxfcgi = 100;
[517]33
[667]34# ACL for RPC shim. A hash of arrays; the hash keys are the remote system
35# names, the array contents are the IPs allowed to claim that system name.
36#%IPDB::rpcacl = (
37# cli_test => ['192.168.99.115','209.91.179.62'],
38# devel => ['10.0.10.5'],
39# );
40# Only you can prevent memory leaks!
41#$IPDB::maxfcgi = 100;
42
[660]43# Quick workaround for fixed web path. Set this to the absolute web path to
44# your IPDB install, or leave blank for installation at the webroot.
45$IPDB::webpath = '';
46
[416]47# Set some globals declared in IPDB.pm. Most of these only affect mailNotify().
48# Note that while you *can* leave these at defaults, it's probably a Really Bad Idea.
[437]49#$IPDB::org_name = "Bob's Big Bonaza";
[416]50#$IPDB::smtphost = '127.0.0.1';
51#$IPDB::domain = 'bob.com';
[417]52#$IPDB::defcustid = '5554242';
[681]53#$IPDB::smtpsender = "ipdb\@$domain";
[417]54# Globals for db2rwhois.pl
[420]55#$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';
[417]56#$IPDB::org_street = '123 4th Street';
57#$IPDB::org_city = 'Anytown';
58#$IPDB::org_prov_state = 'ON';
59#$IPDB::org_pocode = 'H0H 0H0';
60#$IPDB::org_country = 'CA';
61#$IPDB::org_phone = '000-555-1234';
62# note: following may also just be a bare email address
63#$IPDB::org_techhandle = 'ISP-ARIN-HANDLE';
[434]64#$IPDB::org_email = 'noc@example.com';
[437]65#$IPDB::hostmaster = 'dns@example.com';
[416]66
[417]67# Logging destination. Defaults to local2. See your local syslog docs for valid facilities.
68# Note that the value here should have the LOG_ prefix removed, and convert to lower-case.
69# local0 through local7 and user make the most sense.
70#$IPDB::syslog_facility = 'daemon';
71
[582]72# RPC URL for pushing DNS changes out. Blank by default; disables RPC calls for DNS changes when blank.
73#$IPDB::rpc_url = 'http://dnsadmin.example.com/dns-rpc.cgi';
[432]74
[674]75# Largest inverse CIDR mask length to show per-IP rDNS list
76# (eg, NetAddr::IP->bits - NetAddr::IP->masklen)
77# allowing longer than a /27 is probably going to slow things down; longer than /29 will scroll.
78#$IPDB::maxrevlist = 8; # v4 /24
79
[682]80## UI layout for showing subblocks
81# 1 lists all containers in a group, then all end-use allocations (including pools) in a group
82# 2 lists all entries in a container in CIDR order, and puts a secondary summary line under a container entry
83# Both show free blocks in a group at the bottom as previously
84# $IPDB::sublistlayout = 1;
85
[691]86## VLAN validation mode
87# Set to 0 to allow alphanumerics and _ . - (VLAN name instead of number)
88#$IPDB::numeric_vlan = 1;
89
[432]90## connectDB_My()
91# Wrapper for IPDB::connectDB
92# Takes no arguments, returns whatever IPDB::connectDB returns.
93sub connectDB_My {
94 return connectDB($dbname, $dbuser, $dbpass, $dbhost);
95} # end connectDB_My()
96
[142]97# Keep Perl from complaining.
981;
Note: See TracBrowser for help on using the repository browser.