Unix Programming - Re: sending a packet using raw socket

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2006 > Re: sending a packet using raw socket





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: sending a packet using raw socket
Barry Margolin

2006-04-02, 7:41 pm

In article <1143428013.144932.8460@u72g2000cwu.googlegroups.com>,
"manu" <manoharyes@gmail.com> wrote:

> thank u guys...
> thank u soo much for the info.
>
> Now i am confirmed tat I can build my own structure and hand it to IP
> layer using raw sockets.
> now i am trying to write various structures and convert it to strings
> for sendto..
>
> My question is..
> for handling ICMP packets, the structure is defined in ip_icmp.h, but
> for OSPF no header file is defined.


Naturally, since Unix doesn't have any built-in OSPF support. Why would
it need a header file for something it doesn't use?

> so we need to define our own structure and fill in the header..
> so , are we allowed to build any structure with any members on it?
> how does the IP layer know if the structure is valid?
> is there any specific headers(OSPF) which has to be mandatorily
> filled?


You need to fill in all the headers that IP and OSPF require.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com