
4 Mar
2002
4 Mar
'02
7 a.m.
How do I use raw sockets? According to the documentation I can use AF_RAW. It also refers the user to the implementation in fptools/hslibs/net/SocketPrim.lhs. Do I really need to do this and if so how do I get it?
The SocketPrim library (aka Network.Socket) really only supports AF_INET and AF_UNIX. Many of the other AF_ things are quite system-dependent; eg. Linux doesn't have AF_RAW. The documentation is a bit slack, although it does mention at the top of the Family(..) definition that "your mileage may vary depending on the OS you use". Do you really want a raw socket, or will a datagram (UDP) socket do? If so, you can just pass Datagram as the SocketType argument to SocketPrim.socket. Cheers, Simon
8479
Age (days ago)
8479
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow