Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Network layer program ?

How to write a network layer program ?
(Examples : a simple IP packet filtering program )
0
thanhnl
Asked:
thanhnl
  • 2
  • 2
1 Solution
 
thanhnlAuthor Commented:
Edited text of question
0
 
agreenCommented:
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
 
agreenCommented:
Please give us more information. What's your OS, what do you want to do etc.
0
 
thanhnlAuthor Commented:
I want to do it in the unix os. I'm using solaris 2.5
0
 
helverCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now