Skip to content

Commit

Permalink
Added Wi-SUN border router implementation
Browse files Browse the repository at this point in the history
Creates ULA for mesh usage and publishes backbone prefix if available
to the mesh

If ethernet is configured to static prefix uses that as ULA
when it becomes available

Added API for starting and stopping Backbone functionality
  • Loading branch information
Mika Tervonen committed Oct 8, 2018
1 parent 1f7c040 commit e373545
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 71 deletions.
72 changes: 72 additions & 0 deletions nanostack/ws_bbr_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Copyright (c) 2017-2018, Arm Limited and affiliates.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/**
* \file ws_bbr_api.h
* \brief Wi-SUN backbone border router (BBR) application interface.
*
* This is Wi-SUN backbone Border router service.
* When started the module takes care of starting the
* components that enables default border router functionality in Wi-SUN network.
*
*/

#ifndef WS_BBR_API_H_
#define WS_BBR_API_H_

#include "ns_types.h"

/**
* Start backbone border router service.
*
* if backbone interface is enabled and allows routing.
* Enables ND proxy for address found from backbone
*
* \param interface_id Wi-SUN network interface id.
* \param backbone_interface_id backbone interface id.
*
* \return 0 on success
* \return <0 in case of errors
*
*/
int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);

/**
* Stop backbone Border router.
*
* \param interface_id interface ID of the Wi-SUN network
*
* \return 0 on success
* \return <0 in case of errors
*
*/
void ws_bbr_stop(int8_t interface_id);


#endif /* WS_BBR_API_H_ */
Loading

0 comments on commit e373545

Please sign in to comment.