On Mon, 22 Dec 2008, Bruce Simpson wrote:
Ferner Cilloniz wrote:
So i have done some research and reading and found that i need to call
either udp_send or udp_output. Can anyone help me out with providing the
proper arguments to these functions so i may call them and send arbitrary
UDP packets from a kernel module?
The NFS and BOOTP code would be the first place to look, it has a rather
shonky way of creating a socket in-kernel so that an INPCB will be created,
allowing you to send and receive UDP datagrams. Fire up KScope or similar
and look at how it does it.
I would encourage this approach, if the application model works with it, as it
allows using the existing socket infrastruture to reserve the port/ip tuple
and avoid conflicts with userspace, use existing buffering on the receive
side, etc.
Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"