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.
you could do a netstat on the local machine from a secure shell and it would show you what connections the user currently has established...
basically, you could make a simple program which uses netstat and logs all connections open on the local machine... you could even create some kinda web-based front end with graphs using LAMP... LOL...
if you only care about web traffic, and you wanna monitor your entire lan from a central location, you could install a transparent proxy server on the network (if you have control over the router) and instruct the proxy to log everything...
what to do if i dont want to use netstat...
can i not write my own program that creates these log files...actually it's a matter of success of my mini-project....
thanx in advance for giving idea of netstat...
Last edited by gajaykrishnan; 07-30-2004 at 12:18 PM.
before you can go and write a network sniffer, you need to learn the sockets api. i suggest 'unix network programming' by W Richard Stevens. that will introduce you to raw sockets towards the end, and some googling will teach u the rest. (raw sockets are how u snoop on a network).
ah!.. now i feel somewhat releived that miniproject will be success.
but is it necessary to learn python..
thing is..i have already learnt c, c++, java, (lisp somewhat), Qt and now i start getting confused when i have to learn one more new language..
i cannot afford to learn some new language at this time because then i have to re-code other modules of the program in python too..
can u please let me know if this is possible using java preferable and if not using c++??
thanx in advance.
what all do i need to learn in tcp/ip programming to do the program specified in above discussions..
will the functions vary according to the language or it is fixed for unix
I suggest you look at the source code for something that already does what you want and look at that. It's not really a simple feat and it really doesn't sound like you're quite as experienced a programmer as you lead on to be.
will the functions vary according to the language or it is fixed for unix
No, the sockets API calls are pretty much the same in all languages. They might be somewhat limited in high level languages (e.g. Java, because of the platform independence). I also recommend studying Stevens' "Unix Network Programming" because it explains all the low level stuff you need for your project.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.