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

Re: How do I find out the list of active network objects?



> 
> Hi Steve,
> 
> Thanks for the explanation of the /proc/net/decnet file ... makes MUCH
> more sense now! (actaully, there's some stuff I can use in there instead
> of multiple instances of 'if (debug) printf("...");' !)
> 
> Is there any way to find out which network objects the listening sockets
> in the /proc/net/decnet are related to ?
> 
Not at the moment.

> For instance, if I have five different programs running, each of which
> bind to a different named object, and I look at the /proc/net/decnet
> file, and see only four open sockets with the remote side unassigned,
> how do I know WHICH of the five isn't working ... ?
> 
> Any chance we could get the related local object (name|number) back into
> the format, like in Reinhard's example ? The port number doesn't mean
> much to me, whereas the object name (or number if not 0) would be REALLY
> useful.
> 
> Doesn't even have to be in that file ... maybe a new file with just the
> open/listening ports and their associated DECnet objects?
> 
If it goes back, then I think that is the file it should go into. As
Patrick says, the file should be standardised shortly to allow a DECnet
version of netstat to be written. The main reason I had for not putting
the object information into /proc/net/decnet was that it might be a security
risk if everyone on the system could see it. However since the other socket
families show this information, I think it is probably not such a problem.
I'll try and remember to add it in the next patch.

> There's no NCP support (yet ;-)), but if you have any other suggestions
> on how I can find out this kind of information, that would be useful too
> ...
>
>From the actual applications themselves, you can use getsockopt() to get
information on the state of the sockets. You can also use getsockname()
to get the local socket address, and getpeername() to get the remote
address,

Steve.
 
-----------------------------------------------------------------------------
To unsubscribe from this list, send a mail to majordomo@dreamtime.org
containing the line "unsubscribe linux-decnet"
-----------------------------------------------------------------------------