X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fntsim-ng%2Futils%2Fnts_utils.h;fp=ntsimulator%2Fntsim-ng%2Futils%2Fnts_utils.h;h=29f39446b361745c0399121b67702d831961c550;hb=f1d5c9198acde7a7ce296490087cad37e008f688;hp=0000000000000000000000000000000000000000;hpb=f2d8f1002fa93848c80a88e5658db4816cba3020;p=sim%2Fo1-interface.git diff --git a/ntsimulator/ntsim-ng/utils/nts_utils.h b/ntsimulator/ntsim-ng/utils/nts_utils.h new file mode 100644 index 0000000..29f3944 --- /dev/null +++ b/ntsimulator/ntsim-ng/utils/nts_utils.h @@ -0,0 +1,61 @@ +/************************************************************************* +* +* Copyright 2020 highstreet technologies GmbH and others +* +* 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. +***************************************************************************/ + +#pragma once + +#include +#include +#include + +typedef enum { + UNKNOWN_MAPPING = 0, + DOCKER_MAPPING = 1, + HOST_MAPPING = 2, +} nts_mount_point_addressing_method_t; + +typedef struct { + char *protocol; + char *ip; + uint16_t port; + char *auth_method; + char *username; + char *password; + + char *url; +} ves_details_t; + +typedef struct { + char *ip; + uint16_t port; + uint16_t nc_callhome_port; + char *username; + char *password; + + char *protocol; + char *base_url; + char *auth_method; +} controller_details_t; + +cJSON* ves_create_common_event_header(const char *domain, const char *event_type, const char *source_name, const char *priority, int seq_id); + +nts_mount_point_addressing_method_t nts_mount_point_addressing_method_get(sr_session_ctx_t *current_session); + +ves_details_t *ves_endpoint_details_get(sr_session_ctx_t *current_session); +void ves_details_free(ves_details_t *instance); + +controller_details_t *controller_details_get(sr_session_ctx_t *current_session); +void controller_details_free(controller_details_t *instance);