Re: nslook problem?

James Song (jsong@nlc.com)
Fri, 24 Mar 95 08:52:33 PST

> Hi!
>
> On Thu, 23 Mar 95 10:41:47 PST,
> jsong@nlc.com (James Song) said:
>
> James> Nslook returned an error message saying "can not lookup" this
> James> device. But I wrote a small program to use gethostbyname() to
> James> query the IP address and the program successfully got the IP
> James> address. Then I check the source code for nslook in clock.c. I
> James> did not find anything different from my own program. Yet
> James> nslook always failed to find the device. I just don't
> James> understand what's in scotty that fails the function
> James> gethostbyname(). I would appreciate any help.
>
> I don't think that there is anything in scotty that should be able to
> change the behaviour of gethostbyname(). But I guess that your program
> does not call ined_addr to test whether the argument is an IP address
> or a hostname. Perhaps you can step through nslook with a debugger to
> see if gethostbyname() is actually called.
>
> Juergen
>
I did step through nslook and saw that gethostbyname always returned a
null pointer for that device. Since I really want the functionality in
tkined, I copied the whole function into tkined and it worked all right
there.

I probably should explain why I want the functionality in tkined. I feel
that when the user create a node, he/she can just enter either a name or
an IP address. The platform can figure out the other part. So I copied
the nslook source code into objects.c and created a command called hostinfo
for tkined. After the user edits the attributes for the node, the hostinfo
is called if only one of two attributes is empty. The empty attribute will
be set if hostinfo returns a hostname or an address. The command will not
be used if either both attributes are set or empty.

I really want to use tkined as an NMS platform. I got the package one week
ago and I have to say that I like it very much. I have made some modifications
to tkined. I want to simplify graphical functionalities in tkined. For example
I removed Tool bar and put a create command in the Edit menu for creating
nodes and other objects. Each time a user selectes the create menu item,
he/she can only create one object. I made double click of button 1 as the default
object selection to replace the selection scheme of using select button in Tool
bar and click of button 3. The press of button 3 on a node will always invoke
the attribute edit. The press and movement of button 2 on an object is used to
move the object. The reason behind these modifications is that the user of an
NMS platform is mainly interested in monitoring the status of the network and
devices, applying various controls to the networks and devices, etc. The
graphic functionalities are used only to set up the network map. With
simplified graphical functionalities, the user will have easier time to memberize
them also with less confusion.

Well, I just share my feeling for tkined. I hope to hear more from Juergen and
other users of tkined.

Best regards,

--James

P.S. The other day, I noticed that straps was running away. I had to kill it.
I have not found time to investigate. I wonder if other people have a
similar experience.