+/*********************************************************************
+ *
+ * Function : default_exports
+ *
+ * Description : returns a struct map list that contains exports
+ * which are common to all CGI functions.
+ *
+ * Parameters :
+ * 1 : exports = Structure to write output to. This
+ * structure should be newly allocated and will be
+ * zeroed.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : caller = name of CGI who calls us and which should
+ * be excluded from the generated menu.
+ * Returns : NULL if no memory, else map
+ *
+ *********************************************************************/
+struct map *default_exports(const struct client_state *csp, const char *caller)
+{
+ char buf[20];
+ int local_help_exists = 0;
+ struct map * exports = new_map();
+
+ map(exports, "version", 1, VERSION, 1);
+ map(exports, "my-ip-address", 1, csp->my_ip_addr_str ? csp->my_ip_addr_str : "unknown", 1);
+ map(exports, "my-hostname", 1, csp->my_hostname ? csp->my_hostname : "unknown", 1);
+ map(exports, "homepage", 1, HOME_PAGE_URL, 1);
+ map(exports, "default-cgi", 1, HOME_PAGE_URL "/config", 1);
+ map(exports, "menu", 1, make_menu(caller), 0);
+ map(exports, "code-status", 1, CODE_STATUS, 1);
+
+ snprintf(buf, 20, "%d", csp->config->hport);
+ map(exports, "my-port", 1, buf, 1);
+
+ if(!strcmp(CODE_STATUS, "stable"))