If you look in ntop.h, around 890, the variable in the structure is
"droppedPkts", so the line in rmonPlugin should be

    case ETHERSTATSDROPEVENTS:

        long_ret = (long)(device[ifNum].droppedPkts);
        return (unsigned char *) &long_ret;

instead of

    case ETHERSTATSDROPEVENTS:

        long_ret = (long)(device[ifNum].droppedPackets);
        return (unsigned char *) &long_ret;

Also, there are commented out lines in Makefile.in for the rmon (and wap)
plugins.  Just find them and uncomment (be careful of \s).  Then once you
run configure, it will automatically enable them.

I guess it would be nicer to have --enable-rmon-plugin
and --enable-wap-plugin options...

-----Burton



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Raul Alonso Alvarez
Sent: Thursday, February 14, 2002 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop-dev] Hacking rmonPlugin


On Wed, 13 Feb 2002, PIERRE-LOIC BAUDET wrote:

> However, you said you were able to get rmonPlugin to
> work. Wow, how did you do ? I would be so interested in
> installing this plugin (and I think I am not the only
> one). Did you follow what is written at
> http://snapshot.ntop.org/faq.php#44 or did you do
> something else ???


  This is how i've done it:

  - Installed the ucd-snmp package as the FAQ#44 says (but
  make sure you compile the shared version of the libs instead
  of the static ones built by default).

  - Edit the Makefile in plugins directory (obviously after
  running the configure script) and replace one of the active
  plugins name (say icmpPlugin) with rmonPlugin (replacing all
  the occurrences of the string is ok). Make sure the HAVE_SNMP
  directive is enabled, if not add it to CFLAGS.


  - Run make. You'll probably get an error about an unknow var
  (droppedpackets or something like that), since i don't need
  that info i just commented that line out. After that it compiled
  fine on my Linux box (Slackware 8) but the  generated file (.so) it's
  not a valid one. Fortunately i linked it manually and worked

  gcc -shared rmonPlugin.lo -lsnmp -lucdagent -lucdmibs -o rmonPlugin.so

        Delete the old rmonPlugin.so first


  - Copy rmonPlugin.so to the plugins directory
(/usr/local/lib/ntop/plugins)


  - Run ntop and you should see rmon under the plugins section.



        Maybe i'm missing something but i'm pretty sure that's all i did.



  Good luck!

--

 Raul Alonso Alvarez
 [EMAIL PROTECTED]


        Fortune of the day:

        Pardon me, sir, but you've obviously mistaken me for someone who gives a
shit.

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

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

Reply via email to