aboutsummaryrefslogtreecommitdiffstats
path: root/src/Network/WireGuard/Internal/RpcParsers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/WireGuard/Internal/RpcParsers.hs')
-rw-r--r--src/Network/WireGuard/Internal/RpcParsers.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Network/WireGuard/Internal/RpcParsers.hs b/src/Network/WireGuard/Internal/RpcParsers.hs
index c5179c8..e5e38d1 100644
--- a/src/Network/WireGuard/Internal/RpcParsers.hs
+++ b/src/Network/WireGuard/Internal/RpcParsers.hs
@@ -3,7 +3,8 @@
module Network.WireGuard.Internal.RpcParsers(
requestParser,
deviceParser,
- peerParser
+ peerParser,
+ setPayloadParser
) where
import Control.Applicative ((*>), (<|>))
import Control.Monad (join)
@@ -48,7 +49,10 @@ requestTypeParser = "get=1" *> return Get
<|> "set=1" *> return Set
setPayloadParser :: Parser RpcSetPayload
-setPayloadParser = undefined
+setPayloadParser = do
+ dev <- deviceParser
+ peers <- many' peerParser
+ return $ RpcSetPayload dev peers
deviceParser :: Parser RpcDevicePayload
deviceParser = do