packages feed

ccnx (empty) → 0.0.0

raw patch · 5 files changed

+179/−0 lines, 5 filesdep +basedep +bytestringsetup-changed

Dependencies added: base, bytestring

Files

+ LICENSE view
@@ -0,0 +1,27 @@+Copyright (c) Tom Hawkins 2010++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+1. Redistributions of source code must retain the above copyright+   notice, this list of conditions and the following disclaimer.+2. Redistributions in binary form must reproduce the above copyright+   notice, this list of conditions and the following disclaimer in the+   documentation and/or other materials provided with the distribution.+3. Neither the name of the author nor the names of his contributors+   may be used to endorse or promote products derived from this software+   without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF+SUCH DAMAGE.
+ Network/CCNx.hs view
@@ -0,0 +1,6 @@+module Network.CCNx+  ( module Network.CCNx.Messages+  ) where++import Network.CCNx.Messages+
+ Network/CCNx/Messages.hs view
@@ -0,0 +1,106 @@+module Network.CCNx.Messages+  ( Message   (..)+  , ContentObject (..)+  , Content+  , Name+  , Component+  , SignedInfo (..)+  , Interest (..)+  , PublisherPublicKeyDigest+  , Exclude (..)+  , AnyBloom (..)+  , ChildSelector+  , AnswerOriginKind+  , Scope+  , Nonce+  , MinSuffixComponents+  , MaxSuffixComponents+  , Timestamp+  , FreshnessSeconds+  , FinalBlockID+  , Type (..)+  , KeyLocator (..)+  , Signature (..)+  , DigestAlgorithm+  , Witness+  , SignatureBits+  , PublisherID (..)+  ) where++import Data.ByteString (ByteString)+import Data.Word++-- | The two types of CCNx messages.+data Message+  = ContentObjectMessage  ContentObject+  | InterestMessage Interest++data ContentObject = ContentObject+  Signature+  Name+  SignedInfo+  Content++type Content = ByteString++type Name = [Component]++type Component = String++data SignedInfo = SignedInfo+  PublisherPublicKeyDigest+  Timestamp+  (Maybe Type)+  (Maybe FreshnessSeconds)+  (Maybe FinalBlockID)+  (Maybe KeyLocator)++data Interest = Interest+  Name+  (Maybe MinSuffixComponents)+  (Maybe MaxSuffixComponents)+  (Maybe PublisherID)+  (Maybe Exclude)+  (Maybe ChildSelector)+  (Maybe AnswerOriginKind)+  (Maybe Scope)+  (Maybe Nonce)++type PublisherPublicKeyDigest = String++data Exclude = Exclude (Maybe AnyBloom) [(Component, Maybe AnyBloom)]   ++data AnyBloom = Any | Bloom String++type ChildSelector = Int+type AnswerOriginKind = Int+type Scope = Int+type Nonce = String+type MinSuffixComponents = Int+type MaxSuffixComponents = Int+type Timestamp = Word16  -- 12 bit fraction+type FreshnessSeconds = Int+type FinalBlockID = String++data Type = DATA | ENCR | GONE | KEY | LINK | NACK++data KeyLocator+  = Key String+  | Certificate String+  | KeyName Name (Maybe PublisherID)++data Signature = Signature+  (Maybe DigestAlgorithm)+  (Maybe Witness)+  SignatureBits++type DigestAlgorithm = String+type Witness = String+type SignatureBits = String++data PublisherID+  = PublisherIDPublisherPublicKeyDigest PublisherPublicKeyDigest+  | PublisherCertificateDigest String+  | PublisherIssuerKeyDigest String+  | PublisherIssuerCertificateDigest String+
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ ccnx.cabal view
@@ -0,0 +1,38 @@+name:    ccnx+version: 0.0.0++category: Network++synopsis: A Haskell implementation of the CCNx network protocol.++description:+  TODO++author:     Tom Hawkins <tomahawkins@gmail.com>+maintainer: Tom Hawkins <tomahawkins@gmail.com>++license:      BSD3+license-file: LICENSE++homepage: http://tomahawkins.org++build-type:    Simple+cabal-version: >= 1.6++library+    build-depends:+        base       >= 4.2     && < 5,+        bytestring >= 0.9.1.6 && < 0.9.2++    exposed-modules:+        Network.CCNx+        Network.CCNx.Messages++    extensions:++    ghc-options: -W++source-repository head+    type:     git+    location: git://github.com/tomahawkins/ccnx.git+