Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pythia.Services.NetInterface.Ip
Description
This module provides functionality for retrieving network connection information using ip utility.
Since: 0.1
Synopsis
- netInterfaceShellApp :: (MonadPathReader m, MonadThrow m, MonadTypedProcess m) => m NetInterfaces
- supported :: MonadPathReader m => m Bool
- newtype IpParseError = MkIpParseError Text
- parseInterfaces :: Text -> Either IpParseError NetInterfaces
Query
netInterfaceShellApp :: (MonadPathReader m, MonadThrow m, MonadTypedProcess m) => m NetInterfaces Source #
Ip query for NetInterface
.
Since: 0.1
supported :: MonadPathReader m => m Bool Source #
Returns a boolean determining if this program is supported on the current system.
Since: 0.1
Misc
newtype IpParseError Source #
Error parsing ip output.
Examples
>>>
displayException $ MkIpParseError "parse error"
"Ip parse error: parse error"
Since: 0.1
Constructors
MkIpParseError Text |
Instances
Exception IpParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.Ip Methods toException :: IpParseError -> SomeException # fromException :: SomeException -> Maybe IpParseError # displayException :: IpParseError -> String # | |
Show IpParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.Ip Methods showsPrec :: Int -> IpParseError -> ShowS # show :: IpParseError -> String # showList :: [IpParseError] -> ShowS # | |
Eq IpParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.Ip |
parseInterfaces :: Text -> Either IpParseError NetInterfaces Source #
Attempts to parse the output of IP.
Since: 0.1