ndptools network drawing perl tools 7 Sept 1996 Tamara Munzner ================================================== as2asname.perl: (no args) filter to add asnames to an ndt format file containing src_as, dst_as values. note: embedded data is now obsolete! as2iwb.perl: (no args) turn ndtfile with {src|dst}_as pairs into an unmodified gem file. as correlations is lost, only layout is possible. somewhat obsolete given eh's modifications to gem. cache2edge.perl: (args: key [max]) turn NLANR squid web cache summary log files as made by access-summary.perl into ndtformat. key is short name of cache: {sd|xv|bo|uc|pb|it|dc}. optional max argument ties traffic_percent to this absolute max instead of in relation to daily totals. deg2dec2.perl: (no args) trivial filter for turning minutes into decimal parts of degrees. many sources have lat/longs in degree, minute format. Foo City, State 40 50 112 23 ---> Foo City, State 40.833 112.38 edge2gv.perl: convert ndtformat edge pairs with lat/long info into arcs on globe in Geomview format. creates separate geometry objects based on "geom" tag if it exists and it's asked to make a "gv" file. (args: outstyle={gv|oogl} gv can be highlighted using mbone.perl, oogl is good for flipbook animations or conversion into VRML. arcstep=int default 10. number of segements to use for each arc. known bug: this number must be even! srcreach=float dstreach=float default 1.6 how far to draw each arc, in spherical distance from endpoint. 1.6 default means all arcs guaranteed to meet in the middle, since diameter of earth is 3.14. htmldoc=string default "default.html" name of href to use as base. the output oogl/gv file contains hypertext references to this document. in addition to the stdout oogl/gv file, a "default.html" file is generated. this should be copied to the correct destination as specified by the string. ) all args are optional and can be specified in any order as name=val. grouper.perl: args add group tags to ndtfile based on regular expression arguments and input. groups are only based on values of a single tag can have more than one set of arguments (see linegrouper.perl for grouping based on multiple tags) input: NDP format (lines of name/value pairs on stdin) "tag=value" "name={~|\!}regexp" sets of arguments on command line (note that you need "=\!" instead of just "=!" to get it by shell..) output: NDP format, adding "tag=value" pair for lines where "name" matches the regular expression if pair was "name=~regexp" or name doesn't match if pair was "name=!regexp". usage: can colorize based on tag values, can declare groups which geometry converters can use to create separate objects, etc. linegrouper.perl: args create group tags based on regexp input specifically for groups based on multiple tag values. can only have one set of arguments per invocation. (see also grouper.perl which groups based on value of a single tag) input: NDP format (lines of name/value pairs on stdin) "tag=value" "name=" "name2=" ... "namek=" output: NDP format, adding "tag=value" pair for lines where ALL name/regexp values match usage: can create groups, colorize based on multitag criteria. growtunnels.perl: (no args) simple example of the srcreach/dstreach arguments for edge2gv.perl, creates oogl flipbook files of "growing" tunnels arcs which finally meet in the middle. hostresolve.perl: (no args) add srclat/srclong/dstlat/dstlong tags to ndtfile based on Netinfo/{name2place,place2latlong} databases. need srchost/dsthost tags in input file. does not handle ip addresses. mbone.perl: (no args) geomview external module. should run with any version of geomview. creates geomview display window to show hypertext information encoded in oogl or gv file created by edge2gv.perl. if file is in gv format, will highlight arcs that the user clicks on. usage: geomview gvfile -run mbone.perl mtrace2edge.perl: (no args) creates ndtfile from output of "mtrace -s". to be used in a pipeline. mtraceit: sample pipeline starting with mtrace2edge.perl ndp2fe.perl: (by Stuart Levy) Usage: $0 [-ndp] [minorder] [file.fe.dmp] [file.ndp] Reads a .ndp file, possibly preceded by an Evolver dump file. Without -ndp, writes a new Evolver .fe file, incorporating vertex positions from the given .fe.dmp file if any; other vertex positions are random. With -ndp, writes a new .ndp file with "position=x y z" tags for each node where the .fe.dmp file had one. If integer "minorder" given, we emit only nodes with at least that many neighbors in the graph. Important: we assume (and can't check) that we're fed the same .ndp file for each step of this process. ndp2gv.perl: convert ndtformat edge pairs to Geomview format. input should have position information in 3D space, not on the surface of a sphere. output is straight lines with spheres at the endpoints. see edge2gv.perl for more info on args. (args: drawstyle={fe|gem3d} default fe outstyle={gv|oogl|fast} default gv "fast" optimized for oogl animator flipbook, has no hypertext info sphererad=float default 1.0 radius of spheres. right value depends on scale of input htmldoc=string default $drawstyle.html ) all args are optional and can be specified in any order as name=val. percentcolor.perl: (no args) add color output tag given traffic_percent input tag. color is along red-blue color ramp, scaled nonlinearly. trace2edge.perl: (no args) it's not what you thing -- doesn't just take traceroutes and give ndtformat! hack for specific file format kc supplied with traceroutes from NLANR hosts. tunnel2edge.perl: (no args) turn mbone tunnels into ndtformat. tunnels should be in the "map -l" format as available from "telnet mwatch.cl.cam.ac.uk 6666" or http://www.cl.cam.ac.uk:80/mbone or wrladdglobe.perl: (no args) trivial script to stick a globe reference into a VRML file created by edge2gv.perl outstyle=oogl | oogl2vrml. path string depends on your filesystem.