|
| Network.AdHoc.Message | | Maintainer | Henning Guenther |
|
|
|
| Description |
| This module contains types representing the different kinds of
messages defined by the protocol.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data CipherType |
| Specifies the encryption algorithm used to encrypt a message
| | Constructors | | CipherDES_CBC | | | CipherNone | | | CipherUnknown String | An unknown cipher was used
|
| Instances | |
|
|
| type TTL = Word16 |
| TimeToLive has a maximum of 360, so 16 bit unsigned is enough to hold it
|
|
| type Delay = Word |
| The message-delay can be represented by this type.
|
|
| data Attachment |
| An attachmet as defined in the protocoll.
| | Constructors | | Attachment | | | attachmentFilename :: String | Name of the attached file
| | attachmentAppType :: String | Mime-type of the very same
| | attachmentContent :: ByteString | The actual content of the file
|
|
| Instances | |
|
|
| data EncryptedAttachment |
| An attachment that has been encrypted.
| | Constructors | | EncryptedAttachment | | | encryptedAttachmentFilename :: (Encrypted String) | Encrypted filename
| | encryptedAttachmentAppType :: (Encrypted String) | Encrypted mime-type
| | encryptedAttachmentContent :: (Encrypted ByteString) | Encrypted content
|
|
| Instances | |
|
|
| encryptAttachment |
|
|
| decryptAttachment |
|
|
| data Routed a sign |
| A class of messages that can be routed.
| | Constructors | | Routed | | | routedTTL :: TTL | The time-to-live of the message
| | routedUserID :: UserID | Receiver of the routed message
| | routedMsgID :: MessageID | ID of the routed message
| | routedContent :: a | The actual content of the message
| | routedSignature :: sign | Signature of the message
|
|
| Instances | |
|
|
| type UnsignedMessage = ProtocolMessage NoSignature |
| An unsigned message.
|
|
| type InternalMessage = ProtocolMessage InternalSignature |
| An internal message that is subject to internal signature guidelines.
|
|
| type ExternalMessage = ProtocolMessage ExternalSignature |
| An external message.
|
|
| data ProtocolMessage sign |
| Basic protocol message representation.
| | Constructors | | Hello | Informs about a user on the sending node, giving the user-id, the protocol version and a friendly greeting
| | helloSenders :: [UserID] | | | helloVersion :: Int | | | helloGreeting :: (Maybe String) | |
| | Ack | Sender of the original message and the sended message-id
| | | Routing | Routing informations, a list of users and how much hops it takes to reach them
| | routingRoutes :: [(UserID, Int)] | |
| | Target (Routed TargetContent sign) | Messages with one specified receiver
| | Flood (Routed FloodContent sign) | Messages flooded through the network
| | Obscure (Routed (RSAEncrypted String) ()) | Obscure messages
|
| Instances | |
|
|
| data TargetContent |
| Messages directed to a specified receiver.
| | Constructors | | Nack (Routed TargetContent ExternalSignature) | Negative ACK
| | GetCertificate | Requesting a certificate
| | | Certificate | Transmitting a certificate
| | certificateReceivers :: [UserID] | | | certificateFor :: UserID | | | certificateData :: ByteString | |
| | Message | A chat message
| | | GetKey | Key request for a private channel
| | | Key | Key message for a private channel
| |
| Instances | |
|
|
| data FloodContent |
| Messages flooded throughout the entire network.
| | Constructors | | Channel | Channel announcements
| | channelChannelName :: ChannelName | | | channelChannelID :: ChannelID | | | channelChannelTitle :: String | | | channelUsers :: [UserID] | | | channelPrivate :: Bool | |
| | Join | Join message for a channel
| | | Leave | The users leaves a channel
| | | Anonymous | An anonymous message that has been unpacked and will be flooded
| | anonymousText :: String | | | anonymousAttachments :: [Attachment] | | | anonymousTime :: UTCTime | | | anonymousDelay :: Delay | |
|
| Instances | |
|
|
| data MessageContent |
| A messages content can either be encrypted or not.
| | Constructors | | Instances | |
|
|
| decrementTTL :: Routed a sign -> Maybe (Routed a sign) |
| Decrements the time-to-live of a message. If it sinks under zero,
Nothing is returned. Just msg otherwise, where msg has a
decremented ttl.
|
|
| routeTo :: Routed TargetContent sign -> [UserID] |
| Extracts the information from a message, that indicates, where to
route it.
|
|
| Produced by Haddock version 0.8 |