Re: raw sockets: question about sending IP + UDP header
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 10/22/05
- Previous message: Barry Margolin: "Re: wait(pid) problem"
- In reply to: Fernando Barsoba: "raw sockets: question about sending IP + UDP header"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 22 Oct 2005 12:40:03 -0400
In article <wst6f.10140$Io4.15@trnddc06>,
Fernando Barsoba <fbarsoba@verizon.net> wrote:
> Hi all,
>
> I'm working on a IPSec implementation (raw sockets), and the first stage
> that I defined for this project involves the following (conceptually):
>
> - First, build an IP datagram and add a UDP header to it. Try to send
> the UDP datagram through a raw socket client to a UDP socket server.
> Check with Ethereal if communication between hosts is correct, i.e. the
> datagram is correctly formed and correctly send/received. (here I want
> to test if my IP header and IP checksum is correct plus of course my UDP
> header is correct.. though I will get rid of it eventually and start
> working on the IPSec header)
>
> Here's my question: I expect that my UDP datagram will be processed and
> sent to my UDP socket server through the raw socket.. but, will the
> kernel mess with my UDP packet on the client side? (the kernel doesn't
> process anything that doesn't recognize in the protocol field, but in
> this case it will recognize it as UDP packet)
>
> I hope my question is not too wordy..
There's a chapter on Raw Sockets in Unix Network Programming, Vol.1. It
explains which fields the stack will fill in by itself, and which it
will leave alone.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Previous message: Barry Margolin: "Re: wait(pid) problem"
- In reply to: Fernando Barsoba: "raw sockets: question about sending IP + UDP header"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|