Hi,
So I believe what you mean is that the original router code should have a function defined to return the mapping table data, this function should be called in the .c file containing the rpc callback function (the one generated using lnctool), and the callback function's purpose is to transform this acquired data into xml document conforming to the format specified in the YANG file.
So the rpc callback function should perform the following functions:
1)calls the function in original router code that returns real-time mapping table data
2)creates XML document according to format specified in the YANG file
3)add the data of the mapping table into the corresponding nodes in the XML document
4)return the XML document
Is my understanding correct?
Best Regards,
Peter