[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions



----- Original Message -----
From: "Hitesh Patel" <hitesh@presys.com>
To: "Adam "Tauvix" Debus" <northstar@delsol.net>;
<northstar-devel@brownkid.net>
Sent: Thursday, April 25, 2002 3:00 PM
Subject: Re: A couple of questions


> >
> > 1) I'm working on creating a perl script that will take the data in the
> > database (mysql) and turn it into reverse DNS (IN-ADDR.ARPA) files.  I
> > notice that you hash the IP Address into an integer (the logic of which
is
> > supplied in the contrib directory in the CVS version). I was wondering
if
> > you have the logic for turning that number back into an IP address, or
if
> > that is even possible. Another thought I had was the possibility of
using
> > the "label" field of the networks column, and executing a split on the
'/'
> > character. If this were something that you would want to distribute in
the
> > contrib directory, what would be your prefered method to maintain the
most
> > compatibility with future versions?
>
> All the IP manipulation functions are in Util.pm and can be found with
> function names beginning with "IP_".  The IP_IntToDQ (Integer to
dotted-quad)
> function is probably what your looking for.

    Great! Thanks.

>
> You can use the label field.. I dont see it going away any time soon.

    Okay, I will continue down that path then :)

>
> I wouldn't mind putting it in the contrib directory at all once it is
> complete.. you could also look into writing as a module (the module
> documentation should be online soon)

    My plan currently is to get it working first, and then make it pretty :)

>
> >
> > 2) If I add a view, and then try to use the java applet, it comes back
with
> > an exception: "java.lang.NumberFormatException: <HTML>"
> >
>
> What browser and version of Java are you using?

    This was in Internet Explorer, with the most recent java JRE off of
java.sun.com.

>
> > 3) And speaking of views, I'm looking at the possibility of modifying
the
> > vew system so that there is a "Master View" (Default View) that can see
all
> > networks all the time, and then "Sub-Views" that
networks/subnets/addresses
> > can belong to, for example a DSL view or a T1 Customer view. In addition
to
> > this the ability to switch the view a Network/Subnet/Address belongs to,
as
> > well as the possibility for them to belong to more then one view. This
> > would probably involve a move to a binary form of View IDs (1, 2, 4, 8,
16,
> > 32, 64...) so that you could still store the view ID(s) in a single
field
> > (Example, View ID # of 7 means that it belongs to View 1, 2, and 4)...
Any
> > thoughts on where to begin looking at this?
> >
>
> View.pm contains all the view functions and should be a good place to
start.
> Maybe and easier way to do it would be just just a view 'groups' table and
> set the first group to include all views by default.. then you could
create a
> group on demand and add whichever views you wanted to it... what do you
> think?

    That might work. I'll look into the View.pm file and see how things are
happening there. I still think you will end up running into a problem when
you have one network/subnet/address that you need/want to be in 2 different
views at the same time.

Thanks,

Adam