Thanks for the script... however, there are a lot of differences from your
version to the one in docs/

I was wondering how much of these are meaningful?  Luckily I know quite
about SQL, albeit not much about MySQL... in the future, it would be helpful
if you could reduce the changes to the bare minimum...

The default NULL and the drop table, plus the comments I'm ok with...
(Basically in my experience, this is what happens when you let the DBMS
auto-generate a script - it puts all the optional stuff in...)

     INT vs int(11)  -- shouldn't matter, that's probably the default int
format (11 digits) in whatever version you're running.

     TYPE=MyISAM; on each table -- don't know that one...  I'll assume it's
not meaningful..

So, all that aside, the meaningful part of the diff is this:

--- mySQLdefs.txt       Wed Jan  2 02:17:05 2002
+++ mySQLdefs.txt.2     Wed May 22 21:31:52 2002
@@ -23,12 +23,12 @@
      (
      IPaddress            CHAR(16) NOT NULL,
-     TCPsentLocally       INT,
-     TCPsentRemotely      INT,
-     TCPrcvdLocally       INT,
-     TCPrcvdFromRemote    INT,
-     UDPsentLocally       INT,
-     UDPsentRemotely      INT,
-     UDPrcvdLocally       INT,
-     UDPrcvdFromRemote    INT,
+  TCPSentLoc int,
+  TCPSentRem int,
+  TCPrcvdLoc int,
+  TCPrcvdFromRem int,
+  UDPSentLoc int,
+  UDPSentRem int,
+  UDPrcvdLoc int,
+  UDPrcvdFromRem int,
      ICMPsent             INT,
      ICMPrcvd             INT,

Which is just a few field name changes...

Anybody have preferences (code is in sql.c ~194) --- if nobody squawks, I'll
update the .txt file tomorrow...

-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Ricardo Jorge
Sent: Wednesday, May 22, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: [Ntop-dev] Field error in IPTraffic Table


Hi there !

        When I try to save (using UDP connection) from NTOP to an ODBC database,
some
errors happened and I've found that some fields in the IPTraffic are
incorrect (I mean : what was defined in the /database dir in the
MySQLdefs.txt file) .

        As soon as I fixed it, I was able to save to my database.

        I am sending the correct tables below. I hope this help.

        Thank you all for this incredible tool.


                        Ricardo Jorge

P.S.    I also developed a small module using Tcl to receive the UDP connection
and save SQL statements into an ODBC database. If someone think this could
help, I can send it to the list.

----------------------------------------------------------------------------
----

# phpMyAdmin MySQL-Dump
# version 2.2.5
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# M�quina: 127.0.0.1
# Data de Cria��o: 22-Mai-2002 �s 10:12
# Vers�o do servidor: 3.23.46
# vers�o do PHP: 4.1.1
# Base de Dados : `NTOP`
# --------------------------------------------------------

#
# Estrutura da tabela `Hosts`
#

DROP TABLE IF EXISTS Hosts;
CREATE TABLE Hosts (
  ID int(11) NOT NULL auto_increment,
  IPaddress char(16) NOT NULL default '',
  MACaddress char(50) default NULL,
  NICvendor char(32) default NULL,
  OsName char(50) default NULL,
  PktRcvd int(11) default NULL,
  PktSent int(11) default NULL,
  PktMulticastSent int(11) default NULL,
  PktBroadcastSent int(11) default NULL,
  DataSent int(11) default NULL,
  DataRcvd int(11) default NULL,
  FirstSeen datetime default NULL,
  LastSeen datetime default NULL,
  DataMulticastSent int(11) default NULL,
  DataBroadcastSent int(11) default NULL,
  PRIMARY KEY  (ID),
  KEY ID (ID)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Estrutura da tabela `IPtraffic`
#

DROP TABLE IF EXISTS IPtraffic;
CREATE TABLE IPtraffic (
  IPaddress char(16) NOT NULL default '',
  TCPSentLoc int(11) default NULL,
  TCPSentRem int(11) default NULL,
  TCPrcvdLoc int(11) default NULL,
  TCPrcvdFromRem int(11) default NULL,
  UDPSentLoc int(11) default NULL,
  UDPSentRem int(11) default NULL,
  UDPrcvdLoc int(11) default NULL,
  UDPrcvdFromRem int(11) default NULL,
  ICMPsent int(11) default NULL,
  ICMPrcvd int(11) default NULL,
  OSPFsent int(11) default NULL,
  OSPFrcvd int(11) default NULL,
  IGMPsent int(11) default NULL,
  IGMPrcvd int(11) default NULL,
  PRIMARY KEY  (IPaddress)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Estrutura da tabela `NameMapper`
#

DROP TABLE IF EXISTS NameMapper;
CREATE TABLE NameMapper (
  IPaddress char(16) NOT NULL default '',
  Name char(50) default NULL,
  PRIMARY KEY  (IPaddress)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Estrutura da tabela `NonIPTraffic`
#

DROP TABLE IF EXISTS NonIPTraffic;
CREATE TABLE NonIPTraffic (
  IPaddress char(16) NOT NULL default '',
  IPXsent int(11) default NULL,
  IPXrcvd int(11) default NULL,
  OSIsent int(11) default NULL,
  OSIrcvd int(11) default NULL,
  DLCsent int(11) default NULL,
  DLCrcvd int(11) default NULL,
  ARPsent int(11) default NULL,
  ARPrcvd int(11) default NULL,
  DECNETsent int(11) default NULL,
  DECNETrcvd int(11) default NULL,
  ATALKsent int(11) default NULL,
  ATALKrcvd int(11) default NULL,
  NBIOSsent int(11) default NULL,
  NBIOSrcvd int(11) default NULL,
  OtherSent int(11) default NULL,
  OtherRcvd int(11) default NULL,
  PRIMARY KEY  (IPaddress)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Estrutura da tabela `TCPsessions`
#

DROP TABLE IF EXISTS TCPsessions;
CREATE TABLE TCPsessions (
  Client char(18) default NULL,
  Server char(18) default NULL,
  ClientPort int(11) default NULL,
  ServerPort int(11) default NULL,
  DataSent char(16) default NULL,
  DataRcvd char(16) default NULL,
  FirstSeen datetime default NULL,
  LastSeen datetime default NULL,
  ID int(11) NOT NULL auto_increment,
  PRIMARY KEY  (ID),
  KEY ID (ID)
) TYPE=MyISAM;


_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to