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

Re: A couple of questions



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 25 April 2002 04:11 pm, Adam \"Tauvix\" Debus wrote:
> Hello! Are you sick of hearing from me yet? :)
>
> I've got a couple, hopefully quick, 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.

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

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)

>
> 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?

> 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?

> Thanks,
>
> Adam "Tauvix" Debus
> Network Administrator, ReachONE Internet
> adam@reachone.com

- -- 
+---------------------------------+----------------------------+
| Hitesh Patel                    |  Lead Developer            |
| hitesh@presys.com               |  NorthStar                 |
+---------------------------------+----------------------------+
| NorthStar: http://www.brownkid.net/NorthStar/                |
| PGP Key:   http://www.brownkid.net/pgpkey.asc                |
+--------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE8yHxmCws8KqPtd2URAg8AAJ43Pa/AduPYMF4bN0H5aAk3Nh4HDgCWPrYu
inMrsyIICVn2xqCtU7kt7A==
=K8br
-----END PGP SIGNATURE-----