IPv6 raw socket to send original udp

Robert Watson rwatson at FreeBSD.org
Wed May 17 09:41:28 UTC 2006


On Tue, 16 May 2006, JINMEI Tatuya / [ISO-2022-JP] ¿ÀÌÀãºÈ wrote:

> So, if a program needs to specify an arbitrary source IPv6 address for 
> outgoing packets, it should use other "packet injection" interface such as 
> BPF.

One problem with using BPF for packet injection in IPv4 is that it requires 
the sender to provide the link layer encapsulation, make the routing decision, 
and perform any address resolution.  Using raw sockets with the full header 
option allows the sender to generate a datagram from an arbitrary source yet 
not perform those routing and link layer activities, which require more 
intimate knowledge of the link type.  It might be desirable to add a socket 
option to allow the specification of the source address in order to allow 
packet replay tools, etc, to work without link layer knowledge.

Robert N M Watson


More information about the freebsd-pf mailing list