aboutsummaryrefslogtreecommitdiffstats
path: root/src/Network/WireGuard/Internal/Data
diff options
context:
space:
mode:
authorBaylac-Jacqué Félix <felix@alternativebit.fr>2017-09-16 16:54:24 +0200
committerBaylac-Jacqué Félix <felix@alternativebit.fr>2017-09-16 17:11:53 +0200
commit4cc3292d6c59e48f22cbcaae0ee2773c22c2bad9 (patch)
treeacf8f8b90892625b423d2a7a62a80f09fde39edb /src/Network/WireGuard/Internal/Data
parentFix GHC and HLINT warnings. (diff)
downloadwireguard-hs-4cc3292d6c59e48f22cbcaae0ee2773c22c2bad9.tar.xz
wireguard-hs-4cc3292d6c59e48f22cbcaae0ee2773c22c2bad9.zip
Document RPC-related modules.HEADmaster
Diffstat (limited to 'src/Network/WireGuard/Internal/Data')
-rw-r--r--src/Network/WireGuard/Internal/Data/RpcTypes.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Network/WireGuard/Internal/Data/RpcTypes.hs b/src/Network/WireGuard/Internal/Data/RpcTypes.hs
index 7e1c20e..d3ec964 100644
--- a/src/Network/WireGuard/Internal/Data/RpcTypes.hs
+++ b/src/Network/WireGuard/Internal/Data/RpcTypes.hs
@@ -1,3 +1,15 @@
+{-|
+Module : Network.WireGuard.Internal.Data.RpcTypes
+Description : Collection of types used to communicate with the wg CLI utility.
+Copyright : Félix Baylac-Jacqué, 2017
+License : GPL-3
+Maintainer : felix@alternativebit.fr
+Stability : experimental
+Portability : POSIX
+
+Collection of types used by to communicate with the wg CLI utility.
+|-}
+
module Network.WireGuard.Internal.Data.RpcTypes(
OpType(..),
RpcRequest(..),
@@ -51,6 +63,7 @@ instance Eq RpcDevicePayload where
((dhSecToBytes . fst) <$> pk1) == ((dhSecToBytes . fst) <$> pk2) && (prt1 == prt2) &&
(rp1 == rp2) && (fw1 == fw2)
+-- | Key/Value couple of set device operations.
data RpcDeviceField = RpcPk !(Maybe KeyPair)
| RpcPort !Int
| RpcFwMark !(Maybe Word)
@@ -77,6 +90,7 @@ instance Show RpcPeerPayload where
= show (dhPubToBytes pub1) ++ show rm1 ++ show psk1 ++ show e1 ++ show k1 ++
show rp1 ++ show aip1
+-- | Key/Value couple of set peer operations.
data RpcPeerField = RpcRmFlag !Bool
| RpcPsh !PresharedKey
| RpcEndp !SockAddr