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>

index | next in thread | raw e-mail

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 socket 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=IPPROTO_IP name=IP_HDRINCL  value=}
but it doesn't work. Also I don't know exactly which is the value of the "value" 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



help

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