Skip to content

Commit e373545

Browse files
author
Mika Tervonen
committed
Added Wi-SUN border router implementation
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
1 parent 1f7c040 commit e373545

File tree

2 files changed

+310
-71
lines changed

2 files changed

+310
-71
lines changed

nanostack/ws_bbr_api.h

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright (c) 2017-2018, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: BSD-3-Clause
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions are met:
7+
*
8+
* 1. Redistributions of source code must retain the above copyright
9+
* notice, this list of conditions and the following disclaimer.
10+
* 2. Redistributions in binary form must reproduce the above copyright
11+
* notice, this list of conditions and the following disclaimer in the
12+
* documentation and/or other materials provided with the distribution.
13+
* 3. Neither the name of the copyright holder nor the
14+
* names of its contributors may be used to endorse or promote products
15+
* derived from this software without specific prior written permission.
16+
*
17+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
* POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
30+
/**
31+
* \file ws_bbr_api.h
32+
* \brief Wi-SUN backbone border router (BBR) application interface.
33+
*
34+
* This is Wi-SUN backbone Border router service.
35+
* When started the module takes care of starting the
36+
* components that enables default border router functionality in Wi-SUN network.
37+
*
38+
*/
39+
40+
#ifndef WS_BBR_API_H_
41+
#define WS_BBR_API_H_
42+
43+
#include "ns_types.h"
44+
45+
/**
46+
* Start backbone border router service.
47+
*
48+
* if backbone interface is enabled and allows routing.
49+
* Enables ND proxy for address found from backbone
50+
*
51+
* \param interface_id Wi-SUN network interface id.
52+
* \param backbone_interface_id backbone interface id.
53+
*
54+
* \return 0 on success
55+
* \return <0 in case of errors
56+
*
57+
*/
58+
int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);
59+
60+
/**
61+
* Stop backbone Border router.
62+
*
63+
* \param interface_id interface ID of the Wi-SUN network
64+
*
65+
* \return 0 on success
66+
* \return <0 in case of errors
67+
*
68+
*/
69+
void ws_bbr_stop(int8_t interface_id);
70+
71+
72+
#endif /* WS_BBR_API_H_ */

0 commit comments

Comments
 (0)