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
Rainer Temme

2006-04-02, 7:41 pm

manu wrote:

> now i am trying to write various structures and convert it to strings
> for sendto..


No, you don't do this!
You convert your "program-internal" data to exactly that
data-representation that is required by the standard of
the protocol that you're implementing.

If you develop your own protocol, write the required
standard first.

> My question is..
> for handling ICMP packets, the structure is defined in ip_icmp.h, but
> for OSPF no header file is defined.


You certainly should get a copy of RFC-2328
(see http://www.faqs.org/rfcs/rfc2328.html )
and read it and try to undersdtand it. (This RFC describes OSPF)

Rainer
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com