Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2010 17:53:16 +0100
From:      Zanetta Serena <serena.zanetta@guest.telecomitalia.it>
To:        "'freebsd-net@freebsd.org'" <freebsd-net@freebsd.org>
Subject:   RAW socket under netgraph
Message-ID:  <67B1924593CA5A4AB2C1BEE195D24F97AB1F4AD5@GRFMBX706BA020.griffon.local>

next in thread | raw e-mail | index | archive | help
Hi,
I am trying to implement the raw socket mechanism under Netgraph by setting=
 the ng_ksocket node type as a raw socket. My purpose is to fill "by hand" =
the IP and UDP headers and then forward the so created packet to the raw so=
cket to be delivered to the appropriate next hop.
I suppose I need to set the socket options as:
setsockopt(sd,IPPROTO_IP,IP_HDRINCL,...).
I found that the equivalent in the Netgraph is the control message "setopt"=
. I've tried to set the options as:
ngctl msg node_name: setopt {level=3DIPPROTO_IP name=3DIP_HDRINCL  value=3D=
}
but it doesn't work. Also I don't know exactly which is the value of the "v=
alue" parameter. I would ask you how to set the options for the raw socket =
and if it is correct to type that command line.
Thank you,
Serena




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67B1924593CA5A4AB2C1BEE195D24F97AB1F4AD5>