Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nfn_merge' of github.com:cn-uofbasel/ccn-lite into nfn_…
…merge
- Loading branch information
Showing
35 changed files
with
377 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.DS_Store | ||
*.class | ||
*.log | ||
|
||
# sbt specific | ||
.cache/ | ||
.history/ | ||
.lib/ | ||
dist/* | ||
target/ | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
|
||
# Scala-IDE specific | ||
.scala_dependencies | ||
|
||
# IntelliJ | ||
.idea/ | ||
*.iml | ||
|
||
# Sublime | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# Vim | ||
*.swp | ||
|
||
# omnet | ||
*.tkenvlog | ||
omnetreplay/.tkenvrc | ||
omnetreplay/Makefile | ||
omnetreplay/contentto_m.cc | ||
omnetreplay/contentto_m.h | ||
omnetreplay/interestto_m.cc | ||
omnetreplay/interestto_m.h | ||
omnetreplay/omnetintegration | ||
omnetreplay/omnetreplay | ||
omnetreplay/out* | ||
omnetreplay/NFNNetwork.ned | ||
omnetreplay/transmittedPackets.json | ||
|
||
*.dSYM/* | ||
|
||
# Scala NFN | ||
*.jno | ||
*.so | ||
*c_xml.txt | ||
failed-messages | ||
service-library | ||
temp-bytecode-content |
45 changes: 0 additions & 45 deletions
45
nfn-scala/ccnliteinterface/src/main/c/ccn-lite-bridge/ccnliteinterface_CCNLiteInterface.h
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
...cnliteinterface/src/main/c/ccn-lite-bridge/ccnliteinterface_jni_CCNLiteInterfaceCCNbJni.h
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+55.3 KB
...cn-lite-bridge/libCCNLiteInterface.jnilib → ...-bridge/libCCNLiteInterfaceCCNbJni.jnilib
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
nfn-scala/ccnliteinterface/src/main/scala/ccnliteinterface/jni/CCNLiteInterfaceCCNbJni.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package ccnliteinterface.jni | ||
|
||
import ccnliteinterface.CCNLiteInterface | ||
|
||
/** | ||
* Created by basil on 03/09/14. | ||
*/ | ||
class CCNLiteInterfaceCCNbJni extends CCNLiteInterface { | ||
System.loadLibrary("CCNLiteInterfaceCCNbJni") | ||
|
||
/** | ||
* Native call to create a binary interest for name components | ||
* @param nameCmps Each element of this array is a seperate component for the interest name | ||
* @return Binary data of interest in ccnb format | ||
*/ | ||
@native def mkBinaryInterest(nameCmps: Array[String]): Array[Byte] | ||
|
||
/** | ||
* Native call to create a binary content object for name compoents and given data | ||
* @param name Each elemet of this array is a separate component for the content name | ||
* @param data Binary data of the content object | ||
* @return Binary data of the content in ccnb format | ||
*/ | ||
@native def mkBinaryContent(name: Array[String], data: Array[Byte]): Array[Byte] | ||
|
||
/** | ||
* Creates an xml representation for ccnb formated data. | ||
* attribute dt for the data element represents the encoding of the data. Currently "string" or "base64" is supported. | ||
* String is fragile because it can contain unescaped characters. | ||
* | ||
* Interest(["cmp1", "cmp2"]: | ||
* <interest> | ||
* <name> | ||
* <component> | ||
* <data size="4" dt="string"> | ||
* cmp1 | ||
* </data> | ||
* </component> | ||
* <component> | ||
* <data size="4" dt="string"> | ||
* cmp2 | ||
* </data> | ||
* </component> | ||
* </name> | ||
* <scope> | ||
* <data size="0" dt="string"> | ||
* | ||
* </data> | ||
* </scope> | ||
* <nonce> | ||
* <data size="4" dt="string"> | ||
* '%0d0S | ||
* </data> | ||
* </nonce> | ||
* </interest> | ||
* | ||
* Content(["cmp1", "cmp2"], "content"): | ||
* <contentobj> | ||
* <name> | ||
* <component> | ||
* <data size="4" dt="string"> | ||
* "cmp1" | ||
* </data> | ||
* </component> | ||
* <component> | ||
* <data size="4" dt="string"> | ||
* "cmp2" | ||
* </data> | ||
* </component> | ||
* </name> | ||
* <timestamp> | ||
* <data size="6" dt="string"> | ||
* S0%0d'%07/ | ||
* </data> | ||
* </timestamp> | ||
* <signedinfo> | ||
* <publisherPubKeyDigest> | ||
* <data size="0" dt="string"> | ||
* </data> | ||
* </publisherPubKeyDigest> | ||
* </signedinfo> | ||
* <content> | ||
* <data size="8" dt="string"> | ||
* content | ||
* </data> | ||
* </content> | ||
* <contentobj> | ||
* | ||
* @param binaryPacket Data in ccnb format | ||
* @return A string containing the xml representation of the ccnb data | ||
*/ | ||
@native def ccnbToXml(binaryPacket: Array[Byte]): String | ||
|
||
/** | ||
* Creates an ccnb format interest to add a content object to the localAbstractMachine ccn cache. | ||
* The content object itself must formated in ccnb and stored in a file. | ||
* @param ccnbAbsoluteFilename Filename of the file containing the content object formated in ccnb | ||
* @return Binary data of the interest in ccnb format | ||
*/ | ||
@native def mkAddToCacheInterest(ccnbAbsoluteFilename: String): Array[Byte] | ||
|
||
|
||
} |
Oops, something went wrong.