On Sun, Jul 09, 2006 at 03:32:41PM +0200, Karel Kulhavy wrote: > Hello > > " The types SOCK_RAW, which is available only to the superuser, and SOCK_RDM, > which is planned, but not yet implemented, are not described here." > (man socket) > > Where is SOCK_RAW described, then? Why is not at least a pointer to the > description included in the manpage?
Feel free to update the manpage. These features were probably left out because the designers thought it only suits packet monkeys perhaps? $ grep -n SOCK_RAW /usr/include/sys/socket.h 52:#define SOCK_RAW 3 /* raw-protocol interface */ $ > I would like to port a program for testing free space optics devices from > Linux to OpenBSD. It sends raw Ethernet frames, one filled with all 0's > and another filled with 01 pattern. It's important to fill as large part > of the packet with these patterns as possible because it's for benchmarking > the amplifiers. Uhm, SOCK_RAW only allows you to send layer 3 packets. Perhaps you are confusing it with SOCK_PACKET which is linux only afaik and does not exist in BSD. To send layer 2 frames from userland your only option is bpf(4) injects and tun(4) writes when in layer 2 mode. > Should I investigate SOCK_RAW or is there a different mechanism under OpenBSD > how to send a raw Ethernet frame? Or is it not implemented at all? > > CL< What you should do is read the book "Unix Network Programming Volume 1" by the late W. R. Stevens, he describes most Layer 2 api's for what you want to do. Regards, -peter -- Here my ticker tape .signature #### My name is Peter Philipp #### lynx -dump "http://en.wikipedia.org/w/index.php?title=Pufferfish&oldid=20768394" | sed -n 131,136p #### So long and thanks for all the fish!!!