Location: PHPKode > projects > Network Managment / Inventory System > clearsite/include/db.sql.php
<?php

$table_create = array();
$insert_table = array();

$table_create[] = "CREATE TABLE account ( account_ID int(3) NOT NULL auto_increment, provider_ID int(3) NOT NULL, account_number varchar(32) NOT NULL, contract_number varchar(32) default NULL, PRIMARY KEY  (account_ID), KEY provider_ID (provider_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Account Data (circuits)\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE circuits ( circuit_UID int(3) NOT NULL auto_increment, circuit_ID varchar(24) NOT NULL, circuit_provider int(3) default NULL, circuit_description varchar(24) default NULL, circuit_provision varchar(12) default NULL, account_ID int(3) default NULL, notes longtext, added_to_DB varchar(12) NOT NULL, PRIMARY KEY  (circuit_UID), KEY account_ID (account_ID), KEY circuit_ID (circuit_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE config ( name varchar(128) NOT NULL, value varchar(128) NOT NULL, PRIMARY KEY  (name)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE cpus ( cpu_ID int(4) NOT NULL auto_increment, device_ID int(4) NOT NULL, cpu_name varchar(6) default NULL, ifindex varchar(10) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (cpu_ID), KEY device_ID (device_ID), KEY ifindex (ifindex)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"CPU Information\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE css_cr ( cr_ID int(4) NOT NULL auto_increment, device_ID int(3) NOT NULL, owner_ID int(3) NOT NULL, cr_name varchar(128) NOT NULL, cr_vip varchar(15) default NULL, cr_status varchar(10) default NULL, ifindex varchar(256) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (cr_ID), KEY device_ID (device_ID), KEY owner_ID (owner_ID), KEY cr_name (cr_name)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE css_owner ( owner_ID int(3) NOT NULL auto_increment, device_ID int(4) NOT NULL, owner_name varchar(64) NOT NULL, ifindex varchar(256) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (owner_ID), KEY device_ID (device_ID), KEY owner_name (owner_name), KEY ifindex (ifindex)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE css_sv ( sv_ID int(7) NOT NULL auto_increment, device_ID int(4) NOT NULL, sv_name varchar(128) NOT NULL, sv_ip varchar(15) NOT NULL, sv_status varchar(10) NOT NULL, ifindex varchar(256) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (sv_ID), KEY device_ID (device_ID), KEY sv_name (sv_name)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE devices ( device_ID int(4) NOT NULL auto_increment, device_IP varchar(15) NOT NULL, device_FQDN varchar(48) default NULL, device_name varchar(32) default NULL, device_serial varchar(32) default NULL, device_asset_tag varchar(32) default NULL, device_model varchar(24) default NULL, device_SNMP_Read varchar(32) NOT NULL, device_type_ID int(3) default NULL, device_OS varchar(128) NOT NULL, location_ID int(3) default NULL, snmpver varchar(1) NOT NULL default 2, template_ID int(4) default NULL, device_status varchar(7) NOT NULL, pingable varchar(1) NOT NULL default \"Y\", new_device varchar(1) NOT NULL default \"Y\", record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (device_ID), KEY device_type_ID (device_type_ID), KEY office_ID (location_ID), KEY template_ID (template_ID), KEY device_status (device_status)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Device Data\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE interface_speed ( ifspeed_ID int(3) NOT NULL auto_increment, ifspeed bigint(24) NOT NULL, ifspeed_display varchar(255) default NULL, PRIMARY KEY  (ifspeed_ID), UNIQUE KEY ifspeed (ifspeed)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE interfaces ( interface_ID int(7) NOT NULL auto_increment, device_ID int(4) NOT NULL, ifname varchar(32) default NULL, ifindex varchar(64) default NULL, ifdescr varchar(48) default NULL, iftype_ID int(3) default NULL, ifspeed_ID int(3) default NULL, ifphysaddress varchar(18) default NULL, ifadminstatus varchar(6) default NULL, ifoperstatus varchar(6) default NULL, iflastchange varchar(128) default NULL, ifalias varchar(64) default NULL, portname varchar(24) default NULL, portoperstatus varchar(8) default NULL, portadminspeed varchar(12) default NULL, portduplex varchar(8) default NULL, portifindex varchar(6) default NULL, porttype varchar(12) default NULL, nativevlan varchar(32) default NULL, mac varchar(255) default NULL, host_ip varchar(255) default NULL, host_name varchar(255) default NULL, interfaceip varchar(15) default NULL, interfacemask varchar(15) default NULL, iscdpneighbor varchar(1) NOT NULL, circuit_UID int(3) default NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, sysuptime varchar(64) NOT NULL, PRIMARY KEY  (interface_ID), KEY device_ID (device_ID), KEY iftype_ID (iftype_ID), KEY ifspeed_ID (ifspeed_ID), KEY circuit_UID (circuit_UID), KEY ifname (ifname), KEY iscdpneighbor (iscdpneighbor), KEY record_updated (record_updated), KEY ifoperstatus (ifoperstatus), KEY ifdescr (ifdescr), KEY ifindex (ifindex)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Interface Data\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE location ( location_ID int(3) NOT NULL auto_increment, office_address varchar(56) NOT NULL, city varchar(32) NOT NULL, state varchar(4) default NULL, zip_code varchar(10) default NULL, country_code int(2) default NULL, main_phone varchar(12) default NULL, fax varchar(12) default NULL, contact varchar(30) default NULL, office_head varchar(30) default NULL, priority_ID int(2) default NULL, time_zone varchar(3) default NULL, added_to_DB int(12) NOT NULL, PRIMARY KEY  (location_ID), KEY priority_ID (priority_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Office Location Data\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE location_priority ( priority_ID int(2) NOT NULL auto_increment, priority varchar(24) NOT NULL, PRIMARY KEY  (priority_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE outage ( outage_ID int(4) NOT NULL auto_increment, start_loc_time int(12) default NULL, end_loc_time int(12) default NULL, internal_ID varchar(24) default NULL, provider_ID int(3) default NULL, provider_ticket varchar(32) default NULL, local_ticket varchar(24) default NULL, location_ID int(3) default NULL, device_ID int(4) default NULL, date_entered int(12) default NULL, date_closed int(12) default NULL, date_resolved int(12) default NULL, rfo_ID int(3) default NULL, circuit_UID int(3) default NULL, PRIMARY KEY  (outage_ID), KEY provider_ID (provider_ID), KEY location_ID (location_ID), KEY device_ID (device_ID), KEY rfo_ID (rfo_ID), KEY circuit_UID (circuit_UID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE outage_history ( history_ID int(4) NOT NULL auto_increment, outage_ID int(4) NOT NULL, progress_notes blob, username varchar(32) NOT NULL, added_to_DB int(12) NOT NULL, PRIMARY KEY  (history_ID), KEY outage_ID (outage_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE outage_rfo ( rfo_ID int(3) NOT NULL auto_increment, rfo_name varchar(24) NOT NULL, PRIMARY KEY  (rfo_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE provider ( provider_ID int(3) NOT NULL auto_increment, provider_name varchar(24) NOT NULL, provider_contact varchar(48) default NULL, contact_number varchar(16) default NULL, contact_email varchar(48) default NULL, outage_phone varchar(16) NOT NULL, notes longtext, PRIMARY KEY  (provider_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Provider Contact Data\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE user_data ( user_ID int(4) NOT NULL auto_increment, username varchar(24) NOT NULL, domain varchar(24) NOT NULL default \"Unknown\", full_name varchar(128) default NULL, email_address varchar(48) default NULL, location_ID int(3) default NULL, userlevel int(2) NOT NULL default 0, added_to_DB timestamp NOT NULL default CURRENT_TIMESTAMP, passwd varchar(255) NULL, PRIMARY KEY  (user_ID), KEY location_ID (location_ID), KEY userlevel (userlevel), KEY domain (domain)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"User Data\" AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE user_groups ( user_ID int(4) NOT NULL, page_name varchar(255) NOT NULL, interface_type varchar(16) NOT NULL, interface_ID varchar(16) NOT NULL, label varchar(255) NOT NULL, size varchar(2) NOT NULL default \"T\", `order` int(2) default NULL, KEY user_ID (user_ID), KEY page_name (page_name), KEY interface_type (interface_type), KEY interface_ID (interface_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE vpn_sessions ( session_ID int(255) NOT NULL auto_increment, device_ID int(5) NOT NULL, username varchar(64) NOT NULL, pubip varchar(15) NOT NULL, privip varchar(15) NOT NULL, sessionest varchar(32) NOT NULL, sessionlength varchar(64) NOT NULL, session_type_ID int(4) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (session_ID), KEY device_ID (device_ID), KEY session_type_ID (session_type_ID), KEY username (username)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE wap_clients ( client_ID int(255) NOT NULL auto_increment, device_ID int(5) NOT NULL, client_name varchar(64) NOT NULL, client_assigned_address varchar(15) NOT NULL, client_type_ID int(4) NOT NULL, record_updated timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, added_to_DB timestamp NOT NULL, PRIMARY KEY  (client_ID), KEY client_type_ID (client_type_ID), KEY device_ID (device_ID), KEY client_name (client_name)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
$table_create[] = "CREATE TABLE country_codes ( country_code int(2) NOT NULL auto_increment, country_abbr varchar(5) NOT NULL, country_full varchar(32) default NULL, PRIMARY KEY  (country_code)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Country Code data\" AUTO_INCREMENT=4";
$table_create[] = "CREATE TABLE details_display ( detail_ID int(3) NOT NULL auto_increment, detail varchar(50) NOT NULL, detail_display varchar(64) NOT NULL, PRIMARY KEY  (detail_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27";
$table_create[] = "CREATE TABLE device_type ( device_type_ID int(3) NOT NULL auto_increment, device_type_name varchar(24) NOT NULL, device_model_oid varchar(64) default \"none\", device_os_oid varchar(64) default \"none\", device_serial_oid varchar(64) default \"none\", arp_table_oid varchar(64) NOT NULL default \"none\", snmpver varchar(1) NOT NULL default 2, PRIMARY KEY  (device_type_ID), KEY arp_table_oid (arp_table_oid)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=\"Device Type Data\" AUTO_INCREMENT=9";
$table_create[] = "CREATE TABLE interface_type ( iftype_ID int(3) NOT NULL, iftype varchar(32) NOT NULL, iftype_display varchar(255) default NULL, PRIMARY KEY  (iftype_ID), KEY iftype (iftype)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_css ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_pix ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_router ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_switch_catios ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_switch_catos ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_switch_oneU ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_vpn ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_cisco_wap ( mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_dd_wrt_wap (mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_hp_switch (mib varchar(64) NOT NULL, oid varchar(64) NOT NULL, anchor varchar(64) NOT NULL, vlan varchar(3) NOT NULL, walk_type varchar(4) NOT NULL, method varchar(4) NOT NULL default \"walk\", PRIMARY KEY  (mib), KEY oid (oid), KEY walk_type (walk_type)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE snmp_template_list ( template_ID int(4) NOT NULL auto_increment, device_type_ID int(3) NOT NULL, template_name varchar(64) NOT NULL, template_table varchar(64) NOT NULL, PRIMARY KEY  (template_ID), KEY device_type_ID (device_type_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11";
$table_create[] = "CREATE TABLE vpn_session_type ( session_type_ID int(4) NOT NULL, session_type varchar(64) NOT NULL, PRIMARY KEY  (session_type_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1";
$table_create[] = "CREATE TABLE wap_client_type ( client_type_ID int(4) NOT NULL, client_type varchar(64) NOT NULL, PRIMARY KEY  (client_type_ID)) ENGINE=InnoDB DEFAULT CHARSET=latin1";

$csadmin_pass = crypt("aloe-admin", '$1$clearsite');
$insert_table[] = "INSERT INTO location_priority (priority_ID, priority) VALUES (1, \"High\"), (2, \"Medium\"), (3, \"Low\")";
$insert_table[] = "INSERT INTO user_data (username, userlevel, passwd) VALUES (\"csadmin\", 2, \"$csadmin_pass\")";
$insert_table[] = "INSERT INTO interface_speed (ifspeed_ID, ifspeed, ifspeed_display) VALUES (\"1\", \"0\", \"Unknown\")";
$insert_table[] = "INSERT INTO country_codes (country_code, country_abbr, country_full) VALUES (1, \"usa\", \"United States of America\"), (2, \"can\", \"Canada\"), (3, \"uk\", \"United Kingdom\")";
$insert_table[] = "INSERT INTO details_display (detail_ID, detail, detail_display) VALUES (1, \"nativevlan\", \"VLAN\"), (2, \"mac\", \"MAC\"), (3, \"host_ip\", \"Host IP\"), (4, \"host_name\", \"Host Name\"), (5, \"ifname\", \"ifname\"), (6, \"iftype\", \"Interface Type\"), (7, \"ifspeed_display\", \"Speed\"), (8, \"ifadminstatus\", \"Admin Status\"), (9, \"ifoperstatus\", \"Port Status\"), (10, \"iflastchange\", \"Last Change\"), (11, \"portduplex\", \"Duplex\"), (12, \"owner_name\", \"Owner\"), (13, \"cr_name\", \"Content Rule\"), (14, \"cr_vip\", \"VIP\"), (15, \"cr_status\", \"Content Rule Status\"), (16, \"sv_name\", \"Service\"), (17, \"sv_ip\", \"Service IP\"), (18, \"sv_status\", \"Service Status\"), (19, \"username\", \"User Name\"), (20, \"pubip\", \"Public IP\"), (21, \"privip\", \"Private IP\"), (22, \"sessionest\", \"Session Established\"), (23, \"sessionlength\", \"Session Length\"), (24, \"session_type\", \"Session Type\"), (25, \"client_name\", \"Client Name\"), (26, \"client_assigned_address\", \"Client DHCP Address\")";
$insert_table[] = "INSERT INTO device_type (device_type_ID, device_type_name, device_model_oid, device_os_oid, device_serial_oid, arp_table_oid, snmpver) VALUES (1, \"css\", \"none\", \".1.3.6.1.2.1.1.1.0\", \"none\", \".1.3.6.1.2.1.4.22.1.2\", \"2\"), (2, \"pix\", \"none\", \".1.3.6.1.2.1.1.1.0\", \"none\", \"none\", \"1\"), (3, \"router\", \".1.3.6.1.4.1.9.9.25.1.1.1.2.3\", \".1.3.6.1.2.1.1.1.0\", \"none\", \".1.3.6.1.2.1.4.22.1.2\", \"2\"), (4, \"switch\", \".1.3.6.1.4.1.9.9.25.1.1.1.2.3\", \".1.3.6.1.2.1.1.1.0\", \".1.3.6.1.4.1.9.5.1.2.19.0\", \"none\", \"2\"), (5, \"vpn concentrator\", \"none\", \"none\", \".1.3.6.1.4.1.3076.2.1.2.22.1.63.0\", \"none\", \"1\"), (6, \"switch (one U)\", \".1.3.6.1.4.1.9.9.25.1.1.1.2.3\", \".1.3.6.1.2.1.1.1.0\", \"none\", \"none\", \"2\"), (7, \"wap\", \".1.3.6.1.4.1.9.9.25.1.1.1.2.3\", \".1.3.6.1.2.1.1.1.0\", \".1.3.6.1.4.1.9.3.6.3.0\", \".1.3.6.1.2.1.4.22.1.2\", \"2\"), (8, \"switch (layer 3)\", \".1.3.6.1.4.1.9.9.25.1.1.1.2.3\", \".1.3.6.1.2.1.1.1.0\", \".1.3.6.1.4.1.9.5.1.2.19.0\", \".1.3.6.1.2.1.4.22.1.2\", \"2\"), (9, \"hp_procurve_switch\", \"none\", \".1.3.6.1.2.1.1.1.0\", \".1.3.6.1.2.1.47.1.1.1.1.11.1\", \"none\", \"2\"), (10, \"dd-wrt wap\", \"none\", \".1.3.6.1.2.1.1.1.0\", \"none\", \"none\", \"2\")";
$insert_table[] = "INSERT INTO interface_type (iftype_ID, iftype, iftype_display) VALUES (0, \"ethernetCsmacd\", \"Ethernet\"), (1, \"other\", NULL), (2, \"cddi\", NULL), (3, \"fddi\", NULL), (4, \"tppmd\", NULL), (5, \"mlt3\", NULL), (6, \"sddi\", NULL), (7, \"smf\", NULL), (8, \"e10BaseT\", NULL), (9, \"e10BaseF\", NULL), (10, \"scf\", NULL), (11, \"e100BaseTX\", NULL), (12, \"e100BaseT4\", NULL), (13, \"e100BaseF\", NULL), (14, \"atmOc3mmf\", NULL), (15, \"atmOc3smf\", NULL), (16, \"atmOc3utp\", NULL), (17, \"e100BaseFsm\", NULL), (18, \"e10a100BaseTX\", NULL), (19, \"mii\", NULL), (20, \"vlanRouter\", NULL), (21, \"remoteRouter\", NULL), (22, \"tokenring\", NULL), (23, \"atmOc12mmf\", NULL), (24, \"atmOc12smf\", NULL), (25, \"atmDs3\", NULL), (26, \"tokenringMmf\", NULL), (27, \"e1000BaseLX\", NULL), (28, \"e1000BaseSX\", NULL), (29, \"e1000BaseCX\", NULL), (30, \"networkAnalysis\", NULL), (31, \"e1000Empty\", NULL), (32, \"e1000BaseLH\", NULL), (33, \"e1000BaseT\", NULL), (34, \"e1000UnsupportedGbic\", NULL), (35, \"e1000BaseZX\", NULL), (36, \"depi2\", NULL), (37, \"t1\", NULL), (38, \"e1\", NULL), (39, \"fxs\", NULL), (40, \"fxo\", NULL), (41, \"transcoding\", NULL), (42, \"conferencing\", NULL), (43, \"atmOc12mm\", NULL), (44, \"atmOc12smi\", NULL), (45, \"atmOc12sml\", NULL), (46, \"posOc12mm\", NULL), (47, \"posOc12smi\", NULL), (48, \"posOc12sml\", NULL), (49, \"posOc48sms\", NULL), (50, \"posOc48smi\", NULL), (51, \"posOc48sml\", NULL), (52, \"posOc3mm\", NULL), (53, \"posOc3smi\", NULL), (54, \"posOc3sml\", NULL), (55, \"intrusionDetect\", NULL), (56, \"e10GBaseCPX\", NULL), (57, \"e10GBaseLX4\", NULL), (59, \"e10GBaseEX4\", NULL), (60, \"e10GEmpty\", NULL), (61, \"e10a100a1000BaseT\", NULL), (62, \"dptOc48mm\", NULL), (63, \"dptOc48smi\", NULL), (64, \"dptOc48sml\", NULL), (65, \"e10GBaseLR\", NULL), (66, \"chOc12smi\", NULL), (67, \"chOc12mm\", NULL), (68, \"chOc48ss\", NULL), (69, \"chOc48smi\", NULL), (70, \"e10GBaseSX4\", NULL), (71, \"e10GBaseER\", NULL), (72, \"contentEngine\", NULL), (73, \"ssl\", NULL), (74, \"firewall\", NULL), (75, \"vpnIpSec\", NULL), (76, \"ct3\", NULL), (77, \"e1000BaseCwdm1470\", NULL), (78, \"e1000BaseCwdm1490\", NULL), (79, \"e1000BaseCwdm1510\", NULL), (80, \"e1000BaseCwdm1530\", NULL), (81, \"e1000BaseCwdm1550\", NULL), (82, \"e1000BaseCwdm1570\", NULL), (83, \"e1000BaseCwdm1590\", NULL), (84, \"e1000BaseCwdm1610\", NULL), (85, \"e1000BaseBT\", NULL), (86, \"e1000BaseUnapproved\", NULL), (87, \"chOc3smi\", NULL), (88, \"mcr\", NULL), (89, \"coe\", NULL), (90, \"mwa\", NULL), (91, \"psd\", NULL), (92, \"e100BaseLX\", NULL), (93, \"e10GBaseSR\", NULL), (94, \"e10GBaseCX4\", NULL), (95, \"e10GBaseWdm1550\", NULL), (96, \"e10GBaseEdc1310\", NULL), (97, \"e10GBaseSW\", NULL), (98, \"e10GBaseLW\", NULL), (99, \"e10GBaseEW\", NULL), (100, \"lwa\", NULL), (101, \"aons\", NULL), (102, \"sslVpn\", NULL), (103, \"e100BaseEmpty\", NULL), (104, \"adsm\", NULL), (105, \"agsm\", NULL), (106, \"aces\", NULL), (1000, \"e1000BaseUnknown\", NULL), (1001, \"e10GBaseUnknown\", NULL), (1002, \"e10GBaseUnapproved\", NULL), (1003, \"e1000BaseWdmRxOnly\", NULL), (1004, \"e1000BaseDwdm3033\", NULL), (1005, \"e1000BaseDwdm3112\", NULL), (1006, \"e1000BaseDwdm3190\", NULL), (1007, \"e1000BaseDwdm3268\", NULL), (1008, \"e1000BaseDwdm3425\", NULL), (1009, \"e1000BaseDwdm3504\", NULL), (1010, \"e1000BaseDwdm3582\", NULL), (1011, \"e1000BaseDwdm3661\", NULL), (1012, \"e1000BaseDwdm3819\", NULL), (1013, \"e1000BaseDwdm3898\", NULL), (1014, \"e1000BaseDwdm3977\", NULL), (1015, \"e1000BaseDwdm4056\", NULL), (1016, \"e1000BaseDwdm4214\", NULL), (1017, \"e1000BaseDwdm4294\", NULL), (1018, \"e1000BaseDwdm4373\", NULL), (1019, \"e1000BaseDwdm4453\", NULL), (1020, \"e1000BaseDwdm4612\", NULL), (1021, \"e1000BaseDwdm4692\", NULL), (1022, \"e1000BaseDwdm4772\", NULL), (1023, \"e1000BaseDwdm4851\", NULL), (1024, \"e1000BaseDwdm5012\", NULL), (1025, \"e1000BaseDwdm5092\", NULL), (1026, \"e1000BaseDwdm5172\", NULL), (1027, \"e1000BaseDwdm5252\", NULL), (1028, \"e1000BaseDwdm5413\", NULL), (1029, \"e1000BaseDwdm5494\", NULL), (1030, \"e1000BaseDwdm5575\", NULL), (1031, \"e1000BaseDwdm5655\", NULL), (1032, \"e1000BaseDwdm5817\", NULL), (1033, \"e1000BaseDwdm5898\", NULL), (1034, \"e1000BaseDwdm5979\", NULL), (1035, \"e1000BaseDwdm6061\", NULL), (1036, \"e10GBaseWdmRxOnly\", NULL), (1037, \"e10GBaseDwdm3033\", NULL), (1038, \"e10GBaseDwdm3112\", NULL), (1039, \"e10GBaseDwdm3190\", NULL), (1040, \"e10GBaseDwdm3268\", NULL), (1041, \"e10GBaseDwdm3425\", NULL), (1042, \"e10GBaseDwdm3504\", NULL), (1043, \"e10GBaseDwdm3582\", NULL), (1044, \"e10GBaseDwdm3661\", NULL), (1045, \"e10GBaseDwdm3819\", NULL), (1046, \"e10GBaseDwdm3898\", NULL), (1047, \"e10GBaseDwdm3977\", NULL), (1048, \"e10GBaseDwdm4056\", NULL), (1049, \"e10GBaseDwdm4214\", NULL), (1050, \"e10GBaseDwdm4294\", NULL), (1051, \"e10GBaseDwdm4373\", NULL), (1052, \"e10GBaseDwdm4453\", NULL), (1053, \"e10GBaseDwdm4612\", NULL), (1054, \"e10GBaseDwdm4692\", NULL), (1055, \"e10GBaseDwdm4772\", NULL), (1056, \"e10GBaseDwdm4851\", NULL), (1057, \"e10GBaseDwdm5012\", NULL), (1058, \"e10GBaseDwdm5092\", NULL), (1059, \"e10GBaseDwdm5172\", NULL), (1060, \"e10GBaseDwdm5252\", NULL), (1061, \"e10GBaseDwdm5413\", NULL), (1062, \"e10GBaseDwdm5494\", NULL), (1063, \"e10GBaseDwdm5575\", NULL), (1064, \"e10GBaseDwdm5655\", NULL), (1065, \"e10GBaseDwdm5817\", NULL), (1066, \"e10GBaseDwdm5898\", NULL), (1067, \"e10GBaseDwdm5979\", NULL), (1068, \"e10GBaseDwdm6061\", NULL), (1069, \"e1000BaseBX10D\", NULL), (1070, \"e1000BaseBX10U\", NULL), (1071, \"e100BaseUnknown\", NULL), (1072, \"e100BaseUnapproved\", NULL), (1073, \"e100BaseSX\", NULL), (1074, \"e100BaseBX10D\", NULL), (1075, \"e100BaseBX10U\", NULL), (1076, \"e10GBaseBad\", NULL), (1077, \"e10GBaseZR\", NULL), (1078, \"e100BaseEX\", NULL), (1079, \"e100BaseZX\", NULL)";
$insert_table[] = "INSERT INTO snmp_template_cisco_css (mib, oid, anchor, vlan, walk_type, method) VALUES (\"cpu5min\", \".1.3.6.1.4.1.9.9.368.1.34.17.1.14\", \"cpuname\", \"no\", \"rrd\", \"walk\"), (\"cpuname\", \".1.3.6.1.4.1.9.9.368.1.34.17.1.4\", \"anchor\", \"no\", \"both\", \"walk\"), (\"crbytes\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.25\", \"crname\", \"no\", \"rrd\", \"walk\"), (\"crhits\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.18\", \"crname\", \"no\", \"rrd\", \"walk\"), (\"crname\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.2\", \"anchor\", \"no\", \"both\", \"walk\"), (\"crowner\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.1\", \"crname\", \"no\", \"db\", \"walk\"), (\"crstatus\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.11\", \"crname\", \"no\", \"db\", \"walk\"), (\"crvip\", \".1.3.6.1.4.1.9.9.368.1.16.4.1.4\", \"crname\", \"no\", \"db\", \"walk\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifdescr\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.4.1.9.9.368.1.44.3.1.10\", \"ifdescr\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.4.1.9.9.368.1.44.3.1.16\", \"ifdescr\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifdescr\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifdescr\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifdescr\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifdescr\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifdescr\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifdescr\", \"no\", \"db\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifdescr\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifdescr\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifdescr\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifdescr\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifdescr\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.4.1.9.9.368.1.44.3.1.5\", \"ifdescr\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifdescr\", \"no\", \"db\", \"walk\"), (\"owner\", \".1.3.6.1.4.1.9.9.368.1.25.2.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ownerbytes\", \".1.3.6.1.4.1.9.9.368.1.25.2.1.22\", \"owner\", \"no\", \"rrd\", \"walk\"), (\"svavgld\", \".1.3.6.1.4.1.9.9.368.1.15.2.1.40\", \"svname\", \"no\", \"rrd\", \"walk\"), (\"svip\", \".1.3.6.1.4.1.9.9.368.1.15.2.1.3\", \"svname\", \"no\", \"db\", \"walk\"), (\"svname\", \".1.3.6.1.4.1.9.9.368.1.15.2.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"svstatus\", \".1.3.6.1.4.1.9.9.368.1.15.2.1.12\", \"svname\", \"no\", \"db\", \"walk\"), (\"svtcpcon\", \".1.3.6.1.4.1.9.9.368.1.15.2.1.20\", \"svname\", \"no\", \"rrd\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_pix (mib, oid, anchor, vlan, walk_type, method) VALUES (\"cpu5min\", \".1.3.6.1.4.1.9.9.109.1.1.1.1.5.1\", \"anchor\", \"no\", \"both\", \"get\"), (\"curnumconnection\", \".1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifindex\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifindex\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifindex\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifindex\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifindex\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifindex\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifindex\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifindex\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifindex\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifindex\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"maxnumconnection\", \".1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.7\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"memfree\", \".1.3.6.1.4.1.9.9.48.1.1.1.6.1\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"memused\", \".1.3.6.1.4.1.9.9.48.1.1.1.5.1\", \"anchor\", \"no\", \"rrd\", \"get\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_router (mib, oid, anchor, vlan, walk_type, method) VALUES (\"cdpcacheaddress\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.4\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cdpconnection\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.7\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.9.2.1.58.0\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifalias\", \".1.3.6.1.2.1.31.1.1.1.18\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_switch_catios (mib, oid, anchor, vlan, walk_type, method) VALUES (\"bridgetoifindex\", \".1.3.6.1.2.1.17.1.4.1.2\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"cdpcacheaddress\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.4\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cdpconnection\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.7\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.9.2.1.58.0\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifalias\", \".1.3.6.1.2.1.31.1.1.1.18\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"mactable\", \".1.3.6.1.2.1.17.4.3.1.1\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"portduplex\", \".1.3.6.1.4.1.9.5.1.4.1.1.10\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"portifindex\", \".1.3.6.1.4.1.9.5.1.4.1.1.11\", \"ifname\", \"no\", \"db\", \"walk\"), (\"vlanbridgeport\", \".1.3.6.1.2.1.17.4.3.1.2\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"vlanindex\", \".1.3.6.1.4.1.9.9.46.1.3.1.1.2.1\", \"anchor\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_switch_catos (mib, oid, anchor, vlan, walk_type, method) VALUES (\"bridgetoifindex\", \".1.3.6.1.2.1.17.1.4.1.2\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"cdpcacheaddress\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.4\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cdpconnection\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.7\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.9.9.109.1.1.1.1.5.9\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"mactable\", \".1.3.6.1.2.1.17.4.3.1.1\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"portduplex\", \".1.3.6.1.4.1.9.5.1.4.1.1.10\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"portifindex\", \".1.3.6.1.4.1.9.5.1.4.1.1.11\", \"anchor\", \"no\", \"db\", \"walk\"), (\"portname\", \".1.3.6.1.4.1.9.5.1.4.1.1.4\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"porttype\", \".1.3.6.1.4.1.9.5.1.4.1.1.5\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"vlanbridgeport\", \".1.3.6.1.2.1.17.4.3.1.2\", \"ifname\", \"yes\", \"db\", \"walk\"), (\"vlanindex\", \".1.3.6.1.4.1.9.9.46.1.3.1.1.2.1\", \"anchor\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_switch_oneU (mib, oid, anchor, vlan, walk_type, method) VALUES (\"bridgetoifindex\", \".1.3.6.1.2.1.17.1.4.1.2\", \"anchor\", \"yes\", \"db\", \"walk\"), (\"cdpcacheaddress\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.4\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cdpconnection\", \".1.3.6.1.4.1.9.9.23.1.2.1.1.7\", \"anchor\", \"no\", \"db\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.9.2.1.58.0\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifalias\", \".1.3.6.1.2.1.31.1.1.1.18\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"both\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"mactable\", \".1.3.6.1.2.1.17.4.3.1.1.0\", \"anchor\", \"yes\", \"db\", \"walk\"), (\"nativevlan\", \".1.3.6.1.4.1.9.9.68.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"portduplex\", \".1.3.6.1.4.1.9.9.87.1.4.1.1.31\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"portifindex\", \".1.3.6.1.4.1.9.9.87.1.4.1.1.25\", \"ifname\", \"no\", \"db\", \"walk\"), (\"vlanbridgeport\", \".1.3.6.1.2.1.17.4.3.1.2.0\", \"anchor\", \"yes\", \"db\", \"walk\"), (\"vlanindex\", \".1.3.6.1.4.1.9.9.46.1.3.1.1.2.1\", \"anchor\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_vpn (mib, oid, anchor, vlan, walk_type, method) VALUES (\"bytesrec\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.10\", \"username\", \"no\", \"rrd\", \"walk\"), (\"bytestrans\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.9\", \"username\", \"no\", \"rrd\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.3076.2.1.2.25.1.2.0\", \"anchor\", \"no\", \"both\", \"get\"), (\"current_sessions\", \".1.3.6.1.4.1.3076.2.1.2.17.1.1.0\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifalias\", \".1.3.6.1.2.1.31.1.1.1.18\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"lan_sessions\", \".1.3.6.1.4.1.3076.2.1.2.17.1.7.0\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"max_sessions\", \".1.3.6.1.4.1.3076.2.1.2.17.1.6.0\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"privip\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.4\", \"username\", \"no\", \"db\", \"walk\"), (\"pubip\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.14\", \"username\", \"no\", \"db\", \"walk\"), (\"sessionest\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.7\", \"username\", \"no\", \"db\", \"walk\"), (\"sessionlength\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.8\", \"username\", \"no\", \"db\", \"walk\"), (\"session_type\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.5\", \"username\", \"no\", \"db\", \"walk\"), (\"username\", \".1.3.6.1.4.1.3076.2.1.2.17.2.1.3\", \"anchor\", \"no\", \"both\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_cisco_wap (mib, oid, anchor, vlan, walk_type, method) VALUES (\"active_clients\", \".1.3.6.1.4.1.9.9.273.1.1.2.1.1.1\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"cDot11AssStatsAuthenticated\", \".1.3.6.1.4.1.9.9.273.1.1.3.1.2.1\", \"anchor\", \"no\", \"rrd\", \"get\"), (\"cDot11ClientBytesReceived\", \".1.3.6.1.4.1.9.9.273.1.3.1.1.7\", \"client_type\", \"no\", \"rrd\", \"walk\"), (\"cDot11ClientBytesSent\", \".1.3.6.1.4.1.9.9.273.1.3.1.1.9\", \"client_type\", \"no\", \"rrd\", \"walk\"), (\"cDot11ClientSignalStrength\", \".1.3.6.1.4.1.9.9.273.1.3.1.1.3\", \"client_type\", \"no\", \"rrd\", \"walk\"), (\"cDot11ClientSigQuality\", \".1.3.6.1.4.1.9.9.273.1.3.1.1.4\", \"client_type\", \"no\", \"rrd\", \"walk\"), (\"client_assigned_address\", \".1.3.6.1.4.1.9.9.273.1.2.1.1.16\", \"client_type\", \"no\", \"db\", \"walk\"), (\"client_name\", \".1.3.6.1.4.1.9.9.273.1.2.1.1.13\", \"client_type\", \"no\", \"both\", \"walk\"), (\"client_type\", \".1.3.6.1.4.1.9.9.273.1.2.1.1.4\", \"anchor\", \"no\", \"both\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.9.9.109.1.1.1.1.8.1\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifalias\", \".1.3.6.1.2.1.31.1.1.1.18\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"interfacemask\", \".1.3.6.1.2.1.4.20.1.3\", \"iptoifindex\", \"no\", \"db\", \"walk\"), (\"iptoifindex\", \".1.3.6.1.2.1.4.20.1.2\", \"anchor\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_dd_wrt_wap (mib, oid, anchor, vlan, walk_type, method) VALUES (\"client_index\", \".1.3.6.1.4.1.2021.255.3.54.1.3.32.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"client_mac\", \".1.3.6.1.4.1.2021.255.3.54.1.3.32.1.1.4\", \"client_index\", \"no\", \"both\", \"walk\"), (\"cpu5min\", \".1.3.6.1.4.1.2021.10.1.5.2\", \"anchor\", \"no\", \"both\", \"get\"), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.2.2.1.2\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_hp_switch (mib, oid, anchor, vlan, walk_type, method) VALUES ('cpu5min', '1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0', 'anchor', 'no', 'both', 'get'), (\"ifadminstatus\", \".1.3.6.1.2.1.2.2.1.7\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifdescr\", \".1.3.6.1.2.1.2.2.1.2\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifhcinoctets\", \".1.3.6.1.2.1.31.1.1.1.6\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifhcoutoctets\", \".1.3.6.1.2.1.31.1.1.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifindex\", \".1.3.6.1.2.1.2.2.1.1\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifindiscards\", \".1.3.6.1.2.1.2.2.1.13\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinerrors\", \".1.3.6.1.2.1.2.2.1.14\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifinoctets\", \".1.3.6.1.2.1.2.2.1.10\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifinunknownprotos\", \".1.3.6.1.2.1.2.2.1.15\", \"ifname\", \"no\", \"none\", \"walk\"), (\"iflastchange\", \".1.3.6.1.2.1.2.2.1.9\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifname\", \".1.3.6.1.2.1.31.1.1.1.1\", \"anchor\", \"no\", \"both\", \"walk\"), (\"ifoperstatus\", \".1.3.6.1.2.1.2.2.1.8\", \"ifname\", \"no\", \"both\", \"walk\"), (\"ifoutdiscards\", \".1.3.6.1.2.1.2.2.1.19\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifouterrors\", \".1.3.6.1.2.1.2.2.1.20\", \"ifname\", \"no\", \"none\", \"walk\"), (\"ifoutoctets\", \".1.3.6.1.2.1.2.2.1.16\", \"ifname\", \"no\", \"rrd\", \"walk\"), (\"ifphysaddress\", \".1.3.6.1.2.1.2.2.1.6\", \"ifname\", \"no\", \"db\", \"walk\"), (\"ifspeed\", \".1.3.6.1.2.1.2.2.1.5\", \"ifname\", \"no\", \"db\", \"walk\"), (\"iftype\", \".1.3.6.1.2.1.2.2.1.3\", \"ifname\", \"no\", \"db\", \"walk\"), (\"mactable\", \".1.3.6.1.2.1.17.4.3.1.1\", \"mactoifname\", \"no\", \"db\", \"walk\"), (\"mactoifname\", \".1.3.6.1.2.1.17.4.3.1.2\", \"anchor\", \"no\", \"db\", \"walk\"), (\"portduplex\", \".1.3.6.1.4.1.11.2.14.11.5.1.7.1.3.1.1.5\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"portifindex\", \".1.3.6.1.4.1.11.2.14.11.5.1.7.1.3.1.1.1\", \"anchor\", \"no\", \"db\", \"walk\"), (\"portname\", \".1.3.6.1.4.1.11.2.14.11.5.1.7.1.3.1.1.3\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"porttype\", \".1.3.6.1.4.1.11.2.14.11.5.1.7.1.3.1.1.2\", \"portifindex\", \"no\", \"db\", \"walk\"), (\"vlanids\", \".1.3.6.1.2.1.17.7.1.4.3.1.1\", \"anchor\", \"no\", \"both\", \"walk\")";
$insert_table[] = "INSERT INTO snmp_template_list (template_ID, device_type_ID, template_name, template_table) VALUES (1, 1, \"Cisco CSS\", \"snmp_template_cisco_css\"), (2, 3, \"Cisco Router\", \"snmp_template_cisco_router\"), (3, 4, \"Cisco Switch (Cat IOS)\", \"snmp_template_cisco_switch_catios\"), (4, 4, \"Cisco Switch (Cat OS)\", \"snmp_template_cisco_switch_catos\"), (5, 6, \"Cisco Switch (One U)\", \"snmp_template_cisco_switch_oneU\"), (6, 2, \"Cisco PIX\", \"snmp_template_cisco_pix\"), (7, 7, \"Cisco WAP\", \"snmp_template_cisco_wap\"), (8, 5, \"Cisco VPN\", \"snmp_template_cisco_vpn\"), (9, 8, \"Cisco Switch (Cat IOS Layer 3)\", \"snmp_template_cisco_switch_catios\"), (10, 8, \"Cisco Switch (Cat OS Layer 3)\", \"snmp_template_cisco_switch_catos\"), (11, 9, \"hp_procurve_switch\", \"snmp_template_hp_switch\"), (12, 10, \"dd-wrt wap\", \"snmp_template_dd_wrt_wap\")";
$insert_table[] = "INSERT INTO vpn_session_type (session_type_ID, session_type) VALUES (1, \"pptp\"), (2, \"l2tp\"), (3, \"ipsec\"), (4, \"http\"), (5, \"ftp\"), (6, \"telnet\"), (7, \"snmp\"), (8, \"tftp\"), (9, \"console\"), (10, \"debugTelnet\"), (11, \"debugConsole\"), (12, \"other\"), (13, \"ike\"), (14, \"l2tpOverIpSec\"), (15, \"ipsecLanToLan\"), (16, \"ipsecOverUdp\"), (17, \"ssh\"), (18, \"vcaLanToLan\"), (19, \"ipsecOverTcp\"), (20, \"pppoe\"), (21, \"ipsecOverNatT\"), (22, \"ipsecLan2LanOverNatT\"), (23, \"l2tpOverIpsecOverNatT\"), (24, \"userHttps\"), (25, \"pop3s\"), (26, \"imap4s\"), (27, \"smtps\"), (28, \"httpsTunnel\")";
$insert_table[] = "INSERT INTO wap_client_type (client_type_ID, client_type) VALUES (1, \"unknown\"), (76, \"ethernetAP\"), (77, \"ethernetBridge\"), (84, \"pc3000Client\"), (85, \"serialUC\"), (86, \"ethernetUC\"), (101, \"pc3500Client\"), (102, \"pc4500Client\"), (104, \"generic80211Client\"), (109, \"pc4800Client\"), (110, \"pc3100Client\"), (111, \"mc\"), (112, \"ethernetClient\"), (117, \"pc4800bClient\"), (123, \"wgbNoDiversity\"), (124, \"wgb\"), (127, \"series350Client\"), (128, \"series370Client\"), (129, \"c1100SeriesAP\"), (130, \"c1410SeriesBridge\"), (132, \"c1200SeriesAP\"), (133, \"mp2xClient\"), (134, \"c350SeriesAP\"), (135, \"cb21agClient\"), (136, \"radioKodiak\"), (137, \"c1130SeriesAP\"), (138, \"c1310SeriesBridge\"), (139, \"c7920phone\"), (140, \"c1240SeriesAP\")";

$alter_table = array();

$alter_table[] = "ALTER TABLE account ADD CONSTRAINT account_ibfk_1 FOREIGN KEY (provider_ID) REFERENCES provider (provider_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE circuits ADD CONSTRAINT circuits_ibfk_1 FOREIGN KEY (account_ID) REFERENCES account (account_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE cpus ADD CONSTRAINT cpus_ibfk_1 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE css_cr ADD CONSTRAINT css_cr_ibfk_1 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE, ADD CONSTRAINT css_cr_ibfk_2 FOREIGN KEY (owner_ID) REFERENCES css_owner (owner_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE css_owner ADD CONSTRAINT css_owner_ibfk_1 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE css_sv ADD CONSTRAINT css_sv_ibfk_1 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE devices ADD CONSTRAINT devices_ibfk_5 FOREIGN KEY (device_type_ID) REFERENCES device_type (device_type_ID), ADD CONSTRAINT devices_ibfk_6 FOREIGN KEY (location_ID) REFERENCES location (location_ID), ADD CONSTRAINT devices_ibfk_7 FOREIGN KEY (template_ID) REFERENCES snmp_template_list (template_ID)";
$alter_table[] = "ALTER TABLE interfaces ADD CONSTRAINT interfaces_ibfk_17 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE, ADD CONSTRAINT interfaces_ibfk_18 FOREIGN KEY (iftype_ID) REFERENCES interface_type (iftype_ID), ADD CONSTRAINT interfaces_ibfk_19 FOREIGN KEY (circuit_UID) REFERENCES circuits (circuit_UID)";
$alter_table[] = "ALTER TABLE location ADD CONSTRAINT location_ibfk_1 FOREIGN KEY (priority_ID) REFERENCES location_priority (priority_ID)";
$alter_table[] = "ALTER TABLE outage ADD CONSTRAINT outage_ibfk_1 FOREIGN KEY (provider_ID) REFERENCES provider (provider_ID), ADD CONSTRAINT outage_ibfk_2 FOREIGN KEY (location_ID) REFERENCES location (location_ID), ADD CONSTRAINT outage_ibfk_3 FOREIGN KEY (device_ID) REFERENCES devices (device_ID), ADD CONSTRAINT outage_ibfk_4 FOREIGN KEY (rfo_ID) REFERENCES outage_rfo (rfo_ID), ADD CONSTRAINT outage_ibfk_5 FOREIGN KEY (circuit_UID) REFERENCES circuits (circuit_UID)";
$alter_table[] = "ALTER TABLE outage_history ADD CONSTRAINT outage_history_ibfk_1 FOREIGN KEY (outage_ID) REFERENCES outage (outage_ID)";
$alter_table[] = "ALTER TABLE user_data ADD CONSTRAINT user_data_ibfk_1 FOREIGN KEY (location_ID) REFERENCES location (location_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE user_groups ADD CONSTRAINT user_groups_ibfk_1 FOREIGN KEY (user_ID) REFERENCES user_data (user_ID) ON DELETE CASCADE";
$alter_table[] = "ALTER TABLE vpn_sessions ADD CONSTRAINT vpn_sessions_ibfk_3 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE, ADD CONSTRAINT vpn_sessions_ibfk_4 FOREIGN KEY (session_type_ID) REFERENCES vpn_session_type (session_type_ID)";
$alter_table[] = "ALTER TABLE wap_clients ADD CONSTRAINT wap_clients_ibfk_2 FOREIGN KEY (device_ID) REFERENCES devices (device_ID) ON DELETE CASCADE, ADD CONSTRAINT wap_clients_ibfk_3 FOREIGN KEY (client_type_ID) REFERENCES wap_client_type (client_type_ID)";

?>
Return current item: Network Managment / Inventory System