Skip to content

Commit d8cf58b

Browse files
committed
Missing module
1 parent 1185969 commit d8cf58b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

extra/Network/Status.hs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module Network.Status where
2+
3+
import Network.Info
4+
import Lamdera
5+
6+
ips = do
7+
ns <- getNetworkInterfaces
8+
9+
ns
10+
& fmap ipv4
11+
& filter (\v -> show v /= "0.0.0.0")
12+
& filter (\v -> show v /= "127.0.0.1")
13+
& pure
14+
-- & mapM_ (putStr . show)
15+
16+
17+
showInterface n = name n ++ "\n"
18+
++ " IPv4: " ++ show (ipv4 n) ++ "\n"
19+
++ " IPv6: " ++ show (ipv6 n) ++ "\n"
20+
++ " MAC: " ++ show (mac n) ++ "\n"

0 commit comments

Comments
 (0)