diff options
author | 2018-02-26 11:01:44 +0100 | |
---|---|---|
committer | 2018-02-26 11:13:24 +0100 | |
commit | 82a8803fc86680a149d43181f43b1ac4f69a359d (patch) | |
tree | e0bfc826179caeb193550a624f008f55e1ad20cb /apps/iping/iPing_Common.c | |
parent | 95f3619c8be677bcd9cf3bb320c7262bbe6dc44b (diff) |
Removed old iPing application.
New apps added:
iping-client: ping client that provides statistics regarding
the rtt and the losses.
It allows to configure the ping interval,
the interest lifetime, the ttl and the name.
iping-server: simple server replying to icnet-ping-client.
It allows to configure the reply size and the name.
Change-Id: I6b08333147acfaffd8becacb48f27f6c42dbeeb9
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'apps/iping/iPing_Common.c')
-rw-r--r-- | apps/iping/iPing_Common.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/apps/iping/iPing_Common.c b/apps/iping/iPing_Common.c deleted file mode 100644 index 9cc53559..00000000 --- a/apps/iping/iPing_Common.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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 "iPing_Common.h" - -#include <parc/security/parc_Security.h> -#include <parc/security/parc_Pkcs12KeyStore.h> -#include <parc/security/parc_IdentityFile.h> - -const size_t ccnxPing_DefaultReceiveTimeoutInUs = 1000000; // 1 second -const size_t ccnxPing_DefaultPayloadSize = 1400; -const size_t mediumNumberOfPings = 100; -const size_t smallNumberOfPings = 10; - -static PARCIdentity *_ccnxPingCommon_CreateAndGetIdentity(const char *keystoreName, - const char *keystorePassword, - const char *subjectName) { - parcSecurity_Init(); - - unsigned int keyLength = 1024; - unsigned int validityDays = 30; - - bool success = parcPkcs12KeyStore_CreateFile(keystoreName, keystorePassword, subjectName, keyLength, validityDays); - assertTrue(success, - "parcPkcs12KeyStore_CreateFile('%s', '%s', '%s', %d, %d) failed.", - keystoreName, - keystorePassword, - subjectName, - keyLength, - validityDays); - - PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, keystorePassword); - PARCIdentity *result = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity); - parcIdentityFile_Release(&identityFile); - - parcSecurity_Fini(); - - return result; -} - -CCNxPortalFactory *ccnxPingCommon_SetupPortalFactory(const char *keystoreName, - const char *keystorePassword, - const char *subjectName) { - PARCIdentity *identity = _ccnxPingCommon_CreateAndGetIdentity(keystoreName, keystorePassword, subjectName); - CCNxPortalFactory *result = ccnxPortalFactory_Create(identity); - parcIdentity_Release(&identity); - - return result; -} |