Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers whiteboard_api.h Source File

whiteboard_api.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2011-2017, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef WHITEBOARD_API_H_
00019 #define WHITEBOARD_API_H_
00020 
00021 #include "net_interface.h"
00022 
00023 /**
00024  * \file whiteboard_api.h
00025  * \brief An API for DAD, intercepting messages from backhaul network and keeping track of routes inside the PAN.
00026  */
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00032 /**
00033  * \struct whiteboard_entry_t
00034  * \brief A structure describing a whiteboarding entry.
00035  */
00036 typedef struct whiteboard_entry_t {
00037     uint8_t                         address[16];        /**< Registered IP address. */
00038     uint_least24_t                  ttl;                /**< Whiteboard entry TTL (seconds). */
00039     uint8_t                         eui64[8];           /**< EUI-64 of node that IP address is registered to. */
00040     int8_t                          interface_index;    /**< Interface id */
00041 } whiteboard_entry_t;
00042 
00043 /**
00044  * \brief Read whiteboard entries
00045  * \param cur NULL to read first entry, or get next entry after cur.
00046  * \return A pointer to whiteboard_entry_t structure.
00047  */
00048 extern whiteboard_entry_t *whiteboard_get(whiteboard_entry_t *cur);
00049 
00050 /**
00051  * @brief Whiteboard_set_device_hard_limit Sets the absolut limit of child devices this device can handle.
00052  *        This is very useful in situations, where 1 GW drops from network and causes it's children
00053  *        to join other GW networks. This might cause other GWs to run out of memory.
00054  * @param limit Absolute maximum amount of devices allowed to join. Default value=0 means unlimited (as long as there is memory)
00055  */
00056 extern void whiteboard_set_device_hard_limit(uint16_t limit);
00057 
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061 #endif /* WHITEBOARD_API_H_ */