LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-30-2004, 06:44 AM   #16
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380

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...


Last edited by win32sux; 07-30-2004 at 06:50 AM.
 
Old 07-30-2004, 12:16 PM   #17
gajaykrishnan
Member
 
Registered: Jul 2004
Posts: 65

Original Poster
Rep: Reputation: 15
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.
 
Old 07-30-2004, 12:38 PM   #18
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
the netstat thing was just an example...

yes, you can make your own program... you'll obviously need to know how to program first...

you need to pick a programming language that you like and then start studying it...

you probably wanna start by learning a high-level language such as python...

http://www.python.org/

and yes, python does tcp/ip...

=)

 
Old 07-30-2004, 03:18 PM   #19
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
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).
 
Old 07-30-2004, 03:19 PM   #20
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
Quote:
Originally posted by win32sux
the netstat thing was just an example...

yes, you can make your own program... you'll obviously need to know how to program first...

you need to pick a programming language that you like and then start studying it...

you probably wanna start by learning a high-level language such as python...

http://www.python.org/

and yes, python does tcp/ip...

=)
man u python people sure are pushy one of these days im going to have to read the python book i have and see what all the fuss is about
 
Old 07-31-2004, 12:11 AM   #21
gajaykrishnan
Member
 
Registered: Jul 2004
Posts: 65

Original Poster
Rep: Reputation: 15
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.
 
Old 07-31-2004, 12:15 AM   #22
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
Yes, you can use Java or C++ to do TCP/IP programming.

Last edited by itsme86; 07-31-2004 at 12:16 AM.
 
Old 07-31-2004, 12:21 AM   #23
gajaykrishnan
Member
 
Registered: Jul 2004
Posts: 65

Original Poster
Rep: Reputation: 15
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
 
Old 07-31-2004, 12:30 AM   #24
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
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.
 
Old 07-31-2004, 04:20 AM   #25
bruce ford
Member
 
Registered: Jul 2004
Location: Munich, Germany
Distribution: Sun Solaris 8, SuSE 9.0
Posts: 43

Rep: Reputation: 15
Quote:
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.

Good luck!
bruce
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which programming language is used to do tcp/ip programming?? gajaykrishnan Linux - Networking 9 12-21-2012 05:16 AM
TCP/IP book for socket programming hubabuba Programming 3 10-17-2005 03:46 AM
tcp-ip programming jeril842002 Linux - General 1 07-30-2004 11:59 AM
programming in c, problem TCP -> SYN,... bebe531 Programming 1 05-25-2004 02:58 PM
TCP/IP programming assman Programming 3 04-07-2004 11:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration