Raw Sockets

Dominic Steinitz dominic.j.steinitz@britishairways.com
Mon, 4 Mar 2002 05:40:03 +0000


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?

This compiles and runs as expected:

module Main(main) where

import SocketPrim (Family(AF_INET))

main = putStrLn (show AF_INET)

but this

module Main(main) where

import SocketPrim (Family(AF_RAW))

main = putStrLn (show AF_RAW)

gives the following

C:\Dom\haskell\ping>"c:\program files\glasgow haskell
compiler\ghc-5.02\bin\ghc"
 -o main test.hs -package net

test.hs:3: Module `SocketPrim' does not export `Family(AF_RAW)'