Solved

Network layer program ?

Posted on 1998-10-26
5
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

740 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