Skip to content

Commit bcce0ed

Browse files
author
Mika Tervonen
committed
Clarified border router routing table API description
Fixed description to use entry counts instead of data amount
1 parent e4630a4 commit bcce0ed

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

nanostack/ws_bbr_api.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ int ws_bbr_info_get(int8_t interface_id, bbr_information_t *info_ptr);
130130
*
131131
* Table is Parent child relation using the Global address IID of the devices
132132
* To get the full IPv6 address of the device.
133-
* IPv6 = Global Prefix + IID.
133+
* IPv6 = Global Prefix + IID.
134134
*
135-
* Routing table is in the format: 18 bytes per entry
135+
* Routing table is in the format: 16 bytes per entry
136136
* | Node IID 8 bytes | parent IID 8 bytes |
137137
* | 1122112211221122 | 1111111111111111 |
138138
* | 1133113311331133 | 1111111111111111 |
@@ -142,15 +142,18 @@ int ws_bbr_info_get(int8_t interface_id, bbr_information_t *info_ptr);
142142
* | 1177117711771177 | 1155115511551155 |
143143
* | 1188118811881188 | 1177117711771177 |
144144
*
145-
* Order is not assured only parent child link is given in random order
145+
* Order is not assured only parent child link is given in random order,
146146
*
147-
* Return value is device amount in network divided by 16 bytes per route entry
147+
* When preparing to call this function ws_bbr_info_get function should be called to get the amount of devices in the network.
148+
* Memory for table is allocated based on the size of network and needs to be sizeof(bbr_route_info_t) * amount of entries.
148149
*
149-
* \param interface_id interface ID of the Wi-SUN network
150-
* \param table_ptr Application allocated memory block where routing table is written.
150+
* Return value is amount of route entries written to the table.
151+
*
152+
* \param interface_id interface ID of the Wi-SUN network.
153+
* \param table_ptr Application allocated memory where routing table is written.
151154
* \param table_len Length of the table allocated by application given as amount of entries.
152155
*
153-
* \return 0 - x on success indicates amount of bytes written to the table_ptr
156+
* \return 0 - x on success indicates amount of Route entries written to the table_ptr
154157
* \return <0 in case of errors
155158
*
156159
*/

0 commit comments

Comments
 (0)