aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/object_private.h
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2023-01-24 01:46:29 +0100
committerMauro Sardara <msardara@cisco.com>2023-02-09 13:51:14 +0000
commit0ac147d632ed6a150bf0216964888a21b1c8d43c (patch)
tree11bd1fb98916e9f2d464357deebb7c57a7b10e74 /ctrl/libhicnctrl/src/object_private.h
parente30c3a102081ccf345c457658dc557703fae67bb (diff)
feat: libhicnctrl: new API to allow sending MAP-Me command on specific face
Change-Id: Iac39a1d145a5c1b4f19e1fa35d713ca720393760 Ticket: HICN-832 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com> (cherry picked from commit 49776ceac54eecadabca6c0e2fdc0b9ee2e8e663)
Diffstat (limited to 'ctrl/libhicnctrl/src/object_private.h')
-rw-r--r--ctrl/libhicnctrl/src/object_private.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/ctrl/libhicnctrl/src/object_private.h b/ctrl/libhicnctrl/src/object_private.h
index 2be12fd5e..1aea86639 100644
--- a/ctrl/libhicnctrl/src/object_private.h
+++ b/ctrl/libhicnctrl/src/object_private.h
@@ -1,11 +1,33 @@
+/*
+ * Copyright (c) 2021-2023 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.
+ */
+
+/**
+ * \file object_private.h
+ * \brief Helper functions for object management.
+ */
+
#ifndef HICNCTRL_OBJECT_PRIVATE_H
#define HICNCTRL_OBJECT_PRIVATE_H
+#include <hicn/face.h>
+
#define INT_CMP(x, y) ((x > y) ? 1 : (x < y) ? -1 : 0)
// XXX Those are always true
#define IS_VALID_ADDRESS(x) (1)
-#define IS_VALID_CONNECTION_ID(x) (1) // XXX ID
+#define IS_VALID_CONNECTION_ID(x) (x != INVALID_FACE_ID)
#define IS_VALID_ROUTE_COST(x) (1)
#define IS_VALID_PREFIX_LEN(x) (1)
#define IS_VALID_POLICY(x) (1)