maccatcher-2.1.5: Obtain the host MAC address on *NIX and Windows.

Safe Haskell | Safe-Inferred

System.Info.MAC.Fetch

Description

System specific routines for determing the MAC address and macros to help sort things out at compile time.

Synopsis

- fetchNICs :: IO [(String, MAC)]
- i_config :: IO String
- parser :: String -> [(String, MAC)]
- ifconfig :: Parser [(String, MAC)]
- ipconfig :: Parser [(String, MAC)]
- parseNIC_ifconfig :: Parser (Maybe (String, MAC))
- parseNIC_ipconfig :: Parser (Maybe (String, MAC))
- parseNICs :: Parser (Maybe (String, MAC)) -> Parser [(String, MAC)]
- parseMAC :: Char -> ParsecT String u Identity (Maybe MAC)
- parse' :: String -> Parser [t] -> String -> [t]
- maybeMAC :: String -> Maybe MAC
- sepHex :: ParsecT String u Identity sep -> ParsecT String u Identity [[Char]]
- manyAnyTill :: Parser Char -> Parser String
- skipManyTill :: Parser a -> Parser b -> Parser b
- skipManyAnyTill :: Parser a -> Parser a
- nl :: ParsecT [Char] u Identity Char

# Documentation

fetchNICs :: IO [(String, MAC)]Source

Obtain a list containing the name and MAC of all NICs.

i_config :: IO String Source

Run `ifconfig` or `ipconfig`, as appropriate, capturing its output.

parser :: String -> [(String, MAC)]Source

ifconfig :: Parser [(String, MAC)]Source

Parses the output of Linux or BSD `ifconfig`.

ipconfig :: Parser [(String, MAC)]Source

Parses the output of Windows `ipconfig`.

parseNIC_ifconfig :: Parser (Maybe (String, MAC))Source

parseNIC_ipconfig :: Parser (Maybe (String, MAC))Source

parseNICs :: Parser (Maybe (String, MAC)) -> Parser [(String, MAC)]Source

parseMAC :: Char -> ParsecT String u Identity (Maybe MAC)Source

parse' :: String -> Parser [t] -> String -> [t]Source

maybeMAC :: String -> Maybe MAC Source

sepHex :: ParsecT String u Identity sep -> ParsecT String u Identity [[Char]]Source

manyAnyTill :: Parser Char -> Parser String Source

skipManyTill :: Parser a -> Parser b -> Parser bSource

skipManyAnyTill :: Parser a -> Parser aSource

nl :: ParsecT [Char] u Identity Char Source