Index: trunk/klask
===================================================================
--- trunk/klask	(revision 388)
+++ trunk/klask	(revision 389)
@@ -10,5 +10,5 @@
 use strict;
 use warnings;
-use version; our $VERSION = qv('0.7.6');
+use version; our $VERSION = qv('0.7.7');
 
 use Readonly;
@@ -76,5 +76,5 @@
    'searchdb'             => \&cmd_searchdb,
    'removedb'             => \&cmd_removedb,
-   'addentrydb'           => \&cmd_addentrydb,
+   'insertdb'             => \&cmd_insertdb,
    'cleandb'              => \&cmd_cleandb,
    'search'               => \&cmd_search,
@@ -288,5 +288,5 @@
    $ret{'ipv4_address'} = inet_ntoa($packed_ip);
    #if ($ret{'ipv4_address'} !~ m/$RE_IPv4_ADDRESS/) {
-   #   print "Error: for computer $param_ip_or_host on interface $interface, IP $ret{'ipv4_address'} is not valide\n";
+   #   print "Error: for computer $param_ip_or_host on interface $interface, IPv4 $ret{'ipv4_address'} is not valide\n";
    #   return %ret;
    #   }
@@ -1197,5 +1197,6 @@
  klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] [--no-rebuildsw|-R]
  klask exportdb [--format|-f txt|html]
- klask removedb IP* computer*
+ klask removedb ipv4_addr* computer*
+ klask insertdb --ip ipv4_addr --mac mac_addr --network vlan_name
  klask cleandb  [--verbose|-v] --day number_of_day --repair-dns
 
@@ -1573,5 +1574,5 @@
 
 #---------------------------------------------------------------
-sub cmd_addentrydb {
+sub cmd_insertdb {
    my @ARGV = @_;
 
@@ -1609,10 +1610,10 @@
 
    if ($resol_arp{'hostname_fq'} eq 'unknow') {
-      print {*STDERR} "Error: DNS name not defined for IP $ip (mandatory)\n";
+      print {*STDERR} "Error: DNS name not defined for IPv4 $ip (mandatory)\n";
       exit 1;
       }
 
    if ($resol_arp{'ipv4_address'} ne $ip) {
-      print {*STDERR} "Error: IP DNS resolution strange between $ip and $resol_arp{'ipv4_address'}\n";
+      print {*STDERR} "Error: IPv4 DNS resolution strange between $ip and $resol_arp{'ipv4_address'}\n";
       exit 1;
       }
@@ -1624,5 +1625,5 @@
    for my $current_ip (keys %{$computerdb}) {
       if ($current_ip eq $ip) {
-         print {*STDERR} "Error: IP $ip already exists in the computer database\n";
+         print {*STDERR} "Error: IPv4 $ip already exists in the computer database\n";
          exit 1;
          }
@@ -2849,5 +2850,5 @@
    print <<'END_HTML';
 <table class="sortable">
- <caption>Klask Free IP Database</caption>
+ <caption>Klask Free IPv4 Database</caption>
  <thead>
   <tr>
@@ -3426,5 +3427,6 @@
  klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] [--no-rebuildsw|-R]
  klask exportdb [--format|-f txt|html]
- klask removedb IP* computer*
+ klask removedb ipv4_addr* computer*
+ klask insertdb --ip ipv4_addr --mac mac_addr --network vlan_name
  klask cleandb  [--verbose|-v] --day number_of_day --repair-dns
 
@@ -3469,5 +3471,5 @@
 so other switch cannot find the real downlink port...
 One way to work around this problem is, if you have a computer directly connected on the switch,
-to put this IP as the fake ip for the switch.
+to put this IPv4 as the fake ip for the switch.
 The MAC address associated will be use just for the map detection.
 The C<fake-ip> parameter is defined in the config file.
@@ -3549,5 +3551,5 @@
 The network parameter C<scan-mode> can have two values: C<active> or C<passive>.
 By default, a network is C<active>.
-This means that an C<fping> command is done at the beginning on all the IP of the network
+This means that an C<fping> command is done at the beginning on all the IPv4 of the network
 and the computers that was not detected in this pass, but where their Klask entry is less than one week,
 will have an C<arping>
@@ -3571,11 +3573,23 @@
 =head2 removedb
 
- klask removedb IP* computer*
+ klask removedb ipv4_addr* computer*
 
 This command remove an entry in the database.
-There is only one kind of parameter, the IP of the computers to be removed.
-You can put as many IP as you want...
+There is only one kind of parameter, the IPv4 of the computers to be removed.
+You can put as many IPv4 as you want...
 
 Computer DNS names are also a valid entry because a DNS resolver is executed at the beginning.
+
+=head2 insertdb
+
+ klask insertdb --ip ipv4_addr --mac mac_addr --network vlan_name
+
+This command insert an entry in the database.
+The IPv4 must not exist previously in the database
+and the DNS resolution name muts be active.
+
+The date or timestamp of the entry will be C<number_of_day> in the past (see L<cleandb>)
+from today or from the oldest entry with the same MAC-Address.
+This command can be use to add pseudo entry and help in the process to detect bad vlan configuration (see L<bad-vlan-id>).
 
 =head2 cleandb
@@ -3587,5 +3601,5 @@
 This could be configure with the global regex parameter C<float-regex> in the configuration file F</etc/klask/klask.conf>.
 This functionality could be use when computer define in VLAN 1
-could have a float IP when they are connected on VLAN 2.
+could have a float IPv4 when they are connected on VLAN 2.
 In the Klask database, the float DNS entries are less important.
 
@@ -3639,5 +3653,5 @@
  klask ip-free [--verbose|-v] [--day|-d days-to-death] [--format|-f txt|html] [vlan_name]
 
-This command return IP address that was not use (detected by Klask) at this time.
+This command return IPv4 address that was not use (detected by Klask) at this time.
 The list returned could be limited to just one VLAN.
 IP returned could have been never used or no computer have been detected since the number of days specified
@@ -3648,5 +3662,5 @@
    days-to-death: 730
 
-Computer that does not have the good IP but takes a float one (see L</cleandb>) are taken into account.
+Computer that does not have the good IPv4 but takes a float one (see L</cleandb>) are taken into account.
 
 
@@ -3657,5 +3671,5 @@
 This command return a list of switch port that are not configure with the good VLAN.
 Computer which are in bad VLAN are detected with the float regex parameter (see L</cleandb>)
-and another prior trace where they had the good IP (good DNS name).
+and another prior trace where they had the good IPv4 (good DNS name).
 The computer must stay connected on a bad VLAN more than XX days (15 days by default) before alert.
 This parameter could also define in the configuration file F</etc/klask/klask.conf> (see L</CONFIGURATION>).
