You can build a documentation for the gateway adding:
to the configure options. You'll need Doxygen and Graphviz installed.