Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Add reverse or PTR record column #4

Open
altmas5 opened this issue Nov 15, 2012 · 3 comments
Open

Add reverse or PTR record column #4

altmas5 opened this issue Nov 15, 2012 · 3 comments
Assignees

Comments

@altmas5
Copy link
Collaborator

altmas5 commented Nov 15, 2012

Add a new column showing the PTR record of the client's IP address.
Wich would be the lightest way of doing this avoiding to make a dns lookup each second?

@fr3nd
Copy link
Owner

fr3nd commented Nov 16, 2012

I'd rather add it in the same column as it's currently displaying the ip address. However this should not penalize the performance of the display... To do so I'd suggest to do the following:

  • Use some sort of dns cache and cache each entry once it's done. This cache does not need to be persistent and can be stored just in memory. I think there are some implementations already done in python but it should not be so difficult to implement a new one.
  • Each dns query should be asynchronous so it does not stop the main loop. If we still don't have the name resolved when the screen is updated, the ip address should be displayed instead.

thoughts?

@altmas5
Copy link
Collaborator Author

altmas5 commented Nov 16, 2012

It sounds wise.
The main challenge is to do the queries in an asynchronous way.

When you say "If we still don't have the name resolved when the screen is updated, the ip address should be displayed instead.", Do you mean the IP address should be replaced with the reverse once it is resolved?
I think it would be better to show both when possible (some IPs don't have a PTR record).

You can assign me this issue if you want to.

@fr3nd
Copy link
Owner

fr3nd commented Nov 22, 2012

I don't think it makes sense to add a new column to show the same information. At the end what you want to know is the host who is doing the connection, so if you can resolve the fqdn then it should be printed. Otherwise just print the ip.

Also, a commandline parameter to disable this feature would be nice.

@ghost ghost assigned altmas5 Nov 22, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants