Solved

Network layer program ?

Posted on 1998-10-26
5
240 Views
Last Modified: 2010-04-15
How to write a network layer program ?
(Examples : a simple IP packet filtering program )
0
Comment
Question by:thanhnl
  • 2
  • 2
5 Comments
 

Author Comment

by:thanhnl
ID: 1253841
Edited text of question
0
 
LVL 4

Expert Comment

by:agreen
ID: 1253842
The answer for your question depends on the OS you are using. For the DOS, for example, you have to use/write the packet driver which differs for different network cards.
0
 
LVL 4

Expert Comment

by:agreen
ID: 1253843
Please give us more information. What's your OS, what do you want to do etc.
0
 

Author Comment

by:thanhnl
ID: 1253844
I want to do it in the unix os. I'm using solaris 2.5
0
 
LVL 2

Accepted Solution

by:
helver earned 200 total points
ID: 1253845
Well...  What you'll want to do is take a look at some of the net header files that solaris provides.  If you grabbing packets using tcpdump or something similiar, then you'll need to slap the different protocol headers onto the data stream and pull out the pieces you're looking for.

If you're looking for source code of a program that does just that, check out
http://jarok.cs.ohiou.edu/software/tcptrace/tcptrace.html 

But the basic idea is to apply the different headers (usually ethernet first, then ip, then tcp/udp) and read the data that's important to you.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question