aboutsummaryrefslogtreecommitdiffstats
path: root/libccnx-portal/ccnx/api/ccnx_Portal/command-line
diff options
context:
space:
mode:
Diffstat (limited to 'libccnx-portal/ccnx/api/ccnx_Portal/command-line')
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/command-line/.gitignore5
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/command-line/CMakeLists.txt19
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c159
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-read.c136
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-write.c21
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c218
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.c44
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.h54
-rw-r--r--libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.c44
-rwxr-xr-xlibccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.h54
10 files changed, 754 insertions, 0 deletions
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/.gitignore b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/.gitignore
new file mode 100644
index 00000000..ebc1afaf
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/.gitignore
@@ -0,0 +1,5 @@
+ccnx-portal-read
+ccnx-portal-write
+*.o
+ccnx_server
+ccnx_client
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/CMakeLists.txt b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/CMakeLists.txt
new file mode 100644
index 00000000..6d0a3f09
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/CMakeLists.txt
@@ -0,0 +1,19 @@
+set(CCNX_CLIENT_SRC
+ ccnx-client.c
+ ccnxPortalClient_About.c
+ )
+
+set(CCNX_SERVER_SRC
+ ccnx-server.c
+ ccnxPortalServer_About.c
+ )
+
+
+
+add_executable(ccnx-client ${CCNX_CLIENT_SRC})
+target_link_libraries(ccnx-client ${CCNX_LINK_LIBRARIES})
+
+add_executable(ccnx-server ${CCNX_SERVER_SRC})
+target_link_libraries(ccnx-server ${CCNX_LINK_LIBRARIES})
+
+install(TARGETS ccnx-client ccnx-server RUNTIME DESTINATION bin )
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c
new file mode 100755
index 00000000..dfd5d5ba
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-client.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ */
+#include <config.h>
+
+#include <stdio.h>
+#include <unistd.h>
+#include <getopt.h>
+
+#include <LongBow/runtime.h>
+
+#include "ccnxPortalClient_About.h"
+
+#include <ccnx/api/ccnx_Portal/ccnx_Portal.h>
+#include <ccnx/api/ccnx_Portal/ccnx_PortalRTA.h>
+
+#include <parc/security/parc_Security.h>
+#include <parc/security/parc_IdentityFile.h>
+#include <parc/security/parc_PublicKeySigner.h>
+
+#include <parc/algol/parc_Memory.h>
+
+#include <parc/algol/parc_InputStream.h>
+#include <parc/algol/parc_OutputStream.h>
+
+int
+ccnGet(PARCIdentity *identity, CCNxName *name)
+{
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+
+ CCNxPortal *portal = ccnxPortalFactory_CreatePortal(factory, ccnxPortalRTA_Message);
+
+ assertNotNull(portal, "Expected a non-null CCNxPortal pointer.");
+
+ CCNxInterest *interest = ccnxInterest_CreateSimple(name);
+ ccnxName_Release(&name);
+
+ CCNxMetaMessage *message = ccnxMetaMessage_CreateFromInterest(interest);
+
+ if (ccnxPortal_Send(portal, message, CCNxStackTimeout_Never)) {
+ while (ccnxPortal_IsError(portal) == false) {
+ CCNxMetaMessage *response = ccnxPortal_Receive(portal, CCNxStackTimeout_Never);
+ if (response != NULL) {
+ if (ccnxMetaMessage_IsContentObject(response)) {
+ CCNxContentObject *contentObject = ccnxMetaMessage_GetContentObject(response);
+
+ PARCBuffer *payload = ccnxContentObject_GetPayload(contentObject);
+
+ size_t length = parcBuffer_Remaining(payload);
+ ssize_t nwritten = write(1, parcBuffer_Overlay(payload, length), length);
+ assertTrue(nwritten == length, "Did not write whole buffer, got %zd expected %zu", nwritten, length);
+
+ break;
+ }
+ ccnxMetaMessage_Release(&response);
+ }
+ }
+ }
+
+ ccnxPortal_Release(&portal);
+
+ ccnxPortalFactory_Release(&factory);
+
+ return 0;
+}
+
+void
+usage(void)
+{
+ printf("%s\n", ccnxPortalClientAbout_About());
+ printf("ccn-client --identity <file> --password <password> <objectName>\n");
+ printf("ccn-client [-h | --help]\n");
+ printf("ccn-client [-v | --version]\n");
+ printf("\n");
+ printf(" --identity The file name containing a PKCS12 keystore\n");
+ printf(" --password The password to unlock the keystore\n");
+ printf(" <objectName> The LCI name of the object to fetch\n");
+}
+
+int
+main(int argc, char *argv[argc])
+{
+ char *keystoreFile = NULL;
+ char *keystorePassword = NULL;
+
+ /* options descriptor */
+ static struct option longopts[] = {
+ { "identity", required_argument, NULL, 'f' },
+ { "password", required_argument, NULL, 'p' },
+ { "version", no_argument, NULL, 'v' },
+ { "help", no_argument, NULL, 'h' },
+ { NULL, 0, NULL, 0 }
+ };
+
+ int ch;
+ while ((ch = getopt_long(argc, argv, "fphv", longopts, NULL)) != -1) {
+ switch (ch) {
+ case 'f':
+ keystoreFile = optarg;
+ break;
+
+ case 'p':
+ keystorePassword = optarg;
+ break;
+
+ case 'v':
+ printf("%s\n", ccnxPortalClientAbout_Version());
+ return 0;
+
+ case 'h':
+ usage();
+ return 0;
+
+ default:
+ usage();
+ return -1;
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+ if (argv[0] == NULL || keystoreFile == NULL || keystorePassword == NULL) {
+ usage();
+ return -1;
+ }
+
+ char *objectName = argv[0];
+
+ PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreFile, keystorePassword);
+ if (parcIdentityFile_Exists(identityFile) == false) {
+ printf("Inaccessible keystore file '%s'.\n", keystoreFile);
+ exit(1);
+ }
+ PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
+ parcIdentityFile_Release(&identityFile);
+
+ CCNxName *name = ccnxName_CreateFromCString(objectName);
+
+ int result = ccnGet(identity, name);
+
+ parcIdentity_Release(&identity);
+ ccnxName_Release(&name);
+
+ return result;
+}
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-read.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-read.c
new file mode 100644
index 00000000..215d9019
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-read.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+
+#include <LongBow/runtime.h>
+
+#include <ccnx/api/ccnx_Portal/ccnx_Portal.h>
+
+#include <parc/security/parc_Security.h>
+#include <parc/security/parc_PublicKeySignerPkcs12Store.h>
+#include <parc/security/parc_IdentityFile.h>
+
+#include <ccnx/common/ccnx_Name.h>
+#include <ccnx/common/ccnx_SignedInfo.h>
+#include <ccnx/common/ccnx_ContentObject.h>
+#include <ccnx/common/ccnx_TimeStamp.h>
+
+PARCIdentity *
+getIdentity_FromFile(const char *keystoreFileName, const char *password)
+{
+ PARCIdentity *result = NULL;
+
+ PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreFileName, password);
+ if (identityFile != NULL) {
+ result = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
+ parcIdentityFile_Release(&identityFile);
+ }
+
+ return result;
+}
+
+int
+reader_writer(CCNxPortalFactory *factory, const char *uri)
+{
+ CCNxPortal *portal = ccnxPortalFactory_GetInstance(factory, ccnxPortalTypeDatagram, ccnxPortalProtocol_TLV, &ccnxPortalAttributes_Blocking);
+
+ CCNxName *prefix = ccnxName_CreateFromURI(uri);
+ CCNxName *bye = ccnxName_CreateFromURI("lci:/Hello/Goodbye%21");
+ CCNxName *contentname = ccnxName_CreateFromURI("lci:/Hello/World");
+
+ if (ccnxPortal_Listen(portal, prefix, 365 * 86400, CCNxStackTimeout_Never)) {
+ CCNxMetaMessage *msg;
+
+ while ((msg = ccnxPortal_Receive(portal, CCNxStackTimeout_Never)) != NULL) {
+ if (ccnxMetaMessage_IsInterest(msg)) {
+ CCNxInterest *interest = ccnxMetaMessage_GetInterest(msg);
+
+ CCNxName *interestName = ccnxInterest_GetName(interest);
+
+ if (ccnxName_Equals(interestName, contentname)) {
+ const PARCKeyId *publisherKeyId = ccnxPortal_GetKeyId(portal);
+
+ char buffer[128];
+ time_t theTime = time(0);
+ sprintf(buffer, "Hello World. The time is %s", ctime(&theTime));
+
+ PARCBuffer *payload = parcBuffer_CreateFromArray(buffer, 128);
+ parcBuffer_Flip(payload);
+
+ PARCBuffer *b = parcBuffer_Acquire(payload);
+ CCNxContentObject *uob = ccnxContentObject_CreateWithNameAndPayload(contentname, b);
+
+ // missing NULL check, case 1024
+
+ CCNxMetaMessage *message = ccnxMetaMessage_CreateFromContentObject(uob);
+ if (ccnxPortal_Send(portal, message, CCNxTransportStackTimeCCNxStackTimeout_Neverout_Never) == false) {
+ fprintf(stderr, "ccnx_write failed\n");
+ }
+ // ccnxMessage_Release(message);
+ } else if (ccnxName_Equals(interestName, bye)) {
+ break;
+ }
+ } else {
+ ccnxMetaMessage_Display(msg, 0);
+ }
+ ccnxMetaMessage_Release(&msg);
+ }
+ }
+
+ ccnxName_Release(&prefix);
+ ccnxName_Release(&bye);
+ ccnxName_Release(&contentname);
+
+ ccnxPortal_Release(&portal);
+
+ return 0;
+}
+
+int
+ccnx_Portal_Reader(char *keystoreFileName, const char *password, const char *uri)
+{
+ parcSecurity_Init();
+
+ PARCIdentity *identity = getIdentity_FromFile(keystoreFileName, password);
+
+ if (identity != NULL) {
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+
+ reader_writer(factory, uri);
+
+ ccnxPortalFactory_Release(&factory);
+ parcIdentity_Release(&identity);
+ }
+
+ parcSecurity_Fini();
+
+ return 0;
+}
+
+int
+main(int argc, char *argv[argc])
+{
+ char *keystoreFileName = argv[1];
+ char *password = argv[2];
+ char *uri = argv[3];
+
+ keystoreFileName = "/tmp/keystore";
+ password = "password";
+ uri = "lci:/Hello";
+
+ // read fileName password lci://my/name lci
+ return ccnx_Portal_Reader(keystoreFileName, password, uri);
+}
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-write.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-write.c
new file mode 100755
index 00000000..2bb8aadf
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-portal-write.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Needs to be implemented, case 1037
+int
+main(int argc, char *argv[argc])
+{
+ return 0;
+}
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c
new file mode 100755
index 00000000..a9d7a2e6
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnx-server.c
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ */
+#include <config.h>
+#include <LongBow/runtime.h>
+
+#include <time.h>
+
+#include <getopt.h>
+#include <stdio.h>
+
+#include "ccnxPortalServer_About.h"
+
+#include <ccnx/api/ccnx_Portal/ccnx_Portal.h>
+#include <ccnx/api/ccnx_Portal/ccnx_PortalRTA.h>
+
+#include <parc/algol/parc_Buffer.h>
+#include <parc/algol/parc_BufferComposer.h>
+#include <parc/algol/parc_Memory.h>
+#include <parc/security/parc_Security.h>
+#include <parc/security/parc_PublicKeySigner.h>
+#include <parc/security/parc_IdentityFile.h>
+
+#include <ccnx/common/ccnx_Name.h>
+
+extern PARCBuffer *makePayload(const CCNxName *interestName, const char *commandString);
+extern int ccnServe(const PARCIdentity *identity, const CCNxName *listenName, const char *commandString);
+extern void usage(void);
+
+PARCBuffer *
+makePayload(const CCNxName *interestName, const char *commandString)
+{
+ char *commandToExecute;
+
+ char *nameAsString = ccnxName_ToString(interestName);
+ int failure = asprintf(&commandToExecute, commandString, nameAsString);
+ assertTrue(failure > -1, "Error asprintf");
+ parcMemory_Deallocate((void **) &nameAsString);
+
+ PARCBufferComposer *accumulator = parcBufferComposer_Create();
+
+ FILE *fp = popen(commandToExecute, "r");
+ if (fp != NULL) {
+ unsigned char buffer[1024];
+
+ while (feof(fp) == 0) {
+ size_t length = fread(buffer, sizeof(char), sizeof(buffer), fp);
+ parcBufferComposer_PutArray(accumulator, buffer, length);
+ }
+ pclose(fp);
+ } else {
+ parcBufferComposer_PutString(accumulator, "Cannot execute: ");
+ parcBufferComposer_PutString(accumulator, commandString);
+ }
+
+ PARCBuffer *payload = parcBufferComposer_ProduceBuffer(accumulator);
+ parcBufferComposer_Release(&accumulator);
+
+ return payload;
+}
+
+int
+ccnServe(const PARCIdentity *identity, const CCNxName *listenName, const char *commandString)
+{
+ parcSecurity_Init();
+
+ CCNxPortalFactory *factory = ccnxPortalFactory_Create(identity);
+
+ CCNxPortal *portal = ccnxPortalFactory_CreatePortal(factory, ccnxPortalRTA_Message);
+ assertNotNull(portal, "Expected a non-null CCNxPortal pointer.");
+
+ if (ccnxPortal_Listen(portal, listenName, 365 * 86400, CCNxStackTimeout_Never)) {
+ while (true) {
+ CCNxMetaMessage *request = ccnxPortal_Receive(portal, CCNxStackTimeout_Never);
+
+ if (request == NULL) {
+ break;
+ }
+
+ CCNxInterest *interest = ccnxMetaMessage_GetInterest(request);
+
+ if (interest != NULL) {
+ CCNxName *interestName = ccnxInterest_GetName(interest);
+
+ PARCBuffer *payload = makePayload(interestName, commandString);
+
+ CCNxContentObject *contentObject = ccnxContentObject_CreateWithNameAndPayload(interestName, payload);
+
+ CCNxMetaMessage *message = ccnxMetaMessage_CreateFromContentObject(contentObject);
+ if (ccnxPortal_Send(portal, message, CCNxStackTimeout_Never) == false) {
+ fprintf(stderr, "ccnxPortal_Write failed: %d\n", ccnxPortal_GetError(portal));
+ }
+ {
+ char *name = ccnxName_ToString(interestName);
+ time_t theTime = time(0);
+ char *time = ctime(&theTime);
+ printf("%24.24s %s\n", time, name);
+ parcMemory_Deallocate((void **) &name);
+ }
+
+ parcBuffer_Release(&payload);
+ }
+ ccnxMetaMessage_Release(&request);
+ }
+ }
+
+ ccnxPortal_Release(&portal);
+
+ ccnxPortalFactory_Release(&factory);
+
+ parcSecurity_Fini();
+
+ return 0;
+}
+
+void
+usage(void)
+{
+ printf("ccnx-server --identity <file> --password <password> lci:/ccn-name command-to-execute\n");
+ printf("ccnx-server [-h | --help]\n");
+ printf("ccnx-server [-v | --version]\n");
+ printf("\n");
+ printf(" --identity The file name containing a PKCS12 keystore\n");
+ printf(" --password The password to unlock the keystore\n");
+ printf(" lci:/ccn-name The LCI name of the object fetch\n");
+ printf(" program-to-execute The program to run (eg. /bin/date)\n");
+}
+
+int
+main(int argc, char *argv[argc])
+{
+ char *keystoreFile = NULL;
+ char *keystorePassword = NULL;
+ char *commandString = "/bin/date";
+ char *listenName = "lci:/Server";
+
+ /* options descriptor */
+ static struct option longopts[] = {
+ { "identity", required_argument, NULL, 'f' },
+ { "password", required_argument, NULL, 'p' },
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, 'v' },
+ { NULL, 0, NULL, 0 }
+ };
+
+ if (argc < 2) {
+ usage();
+ exit(1);
+ }
+
+ int ch;
+ while ((ch = getopt_long(argc, argv, "fphvc:", longopts, NULL)) != -1) {
+ switch (ch) {
+ case 'f':
+ keystoreFile = optarg;
+ break;
+
+ case 'p':
+ keystorePassword = optarg;
+ break;
+
+ case 'v':
+ printf("%s\n", ccnxPortalServerAbout_Version());
+ return 0;
+
+ case 'h':
+ usage();
+ return 0;
+
+ default:
+ usage();
+ return -1;
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argv[0] == NULL || keystoreFile == NULL || keystorePassword == NULL) {
+ usage();
+ return -1;
+ }
+ listenName = argv[0];
+ commandString = argv[1];
+ argc += 2;
+
+ PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreFile, keystorePassword);
+
+ if (parcIdentityFile_Exists(identityFile) == false) {
+ printf("Inaccessible keystore file '%s'.\n", keystoreFile);
+ exit(1);
+ }
+
+ PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
+ parcIdentityFile_Release(&identityFile);
+
+ CCNxName *name = ccnxName_CreateFromCString(listenName);
+
+ int result = ccnServe(identity, name, commandString);
+
+ ccnxName_Release(&name);
+
+ return result;
+}
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.c
new file mode 100644
index 00000000..ff9465f8
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.c
@@ -0,0 +1,44 @@
+// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
+// longbow-generate-about 1.0.20170215.54ef86fe 2017-02-15T10:25:45Z
+
+#include "ccnxPortalClient_About.h"
+
+const char *ccnxPortalClient_What = "@(#)" "CCNx Portal Client " RELEASE_VERSION " 2017-02-22T13:21:28.462492"
+ "@(#)" "\tCopyright (c) 2017 Cisco and/or its affiliates.";
+
+const char *
+ccnxPortalClientAbout_Name(void)
+{
+ return "CCNx Portal Client";
+}
+
+const char *
+ccnxPortalClientAbout_Version(void)
+{
+ return RELEASE_VERSION;
+}
+
+const char *
+ccnxPortalClientAbout_About(void)
+{
+ return "CCNx Portal Client "RELEASE_VERSION " 2017-02-22T13:21:28.462492" "\nCopyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalClientAbout_MiniNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalClientAbout_ShortNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalClientAbout_LongNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n";
+}
+
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.h b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.h
new file mode 100755
index 00000000..df0c625d
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalClient_About.h
@@ -0,0 +1,54 @@
+// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
+// longbow-generate-about 1.0.20170215.54ef86fe 2017-02-15T10:25:45Z
+
+#ifndef ccnxPortalClient_About_h
+#define ccnxPortalClient_About_h
+/**
+ * Embedded string containing information for the what(1) command.
+ *
+ */
+extern const char *ccnxPortalClient_What;
+
+/**
+ * Return the name as a C string.
+ *
+ * @return The name as a C string.
+ */
+const char *ccnxPortalClientAbout_Name(void);
+
+/**
+ * Return the version as a C string.
+ *
+ * @return The version as a C string.
+ */
+const char *ccnxPortalClientAbout_Version(void);
+
+/**
+ * Return the About text as a C string.
+ *
+ * @return The About text as a C string.
+ */
+const char *ccnxPortalClientAbout_About(void);
+
+/**
+ * Return the minimum copyright notice as a C string.
+ *
+ * @return The minimum copyright notice as a C string.
+ */
+const char *ccnxPortalClientAbout_MiniNotice(void);
+
+/**
+ * Return the short copyright notice as a C string.
+ *
+ * @return The short copyright notice as a C string.
+ */
+const char *ccnxPortalClientAbout_ShortNotice(void);
+
+/**
+ * Return the long copyright notice as a C string.
+ *
+ * @return The long copyright notice as a C string.
+ */
+const char *ccnxPortalClientAbout_LongNotice(void);
+
+#endif // ccnxPortalClient_About_h
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.c b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.c
new file mode 100644
index 00000000..6596e1bd
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.c
@@ -0,0 +1,44 @@
+// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
+// longbow-generate-about 1.0.20170215.54ef86fe 2017-02-15T10:25:45Z
+
+#include "ccnxPortalServer_About.h"
+
+const char *ccnxPortalServer_What = "@(#)" "CCNx Portal Server " RELEASE_VERSION " 2017-02-22T13:21:39.498237"
+ "@(#)" "\tCopyright (c) 2017 Cisco and/or its affiliates.";
+
+const char *
+ccnxPortalServerAbout_Name(void)
+{
+ return "CCNx Portal Server";
+}
+
+const char *
+ccnxPortalServerAbout_Version(void)
+{
+ return RELEASE_VERSION;
+}
+
+const char *
+ccnxPortalServerAbout_About(void)
+{
+ return "CCNx Portal Server "RELEASE_VERSION " 2017-02-22T13:21:39.498237" "\nCopyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalServerAbout_MiniNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalServerAbout_ShortNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
+}
+
+const char *
+ccnxPortalServerAbout_LongNotice(void)
+{
+ return "Copyright (c) 2017 Cisco and/or its affiliates.\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n";
+}
+
diff --git a/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.h b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.h
new file mode 100755
index 00000000..fd95f81f
--- /dev/null
+++ b/libccnx-portal/ccnx/api/ccnx_Portal/command-line/ccnxPortalServer_About.h
@@ -0,0 +1,54 @@
+// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
+// longbow-generate-about 1.0.20170215.54ef86fe 2017-02-15T10:25:45Z
+
+#ifndef ccnxPortalServer_About_h
+#define ccnxPortalServer_About_h
+/**
+ * Embedded string containing information for the what(1) command.
+ *
+ */
+extern const char *ccnxPortalServer_What;
+
+/**
+ * Return the name as a C string.
+ *
+ * @return The name as a C string.
+ */
+const char *ccnxPortalServerAbout_Name(void);
+
+/**
+ * Return the version as a C string.
+ *
+ * @return The version as a C string.
+ */
+const char *ccnxPortalServerAbout_Version(void);
+
+/**
+ * Return the About text as a C string.
+ *
+ * @return The About text as a C string.
+ */
+const char *ccnxPortalServerAbout_About(void);
+
+/**
+ * Return the minimum copyright notice as a C string.
+ *
+ * @return The minimum copyright notice as a C string.
+ */
+const char *ccnxPortalServerAbout_MiniNotice(void);
+
+/**
+ * Return the short copyright notice as a C string.
+ *
+ * @return The short copyright notice as a C string.
+ */
+const char *ccnxPortalServerAbout_ShortNotice(void);
+
+/**
+ * Return the long copyright notice as a C string.
+ *
+ * @return The long copyright notice as a C string.
+ */
+const char *ccnxPortalServerAbout_LongNotice(void);
+
+#endif // ccnxPortalServer_About_h