-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | ONC RPC (aka Sun RPC) and XDR library -- -- Tools and library for writing ONC (Sun) RPC clients and servers. -- Provides equivalent functionality to rpcgen and librpcsvc, except in -- pure Haskell. The hsrpcgen tool (and Cabal preprocessor library) -- allows .x XDR files to generate Haskell protocol descriptors. The -- library provides a client interface to use these descriptions to make -- RPC calls. @package ONC-RPC @version 0.1 -- | Exceptions for RPC calls module Network.ONCRPC.Exception data RPCException RPCException :: e -> RPCException rpcExceptionToException :: Exception e => e -> SomeException rpcExceptionFromException :: Exception e => SomeException -> Maybe e instance GHC.Show.Show Network.ONCRPC.Exception.RPCException instance GHC.Exception.Exception Network.ONCRPC.Exception.RPCException -- | Types for RPC protocol and procedure. module Network.ONCRPC.Types type XID = Word32 type ProgNum = Word32 type VersNum = Word32 type ProcNum = Word32 -- | Description of a specific procedure, parameterized by argument and -- result types. data Procedure a r Procedure :: !ProgNum -> !VersNum -> !ProcNum -> Procedure a r [procedureProg] :: Procedure a r -> !ProgNum [procedureVers] :: Procedure a r -> !VersNum [procedureProc] :: Procedure a r -> !ProcNum instance GHC.Show.Show (Network.ONCRPC.Types.Procedure a r) instance GHC.Classes.Eq (Network.ONCRPC.Types.Procedure a r) -- | Various kinds of arrays (lists, vectors, bytestrings) with statically -- aserted length constraints encoded in their type. module Network.ONCRPC.XDR.Array -- | This class gives the integer associated with a type-level natural. -- There are instances of the class for every concrete literal: 0, 1, 2, -- etc. class KnownNat (n :: Nat) class KnownOrdering (o :: Ordering) -- | Assertion that the contained array satisfies compareLength -- a n = o data LengthArray (o :: Ordering) (n :: Nat) a -- | Assertion that the contained array is exactly a static length type FixedLengthArray n a = LengthArray 'EQ n a -- | Static length of a FixedLengthArray fixedLengthArrayLength :: KnownNat n => LengthArray 'EQ n a -> Int -- | Assertion that the contained array is at most a static length -- (inclusive) type BoundedLengthArray n a = LengthArray 'LT (n + 1) a -- | Static upper-bound (inclusive) of a BoundedLengthArray boundedLengthArrayBound :: KnownNat n => LengthArray 'LT n a -> Int unLengthArray :: LengthArray o n a -> a -- | Unsafely create a LengthArray without checking the length bound -- assertion. May cause unpredictable behavior if the bound does not -- hold. unsafeLengthArray :: a -> LengthArray o n a -- | Safely create a LengthArray out of an array if it conforms to -- the static length assertion. lengthArray :: forall o n a. (KnownOrdering o, KnownNat n, HasLength a) => a -> Maybe (LengthArray o n a) -- | Create a LengthArray or runtime error if the assertion fails: -- fromMaybe undefined . lengthArray lengthArray' :: forall o n a. (KnownOrdering o, KnownNat n, HasLength a) => a -> LengthArray o n a -- | Create a BoundedLengthArray by trimming the given array if -- necessary. boundLengthArray :: (KnownNat n, Array a) => a -> LengthArray 'LT n a -- | Create a BoundedLengthArray by trimming the given array if -- necessary. boundLengthArrayFromList :: (KnownNat n, Array a) => [Elem a] -> LengthArray 'LT n a -- | Create a FixedLengthArray by trimming or padding (on the right) -- as necessary. padLengthArray :: (KnownNat n, Array a) => a -> Elem a -> LengthArray 'EQ n a -- | Create a FixedLengthArray filled with the same value. constLengthArray :: (KnownNat n, Array a) => Elem a -> LengthArray 'EQ n a -- | An empty FixedLengthArray. emptyFixedLengthArray :: Array a => LengthArray 'EQ 0 a -- | An empty BoundedLengthArray. emptyBoundedLengthArray :: (CmpNat 0 n ~ 'LT, Array a) => LengthArray 'LT n a -- | Grow the bound of a BoundedLengthArray. expandBoundedLengthArray :: (CmpNat n m ~ 'LT) => LengthArray 'LT n a -> LengthArray 'LT m a -- | Convert a FixedLengthArray to a BoundedLengthArray. boundFixedLengthArray :: (CmpNat n m ~ 'LT) => LengthArray 'EQ n a -> LengthArray 'LT m a -- | Append to two LengthArrays. appendLengthArray :: Monoid a => LengthArray o n a -> LengthArray o m a -> LengthArray o (n + m) a fromLengthList :: Array a => LengthArray o n [Elem a] -> LengthArray o n a instance GHC.Show.Show a => GHC.Show.Show (Network.ONCRPC.XDR.Array.LengthArray o n a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Network.ONCRPC.XDR.Array.LengthArray o n a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.ONCRPC.XDR.Array.LengthArray o n a) instance Network.ONCRPC.XDR.Array.HasLength a => Network.ONCRPC.XDR.Array.HasLength (Network.ONCRPC.XDR.Array.LengthArray o n a) instance (Network.ONCRPC.XDR.Array.KnownOrdering o, GHC.TypeNats.KnownNat n, Data.String.IsString a, Network.ONCRPC.XDR.Array.HasLength a) => Data.String.IsString (Network.ONCRPC.XDR.Array.LengthArray o n a) instance Network.ONCRPC.XDR.Array.KnownOrdering 'GHC.Types.LT instance Network.ONCRPC.XDR.Array.KnownOrdering 'GHC.Types.EQ instance Network.ONCRPC.XDR.Array.KnownOrdering 'GHC.Types.GT instance Network.ONCRPC.XDR.Array.Array [a] instance Network.ONCRPC.XDR.Array.Array (Data.Vector.Vector a) instance Network.ONCRPC.XDR.Array.Array Data.ByteString.Internal.ByteString instance Network.ONCRPC.XDR.Array.Array Data.ByteString.Lazy.Internal.ByteString instance Network.ONCRPC.XDR.Array.HasLength [a] instance Network.ONCRPC.XDR.Array.HasLength (Data.Vector.Vector a) instance Network.ONCRPC.XDR.Array.HasLength Data.ByteString.Internal.ByteString instance Network.ONCRPC.XDR.Array.HasLength Data.ByteString.Lazy.Internal.ByteString -- | XDR Types. The Quadruple type is not supported as there is no -- reasonable Haskell equivalent. -- -- This module should be imported qualified, e.g., as XDR. module Network.ONCRPC.XDR.Types type Int = Int32 type UnsignedInt = Word32 type Hyper = Int64 type UnsignedHyper = Word64 -- | Single-precision floating point numbers. It is desirable that this -- type be at least equal in range and precision to the IEEE -- single-precision type. data Float :: * -- | Double-precision floating point numbers. It is desirable that this -- type be at least equal in range and precision to the IEEE -- double-precision type. data Double :: * data Bool :: * type FixedArray n a = FixedLengthArray n (Vector a) type Array n a = BoundedLengthArray n (Vector a) type FixedOpaque n = FixedLengthArray n ByteString type Opaque n = BoundedLengthArray n ByteString type FixedString n = FixedLengthArray n ByteString type String n = BoundedLengthArray n ByteString type Optional a = Maybe a -- | Not a real XDR type, but used for length headers type Length = UnsignedInt maxLength :: Length -- | XDR Serialization module Network.ONCRPC.XDR.Serial -- | An XDR type that can be (de)serialized. class XDR a -- | XDR identifier/type descriptor; argument value is ignored. xdrType :: XDR a => a -> String xdrPut :: XDR a => a -> Put xdrGet :: XDR a => Get a -- | An XDR type defined with "enum". Note that the XDREnum -- Int value is not (necessarily) the same as the Enum -- Int value. The Enum instance is derived automatically to -- allow succ, etc. to work usefully in Haskell, whereas the -- XDREnum reflects the XDR-defined values. class (XDR a, Enum a) => XDREnum a xdrFromEnum :: XDREnum a => a -> Int xdrToEnum :: (XDREnum a, Monad m) => Int -> m a -- | Version of xdrToEnum that fails at runtime for invalid values: -- fromMaybe undefined . xdrToEnum. xdrToEnum' :: XDREnum a => Int -> a -- | Default implementation of xdrPut for XDREnum. xdrPutEnum :: XDREnum a => a -> Put -- | Default implementation of xdrGet for XDREnum. xdrGetEnum :: XDREnum a => Get a -- | An XDR type defined with "union" class (XDR a, XDREnum (XDRDiscriminant a)) => XDRUnion a where { type family XDRDiscriminant a :: *; } -- | Split a union into its discriminant and body generator. xdrSplitUnion :: XDRUnion a => a -> (Int, Put) -- | Get the body of a union based on its discriminant. xdrGetUnionArm :: XDRUnion a => Int -> Get a xdrDiscriminant :: XDRUnion a => a -> XDRDiscriminant a -- | Default implementation of xdrPut for XDRUnion. xdrPutUnion :: XDRUnion a => a -> Put -- | Default implementation of xdrGet for XDRUnion. xdrGetUnion :: XDRUnion a => Get a xdrSerialize :: XDR a => a -> ByteString xdrSerializeLazy :: XDR a => a -> ByteString -- |
--   "S.runGet' xdrGet
--   
xdrDeserialize :: XDR a => ByteString -> Either String a -- |
--   "S.runGetLazy' xdrGet
--   
xdrDeserializeLazy :: XDR a => ByteString -> Either String a instance Network.ONCRPC.XDR.Serial.XDR a => Network.ONCRPC.XDR.Serial.XDRUnion (Network.ONCRPC.XDR.Types.Optional a) instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.XDR.Types.Int instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.XDR.Types.UnsignedInt instance Network.ONCRPC.XDR.Serial.XDREnum GHC.Types.Bool instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.XDR.Types.Int instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.XDR.Types.UnsignedInt instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.XDR.Types.Hyper instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.XDR.Types.UnsignedHyper instance Network.ONCRPC.XDR.Serial.XDR GHC.Types.Float instance Network.ONCRPC.XDR.Serial.XDR GHC.Types.Double instance Network.ONCRPC.XDR.Serial.XDR GHC.Types.Bool instance Network.ONCRPC.XDR.Serial.XDR a => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Types.Optional a) instance (GHC.TypeNats.KnownNat n, Network.ONCRPC.XDR.Serial.XDR a) => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.EQ n [a]) instance (GHC.TypeNats.KnownNat n, Network.ONCRPC.XDR.Serial.XDR a) => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.LT n [a]) instance (GHC.TypeNats.KnownNat n, Network.ONCRPC.XDR.Serial.XDR a) => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.EQ n (Data.Vector.Vector a)) instance (GHC.TypeNats.KnownNat n, Network.ONCRPC.XDR.Serial.XDR a) => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.LT n (Data.Vector.Vector a)) instance GHC.TypeNats.KnownNat n => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.EQ n Data.ByteString.Internal.ByteString) instance GHC.TypeNats.KnownNat n => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.XDR.Array.LengthArray 'GHC.Types.LT n Data.ByteString.Internal.ByteString) instance Network.ONCRPC.XDR.Serial.XDR () instance (Network.ONCRPC.XDR.Serial.XDR a, Network.ONCRPC.XDR.Serial.XDR b) => Network.ONCRPC.XDR.Serial.XDR (a, b) instance (Network.ONCRPC.XDR.Serial.XDR a, Network.ONCRPC.XDR.Serial.XDR b, Network.ONCRPC.XDR.Serial.XDR c) => Network.ONCRPC.XDR.Serial.XDR (a, b, c) instance (Network.ONCRPC.XDR.Serial.XDR a, Network.ONCRPC.XDR.Serial.XDR b, Network.ONCRPC.XDR.Serial.XDR c, Network.ONCRPC.XDR.Serial.XDR d) => Network.ONCRPC.XDR.Serial.XDR (a, b, c, d) -- | XDR: External Data Representation as described in RFC4506 -- -- This module should be imported qualified, e.g., as XDR. module Network.ONCRPC.XDR -- | Generate Haskell code from XDR descriptions as per RFC4506 and RPC -- extensions from RFC5531 module Network.ONCRPC.XDR.Generate -- | generate from a file. generateFromFile :: GenerateOptions -> FilePath -> IO String -- | Parse an XDR specification and generate pretty-printed Haskell source -- string, or fail on error. The String argument provides a -- description of the input to use in parse errors. generate :: Monad m => GenerateOptions -> String -> ByteString -> m String -- | Parse an XDR specification and generate a Haskell module, or fail on -- error. The String argument provides a description of the input -- to use in parse errors. generateModule :: Monad m => GenerateOptions -> String -> ByteString -> m (Module ()) -- | How to generate Haskell identifiers from XDR in order to confirm to -- Haskell's lexical rules and ensure uniqueness. data ReidentOptions ReidentOptions :: String -> Maybe String -> ReidentOptions -- | Prefix to use to make an identifier a different case if necessary, -- e.g. "_" for lower-case, or "XDR_" for upper case -- (default empty: just changes the first character, possibly resulting -- in names like "nFS_NULL") -- | Prefix to use to make an identifier a different case if necessary, -- e.g. "_" for lower-case, or "XDR_" for upper case -- (default empty: just changes the first character, possibly resulting -- in names like "nFS_NULL") [reidentUpperPrefix, reidentLowerPrefix] :: ReidentOptions -> String -- | Prefix fields with their type name (or program, version name) and this -- string (necessary for most XDR files), or Nothing to use only -- the field name (or procedure name), which assumes uniqueness across -- the file (e.g., if you wrote the file yourself, though often safe for -- procedures only) (default Just "'") -- | Prefix fields with their type name (or program, version name) and this -- string (necessary for most XDR files), or Nothing to use only -- the field name (or procedure name), which assumes uniqueness across -- the file (e.g., if you wrote the file yourself, though often safe for -- procedures only) (default Just "'") [reidentJoinField, reidentJoinProcedure] :: ReidentOptions -> Maybe String -- | Options for generating Haskell code data GenerateOptions GenerateOptions :: String -> ReidentOptions -> GenerateOptions -- | Name for the generated module [generateModuleName] :: GenerateOptions -> String [generateReidentOptions] :: GenerateOptions -> ReidentOptions defaultReidentOptions :: ReidentOptions instance GHC.Show.Show Network.ONCRPC.XDR.Generate.GenerateOptions instance GHC.Classes.Eq Network.ONCRPC.XDR.Generate.GenerateOptions -- | Cabal utilities for XDR processing. module Network.ONCRPC.XDR.Cabal -- | Pre-processor for hsrpcgen. You can use it by setting -- UserHooks { hookedPrepProcessors = -- [ppRPCGenSuffixHandler] }. Note that this will override -- the default alex .x file handler. You can also specify custom -- cabal fields corresponding to ReidentOptions and command-line -- flags prefixed with x-rpcgen-: {upper,lower}-prefix, -- join-{field,procedure}, and -- {field,procedure}s-unique}. ppRPCGenSuffixHandler :: PPSuffixHandler -- | Generated from .NetworkONCRPCProt.x by -- <https:github.comdylex/oncrpc hsrpcgen> module Network.ONCRPC.Prot rPC_VERS :: Integral a => a data Auth_flavor AUTH_NONE :: Auth_flavor AUTH_SYS :: Auth_flavor AUTH_SHORT :: Auth_flavor AUTH_DH :: Auth_flavor AUTH_KERB :: Auth_flavor AUTH_RSA :: Auth_flavor RPCSEC_GSS :: Auth_flavor type Opaque_auth_body = Opaque 400 data Opaque_auth Opaque_auth :: !Int -> !Opaque_auth_body -> Opaque_auth [opaque_auth'flavor] :: Opaque_auth -> !Int [opaque_auth'body] :: Opaque_auth -> !Opaque_auth_body data Msg_type CALL :: Msg_type REPLY :: Msg_type data Reply_stat MSG_ACCEPTED :: Reply_stat MSG_DENIED :: Reply_stat data Accept_stat SUCCESS :: Accept_stat PROG_UNAVAIL :: Accept_stat PROG_MISMATCH :: Accept_stat PROC_UNAVAIL :: Accept_stat GARBAGE_ARGS :: Accept_stat SYSTEM_ERR :: Accept_stat data Reject_stat RPC_MISMATCH :: Reject_stat AUTH_ERROR :: Reject_stat data Auth_stat AUTH_OK :: Auth_stat AUTH_BADCRED :: Auth_stat AUTH_REJECTEDCRED :: Auth_stat AUTH_BADVERF :: Auth_stat AUTH_REJECTEDVERF :: Auth_stat AUTH_TOOWEAK :: Auth_stat AUTH_INVALIDRESP :: Auth_stat AUTH_FAILED :: Auth_stat AUTH_KERB_GENERIC :: Auth_stat AUTH_TIMEEXPIRE :: Auth_stat AUTH_TKT_FILE :: Auth_stat AUTH_DECODE :: Auth_stat AUTH_NET_ADDR :: Auth_stat RPCSEC_GSS_CREDPROBLEM :: Auth_stat RPCSEC_GSS_CTXPROBLEM :: Auth_stat data Rpc_msg Rpc_msg :: !UnsignedInt -> !Rpc_msg_body -> Rpc_msg [rpc_msg'xid] :: Rpc_msg -> !UnsignedInt [rpc_msg'body] :: Rpc_msg -> !Rpc_msg_body data Rpc_msg_body Rpc_msg_body'CALL :: !Call_body -> Rpc_msg_body [rpc_msg_body'cbody] :: Rpc_msg_body -> !Call_body Rpc_msg_body'REPLY :: !Reply_body -> Rpc_msg_body [rpc_msg_body'rbody] :: Rpc_msg_body -> !Reply_body rpc_msg_body'mtype :: Rpc_msg_body -> Msg_type data Call_body Call_body :: !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !Opaque_auth -> !Opaque_auth -> Call_body [call_body'rpcvers] :: Call_body -> !UnsignedInt [call_body'prog] :: Call_body -> !UnsignedInt [call_body'vers] :: Call_body -> !UnsignedInt [call_body'proc] :: Call_body -> !UnsignedInt [call_body'cred] :: Call_body -> !Opaque_auth [call_body'verf] :: Call_body -> !Opaque_auth data Reply_body Reply_body'MSG_ACCEPTED :: !Accepted_reply -> Reply_body [reply_body'areply] :: Reply_body -> !Accepted_reply Reply_body'MSG_DENIED :: !Rejected_reply -> Reply_body [reply_body'rreply] :: Reply_body -> !Rejected_reply reply_body'stat :: Reply_body -> Reply_stat data Accepted_reply Accepted_reply :: !Opaque_auth -> !Accepted_reply_data -> Accepted_reply [accepted_reply'verf] :: Accepted_reply -> !Opaque_auth [accepted_reply'reply_data] :: Accepted_reply -> !Accepted_reply_data data Accepted_reply_data Accepted_reply_data'SUCCESS :: Accepted_reply_data Accepted_reply_data'PROG_MISMATCH :: !UnsignedInt -> !UnsignedInt -> Accepted_reply_data [accepted_reply_data'mismatch_info'low] :: Accepted_reply_data -> !UnsignedInt [accepted_reply_data'mismatch_info'high] :: Accepted_reply_data -> !UnsignedInt Accepted_reply_data'default :: !Accept_stat -> Accepted_reply_data [accepted_reply_data'stat'] :: Accepted_reply_data -> !Accept_stat accepted_reply_data'stat :: Accepted_reply_data -> Accept_stat data Rejected_reply Rejected_reply'RPC_MISMATCH :: !UnsignedInt -> !UnsignedInt -> Rejected_reply [rejected_reply'mismatch_info'low] :: Rejected_reply -> !UnsignedInt [rejected_reply'mismatch_info'high] :: Rejected_reply -> !UnsignedInt Rejected_reply'AUTH_ERROR :: !Auth_stat -> Rejected_reply [rejected_reply'auth_stat] :: Rejected_reply -> !Auth_stat rejected_reply'stat :: Rejected_reply -> Reject_stat data Authsys_parms Authsys_parms :: !UnsignedInt -> !(String 255) -> !UnsignedInt -> !UnsignedInt -> !(Array 16 UnsignedInt) -> Authsys_parms [authsys_parms'stamp] :: Authsys_parms -> !UnsignedInt [authsys_parms'machinename] :: Authsys_parms -> !(String 255) [authsys_parms'uid] :: Authsys_parms -> !UnsignedInt [authsys_parms'gid] :: Authsys_parms -> !UnsignedInt [authsys_parms'gids] :: Authsys_parms -> !(Array 16 UnsignedInt) instance GHC.Show.Show Network.ONCRPC.Prot.Authsys_parms instance GHC.Classes.Eq Network.ONCRPC.Prot.Authsys_parms instance GHC.Show.Show Network.ONCRPC.Prot.Rpc_msg instance GHC.Classes.Eq Network.ONCRPC.Prot.Rpc_msg instance GHC.Show.Show Network.ONCRPC.Prot.Rpc_msg_body instance GHC.Classes.Eq Network.ONCRPC.Prot.Rpc_msg_body instance GHC.Show.Show Network.ONCRPC.Prot.Reply_body instance GHC.Classes.Eq Network.ONCRPC.Prot.Reply_body instance GHC.Show.Show Network.ONCRPC.Prot.Rejected_reply instance GHC.Classes.Eq Network.ONCRPC.Prot.Rejected_reply instance GHC.Show.Show Network.ONCRPC.Prot.Accepted_reply instance GHC.Classes.Eq Network.ONCRPC.Prot.Accepted_reply instance GHC.Show.Show Network.ONCRPC.Prot.Accepted_reply_data instance GHC.Classes.Eq Network.ONCRPC.Prot.Accepted_reply_data instance GHC.Show.Show Network.ONCRPC.Prot.Call_body instance GHC.Classes.Eq Network.ONCRPC.Prot.Call_body instance GHC.Show.Show Network.ONCRPC.Prot.Auth_stat instance GHC.Enum.Bounded Network.ONCRPC.Prot.Auth_stat instance GHC.Enum.Enum Network.ONCRPC.Prot.Auth_stat instance GHC.Classes.Ord Network.ONCRPC.Prot.Auth_stat instance GHC.Classes.Eq Network.ONCRPC.Prot.Auth_stat instance GHC.Show.Show Network.ONCRPC.Prot.Reject_stat instance GHC.Enum.Bounded Network.ONCRPC.Prot.Reject_stat instance GHC.Enum.Enum Network.ONCRPC.Prot.Reject_stat instance GHC.Classes.Ord Network.ONCRPC.Prot.Reject_stat instance GHC.Classes.Eq Network.ONCRPC.Prot.Reject_stat instance GHC.Show.Show Network.ONCRPC.Prot.Accept_stat instance GHC.Enum.Bounded Network.ONCRPC.Prot.Accept_stat instance GHC.Enum.Enum Network.ONCRPC.Prot.Accept_stat instance GHC.Classes.Ord Network.ONCRPC.Prot.Accept_stat instance GHC.Classes.Eq Network.ONCRPC.Prot.Accept_stat instance GHC.Show.Show Network.ONCRPC.Prot.Reply_stat instance GHC.Enum.Bounded Network.ONCRPC.Prot.Reply_stat instance GHC.Enum.Enum Network.ONCRPC.Prot.Reply_stat instance GHC.Classes.Ord Network.ONCRPC.Prot.Reply_stat instance GHC.Classes.Eq Network.ONCRPC.Prot.Reply_stat instance GHC.Show.Show Network.ONCRPC.Prot.Msg_type instance GHC.Enum.Bounded Network.ONCRPC.Prot.Msg_type instance GHC.Enum.Enum Network.ONCRPC.Prot.Msg_type instance GHC.Classes.Ord Network.ONCRPC.Prot.Msg_type instance GHC.Classes.Eq Network.ONCRPC.Prot.Msg_type instance GHC.Show.Show Network.ONCRPC.Prot.Opaque_auth instance GHC.Classes.Eq Network.ONCRPC.Prot.Opaque_auth instance GHC.Show.Show Network.ONCRPC.Prot.Auth_flavor instance GHC.Enum.Bounded Network.ONCRPC.Prot.Auth_flavor instance GHC.Enum.Enum Network.ONCRPC.Prot.Auth_flavor instance GHC.Classes.Ord Network.ONCRPC.Prot.Auth_flavor instance GHC.Classes.Eq Network.ONCRPC.Prot.Auth_flavor instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Authsys_parms instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Rpc_msg instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Rpc_msg_body instance Network.ONCRPC.XDR.Serial.XDRUnion Network.ONCRPC.Prot.Rpc_msg_body instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Reply_body instance Network.ONCRPC.XDR.Serial.XDRUnion Network.ONCRPC.Prot.Reply_body instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Rejected_reply instance Network.ONCRPC.XDR.Serial.XDRUnion Network.ONCRPC.Prot.Rejected_reply instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Accepted_reply instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Accepted_reply_data instance Network.ONCRPC.XDR.Serial.XDRUnion Network.ONCRPC.Prot.Accepted_reply_data instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Call_body instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Auth_stat instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Auth_stat instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Reject_stat instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Reject_stat instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Accept_stat instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Accept_stat instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Reply_stat instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Reply_stat instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Msg_type instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Msg_type instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Opaque_auth instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Prot.Auth_flavor instance Network.ONCRPC.XDR.Serial.XDREnum Network.ONCRPC.Prot.Auth_flavor -- | Marshalling values into and out of Opaque byte strings. Not -- really part of XDR, but convenient way to avoid many conversion -- functions. module Network.ONCRPC.XDR.Opaque -- | Values that can be stored in an Opaque ByteString. The -- default implementation allows (re-)embedding of XDR-encoded data, such -- as with Opaque_auth. class Opaqued a opacify :: Opaqued a => a -> ByteString opacify :: (Opaqued a, XDR a) => a -> ByteString unopacify :: (Opaqued a, Monad m) => ByteString -> m a unopacify :: (Opaqued a, XDR a, Monad m) => ByteString -> m a unopacify' :: Opaqued a => ByteString -> a toOpaque :: (Opaqued a, KnownOrdering o, KnownNat n) => a -> Maybe (LengthArray o n ByteString) toOpaque' :: (Opaqued a, KnownOrdering o, KnownNat n) => a -> LengthArray o n ByteString fromOpaque :: (Opaqued a, Monad m) => LengthArray o n ByteString -> m a fromOpaque' :: Opaqued a => LengthArray o n ByteString -> a instance Network.ONCRPC.XDR.Opaque.Opaqued Network.ONCRPC.Prot.Authsys_parms -- | Generated from .NetworkONCRPCBindProt.x by -- hsrpcgen module Network.ONCRPC.Bind.Prot rPCB_PORT :: Integral a => a data Rpcb Rpcb :: !UnsignedInt -> !UnsignedInt -> !(String 4294967295) -> !(String 4294967295) -> !(String 4294967295) -> Rpcb [rpcb'r_prog] :: Rpcb -> !UnsignedInt [rpcb'r_vers] :: Rpcb -> !UnsignedInt [rpcb'r_netid] :: Rpcb -> !(String 4294967295) [rpcb'r_addr] :: Rpcb -> !(String 4294967295) [rpcb'r_owner] :: Rpcb -> !(String 4294967295) data Rp__list Rp__list :: !Rpcb -> !(Optional Rp__list) -> Rp__list [rp__list'rpcb_map] :: Rp__list -> !Rpcb [rp__list'rpcb_next] :: Rp__list -> !(Optional Rp__list) type Rpcblist_ptr = Optional Rp__list data Rpcb_rmtcallargs Rpcb_rmtcallargs :: !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !(Opaque 4294967295) -> Rpcb_rmtcallargs [rpcb_rmtcallargs'prog] :: Rpcb_rmtcallargs -> !UnsignedInt [rpcb_rmtcallargs'vers] :: Rpcb_rmtcallargs -> !UnsignedInt [rpcb_rmtcallargs'proc] :: Rpcb_rmtcallargs -> !UnsignedInt [rpcb_rmtcallargs'args] :: Rpcb_rmtcallargs -> !(Opaque 4294967295) data Rpcb_rmtcallres Rpcb_rmtcallres :: !(String 4294967295) -> !(Opaque 4294967295) -> Rpcb_rmtcallres [rpcb_rmtcallres'addr] :: Rpcb_rmtcallres -> !(String 4294967295) [rpcb_rmtcallres'results] :: Rpcb_rmtcallres -> !(Opaque 4294967295) data Rpcb_entry Rpcb_entry :: !(String 4294967295) -> !(String 4294967295) -> !UnsignedInt -> !(String 4294967295) -> !(String 4294967295) -> Rpcb_entry [rpcb_entry'r_maddr] :: Rpcb_entry -> !(String 4294967295) [rpcb_entry'r_nc_netid] :: Rpcb_entry -> !(String 4294967295) [rpcb_entry'r_nc_semantics] :: Rpcb_entry -> !UnsignedInt [rpcb_entry'r_nc_protofmly] :: Rpcb_entry -> !(String 4294967295) [rpcb_entry'r_nc_proto] :: Rpcb_entry -> !(String 4294967295) data Rpcb_entry_list Rpcb_entry_list :: !Rpcb_entry -> !(Optional Rpcb_entry_list) -> Rpcb_entry_list [rpcb_entry_list'rpcb_entry_map] :: Rpcb_entry_list -> !Rpcb_entry [rpcb_entry_list'rpcb_entry_next] :: Rpcb_entry_list -> !(Optional Rpcb_entry_list) type Rpcb_entry_list_ptr = Optional Rpcb_entry_list rpcb_highproc_2 :: Integral a => a rpcb_highproc_3 :: Integral a => a rpcb_highproc_4 :: Integral a => a rPCBSTAT_HIGHPROC :: Integral a => a rPCBVERS_STAT :: Integral a => a rPCBVERS_4_STAT :: Integral a => a rPCBVERS_3_STAT :: Integral a => a rPCBVERS_2_STAT :: Integral a => a data Rpcbs_addrlist Rpcbs_addrlist :: !UnsignedInt -> !UnsignedInt -> !Int -> !Int -> !(String 4294967295) -> !(Optional Rpcbs_addrlist) -> Rpcbs_addrlist [rpcbs_addrlist'prog] :: Rpcbs_addrlist -> !UnsignedInt [rpcbs_addrlist'vers] :: Rpcbs_addrlist -> !UnsignedInt [rpcbs_addrlist'success] :: Rpcbs_addrlist -> !Int [rpcbs_addrlist'failure] :: Rpcbs_addrlist -> !Int [rpcbs_addrlist'netid] :: Rpcbs_addrlist -> !(String 4294967295) [rpcbs_addrlist'next] :: Rpcbs_addrlist -> !(Optional Rpcbs_addrlist) data Rpcbs_rmtcalllist Rpcbs_rmtcalllist :: !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !Int -> !Int -> !Int -> !(String 4294967295) -> !(Optional Rpcbs_rmtcalllist) -> Rpcbs_rmtcalllist [rpcbs_rmtcalllist'prog] :: Rpcbs_rmtcalllist -> !UnsignedInt [rpcbs_rmtcalllist'vers] :: Rpcbs_rmtcalllist -> !UnsignedInt [rpcbs_rmtcalllist'proc] :: Rpcbs_rmtcalllist -> !UnsignedInt [rpcbs_rmtcalllist'success] :: Rpcbs_rmtcalllist -> !Int [rpcbs_rmtcalllist'failure] :: Rpcbs_rmtcalllist -> !Int [rpcbs_rmtcalllist'indirect] :: Rpcbs_rmtcalllist -> !Int [rpcbs_rmtcalllist'netid] :: Rpcbs_rmtcalllist -> !(String 4294967295) [rpcbs_rmtcalllist'next] :: Rpcbs_rmtcalllist -> !(Optional Rpcbs_rmtcalllist) type Rpcbs_proc = FixedArray 13 Int type Rpcbs_addrlist_ptr = Optional Rpcbs_addrlist type Rpcbs_rmtcalllist_ptr = Optional Rpcbs_rmtcalllist data Rpcb_stat Rpcb_stat :: !Rpcbs_proc -> !Int -> !Int -> !Rpcbs_addrlist_ptr -> !Rpcbs_rmtcalllist_ptr -> Rpcb_stat [rpcb_stat'info] :: Rpcb_stat -> !Rpcbs_proc [rpcb_stat'setinfo] :: Rpcb_stat -> !Int [rpcb_stat'unsetinfo] :: Rpcb_stat -> !Int [rpcb_stat'addrinfo] :: Rpcb_stat -> !Rpcbs_addrlist_ptr [rpcb_stat'rmtinfo] :: Rpcb_stat -> !Rpcbs_rmtcalllist_ptr type Rpcb_stat_byvers = FixedArray 3 Rpcb_stat data Netbuf Netbuf :: !UnsignedInt -> !(Opaque 4294967295) -> Netbuf [netbuf'maxlen] :: Netbuf -> !UnsignedInt [netbuf'buf] :: Netbuf -> !(Opaque 4294967295) type Rpc_string = String 4294967295 rPCBPROG :: RPCBPROG data RPCBPROG RPCBPROG :: !RPCBPROG'RPCBVERS -> !RPCBPROG'RPCBVERS4 -> RPCBPROG [rPCBPROG'RPCBVERS] :: RPCBPROG -> !RPCBPROG'RPCBVERS [rPCBPROG'RPCBVERS4] :: RPCBPROG -> !RPCBPROG'RPCBVERS4 data RPCBPROG'RPCBVERS RPCBPROG'RPCBVERS :: !(Procedure Rpcb Bool) -> !(Procedure Rpcb Bool) -> !(Procedure Rpcb Rpc_string) -> !(Procedure () Rpcblist_ptr) -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) -> !(Procedure () UnsignedInt) -> !(Procedure Rpc_string Netbuf) -> !(Procedure Netbuf Rpc_string) -> RPCBPROG'RPCBVERS [rPCBPROG'RPCBVERS'RPCBPROC_SET] :: RPCBPROG'RPCBVERS -> !(Procedure Rpcb Bool) [rPCBPROG'RPCBVERS'RPCBPROC_UNSET] :: RPCBPROG'RPCBVERS -> !(Procedure Rpcb Bool) [rPCBPROG'RPCBVERS'RPCBPROC_GETADDR] :: RPCBPROG'RPCBVERS -> !(Procedure Rpcb Rpc_string) [rPCBPROG'RPCBVERS'RPCBPROC_DUMP] :: RPCBPROG'RPCBVERS -> !(Procedure () Rpcblist_ptr) [rPCBPROG'RPCBVERS'RPCBPROC_CALLIT] :: RPCBPROG'RPCBVERS -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) [rPCBPROG'RPCBVERS'RPCBPROC_GETTIME] :: RPCBPROG'RPCBVERS -> !(Procedure () UnsignedInt) [rPCBPROG'RPCBVERS'RPCBPROC_UADDR2TADDR] :: RPCBPROG'RPCBVERS -> !(Procedure Rpc_string Netbuf) [rPCBPROG'RPCBVERS'RPCBPROC_TADDR2UADDR] :: RPCBPROG'RPCBVERS -> !(Procedure Netbuf Rpc_string) data RPCBPROG'RPCBVERS4 RPCBPROG'RPCBVERS4 :: !(Procedure Rpcb Bool) -> !(Procedure Rpcb Bool) -> !(Procedure Rpcb Rpc_string) -> !(Procedure () Rpcblist_ptr) -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) -> !(Procedure () UnsignedInt) -> !(Procedure Rpc_string Netbuf) -> !(Procedure Netbuf Rpc_string) -> !(Procedure Rpcb Rpc_string) -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) -> !(Procedure Rpcb Rpcb_entry_list_ptr) -> !(Procedure () Rpcb_stat_byvers) -> RPCBPROG'RPCBVERS4 [rPCBPROG'RPCBVERS4'RPCBPROC_SET] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb Bool) [rPCBPROG'RPCBVERS4'RPCBPROC_UNSET] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb Bool) [rPCBPROG'RPCBVERS4'RPCBPROC_GETADDR] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb Rpc_string) [rPCBPROG'RPCBVERS4'RPCBPROC_DUMP] :: RPCBPROG'RPCBVERS4 -> !(Procedure () Rpcblist_ptr) [rPCBPROG'RPCBVERS4'RPCBPROC_BCAST] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) [rPCBPROG'RPCBVERS4'RPCBPROC_GETTIME] :: RPCBPROG'RPCBVERS4 -> !(Procedure () UnsignedInt) [rPCBPROG'RPCBVERS4'RPCBPROC_UADDR2TADDR] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpc_string Netbuf) [rPCBPROG'RPCBVERS4'RPCBPROC_TADDR2UADDR] :: RPCBPROG'RPCBVERS4 -> !(Procedure Netbuf Rpc_string) [rPCBPROG'RPCBVERS4'RPCBPROC_GETVERSADDR] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb Rpc_string) [rPCBPROG'RPCBVERS4'RPCBPROC_INDIRECT] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb_rmtcallargs Rpcb_rmtcallres) [rPCBPROG'RPCBVERS4'RPCBPROC_GETADDRLIST] :: RPCBPROG'RPCBVERS4 -> !(Procedure Rpcb Rpcb_entry_list_ptr) [rPCBPROG'RPCBVERS4'RPCBPROC_GETSTAT] :: RPCBPROG'RPCBVERS4 -> !(Procedure () Rpcb_stat_byvers) pMAP_PORT :: Integral a => a data Mapping Mapping :: !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> Mapping [mapping'prog] :: Mapping -> !UnsignedInt [mapping'vers] :: Mapping -> !UnsignedInt [mapping'prot] :: Mapping -> !UnsignedInt [mapping'port] :: Mapping -> !UnsignedInt iPPROTO_TCP :: Integral a => a iPPROTO_UDP :: Integral a => a data Pmap Pmap :: !Mapping -> !Pmaplist -> Pmap [pmap'map] :: Pmap -> !Mapping [pmap'next] :: Pmap -> !Pmaplist type Pmaplist = Optional Pmap data Call_args Call_args :: !UnsignedInt -> !UnsignedInt -> !UnsignedInt -> !(Opaque 4294967295) -> Call_args [call_args'prog] :: Call_args -> !UnsignedInt [call_args'vers] :: Call_args -> !UnsignedInt [call_args'proc] :: Call_args -> !UnsignedInt [call_args'args] :: Call_args -> !(Opaque 4294967295) data Call_result Call_result :: !UnsignedInt -> !(Opaque 4294967295) -> Call_result [call_result'port] :: Call_result -> !UnsignedInt [call_result'res] :: Call_result -> !(Opaque 4294967295) pMAP_PROG :: PMAP_PROG data PMAP_PROG PMAP_PROG :: !PMAP_PROG'PMAP_VERS -> PMAP_PROG [pMAP_PROG'PMAP_VERS] :: PMAP_PROG -> !PMAP_PROG'PMAP_VERS data PMAP_PROG'PMAP_VERS PMAP_PROG'PMAP_VERS :: !(Procedure () ()) -> !(Procedure Mapping Bool) -> !(Procedure Mapping Bool) -> !(Procedure Mapping UnsignedInt) -> !(Procedure () Pmaplist) -> !(Procedure Call_args Call_result) -> PMAP_PROG'PMAP_VERS [pMAP_PROG'PMAP_VERS'PMAPPROC_NULL] :: PMAP_PROG'PMAP_VERS -> !(Procedure () ()) [pMAP_PROG'PMAP_VERS'PMAPPROC_SET] :: PMAP_PROG'PMAP_VERS -> !(Procedure Mapping Bool) [pMAP_PROG'PMAP_VERS'PMAPPROC_UNSET] :: PMAP_PROG'PMAP_VERS -> !(Procedure Mapping Bool) [pMAP_PROG'PMAP_VERS'PMAPPROC_GETPORT] :: PMAP_PROG'PMAP_VERS -> !(Procedure Mapping UnsignedInt) [pMAP_PROG'PMAP_VERS'PMAPPROC_DUMP] :: PMAP_PROG'PMAP_VERS -> !(Procedure () Pmaplist) [pMAP_PROG'PMAP_VERS'PMAPPROC_CALLIT] :: PMAP_PROG'PMAP_VERS -> !(Procedure Call_args Call_result) instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Call_result instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Call_result instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Call_args instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Call_args instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Pmap instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Pmap instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Mapping instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Mapping instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Netbuf instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Netbuf instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb_stat instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb_stat instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcbs_rmtcalllist instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcbs_rmtcalllist instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcbs_addrlist instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcbs_addrlist instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb_entry_list instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb_entry_list instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb_entry instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb_entry instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb_rmtcallres instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb_rmtcallres instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb_rmtcallargs instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb_rmtcallargs instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rp__list instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rp__list instance GHC.Show.Show Network.ONCRPC.Bind.Prot.Rpcb instance GHC.Classes.Eq Network.ONCRPC.Bind.Prot.Rpcb instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Call_result instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Call_args instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Pmap instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Mapping instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Netbuf instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb_stat instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcbs_rmtcalllist instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcbs_addrlist instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb_entry_list instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb_entry instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb_rmtcallres instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb_rmtcallargs instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rp__list instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Bind.Prot.Rpcb -- | Authentication mechanisms for RPC. module Network.ONCRPC.Auth -- | More translucent version of Opaque_auth union (not expressible -- in XDR) data Auth AuthNone :: Auth AuthSys :: !Authsys_parms -> Auth AuthOpaque :: !Opaque_auth -> Auth data Authsys_parms Authsys_parms :: !UnsignedInt -> !(String 255) -> !UnsignedInt -> !UnsignedInt -> !(Array 16 UnsignedInt) -> Authsys_parms [authsys_parms'stamp] :: Authsys_parms -> !UnsignedInt [authsys_parms'machinename] :: Authsys_parms -> !(String 255) [authsys_parms'uid] :: Authsys_parms -> !UnsignedInt [authsys_parms'gid] :: Authsys_parms -> !UnsignedInt [authsys_parms'gids] :: Authsys_parms -> !(Array 16 UnsignedInt) opacifyAuth :: Auth -> Opaque_auth unopacifyAuth :: Opaque_auth -> Auth -- | Get the appropriate, effective AuthSys value for the current process. -- You know, if you're into that sort of thing. getAuthUnix :: IO Auth instance GHC.Show.Show Network.ONCRPC.Auth.Auth instance GHC.Classes.Eq Network.ONCRPC.Auth.Auth instance Network.ONCRPC.XDR.Serial.XDR Network.ONCRPC.Auth.Auth -- | Higher-level for RPC messages. module Network.ONCRPC.Message -- | Call_body with parameters data Call a r Call :: !(Procedure a r) -> !Auth -> !Auth -> a -> Call a r [callProcedure] :: Call a r -> !(Procedure a r) [callCred] :: Call a r -> !Auth [callVerf] :: Call a r -> !Auth [callArgs] :: Call a r -> a -- | Reply_body with results data Reply a Reply :: !Auth -> a -> Reply a [replyVerf] :: Reply a -> !Auth [replyResults] :: Reply a -> a ReplyError :: !Auth -> !Accepted_reply_data -> Reply a [replyVerf] :: Reply a -> !Auth [replyError] :: Reply a -> !Accepted_reply_data ReplyRejected :: !Rejected_reply -> Reply a [replyRejected] :: Reply a -> !Rejected_reply -- | Missing/corrupt response ReplyFail :: String -> Reply a type ReplyException = Reply Void -- | The successful reply results or an error. replyResult :: Reply a -> Either ReplyException a -- | Construct a Reply based on an already-parsed Reply_body -- and to-be-parsed results. getReply :: XDR a => Reply_body -> Get (Reply a) -- | Rpc_msg with arguments or results. data Msg a r MsgCall :: XID -> Call a r -> Msg a r [msgXID] :: Msg a r -> XID [msgCall] :: Msg a r -> Call a r MsgReply :: XID -> Reply r -> Msg a r [msgXID] :: Msg a r -> XID [msgReply] :: Msg a r -> Reply r instance (GHC.Show.Show r, GHC.Show.Show a) => GHC.Show.Show (Network.ONCRPC.Message.Msg a r) instance GHC.Show.Show a => GHC.Show.Show (Network.ONCRPC.Message.Call a r) instance (Network.ONCRPC.XDR.Serial.XDR a, Network.ONCRPC.XDR.Serial.XDR r) => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.Message.Msg a r) instance GHC.Exception.Exception Network.ONCRPC.Message.ReplyException instance GHC.Show.Show a => GHC.Show.Show (Network.ONCRPC.Message.Reply a) instance GHC.Base.Functor Network.ONCRPC.Message.Reply instance Network.ONCRPC.XDR.Serial.XDR a => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.Message.Reply a) instance Network.ONCRPC.XDR.Serial.XDR a => Network.ONCRPC.XDR.Serial.XDR (Network.ONCRPC.Message.Call a r) -- | ONC RPC Client interface. Handles RPC client protocol layer. Clients -- are fully thread-safe, allowing multiple outstanding requests, and -- automatically reconnect on error. Currently error messages are just -- written to stdout. module Network.ONCRPC.Client -- | How to connect to an RPC server. Currently only TCP connections to -- pre-defined ports are supported (no portmap). data ClientServer -- | a known service by host/port, currently only TCP ClientServerPort :: HostName -> ServiceName -> ClientServer -- | Host name or IP address of server [clientServerHost] :: ClientServer -> HostName -- | Service name (not portmap) or port number [clientServerPort] :: ClientServer -> ServiceName -- | An RPC Client. data Client -- | Create a new RPC client to the given server. This client must be -- destroyed with closeClient when done. openClient :: ClientServer -> IO Client -- | Destroy an RPC client and close its underlying network connection. Any -- outstanding requests return ReplyFail, any any further attempt -- to use the Client may hang indefinitely. closeClient :: Client -> IO () -- | Send a call message using an open client, and wait for a reply, -- returning ReplyFail on protocol error. The request will be -- automatically retried until a response is received. clientCall :: (XDR a, XDR r) => Client -> Call a r -> IO (Reply r) -- | Set the credentials and verifier to use when calling rpcCall on -- a client. Note that you can safely use different sets of credentials -- with the same underlying connection this way. By default, both are set -- to AuthNone. setClientAuth :: Auth -> Auth -> Client -> Client -- | Make an RPC request. It waits for a response, retrying as necessary, -- or throws the RPCException, ReplyException, on any -- failure. This uses the credentials set by setClientAuth. If you -- need to retrieve the auth verifier, use clientCall. rpcCall :: (XDR a, XDR r) => Client -> Procedure a r -> a -> IO r -- | ONC (Sun) RPC: Remote Procedure Call Protocol Version 2 as described -- in RFC5531 -- -- This module should be imported qualified, e.g., as RPC. module Network.ONCRPC