ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to write a sniffer in linux can you guys please help me that
1) which is the best IDE should I use
2) which libraries will help me in writing a sniffer
3) what are the things I should consider before start programming
4) I want to use command line interface so which library e.g; ncurses will be best for it?
When you say "sniffer" do you mean a packet sniffer? You haven't mentioned what language you wish to code in? This will influence the answers to the rest of the questions.
As has been stated, you can either use the pcap library (much of the work has been done for you here) or implement ethernet-level sockets (you do a lot of wheel-reinventing here).
Is yet another packet sniffer really necessary? Why not help improve an already existing sniffer?
If you want an interactive command line interface, you might use some form of curses. Personally, I would use normal I/O to and from stdout and stdin for a base program (if it might be interactive at all). I might write frontends in ncurses and perhaps a GUI toolkit.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.