Exemplo n.º 1
0
void
httpd_cgi_init(void)
{
#if  WEBSERVER_CONF_HEADER
  httpd_cgi_add(    &hdr);
#endif
#if  WEBSERVER_CONF_FILESTATS
  httpd_cgi_add(   &file);
#endif
#if  WEBSERVER_CONF_TCPSTATS
  httpd_cgi_add(    &tcp);
#endif
#if  WEBSERVER_CONF_PROCESSES
  httpd_cgi_add(   &proc);
#endif
#if  WEBSERVER_CONF_ADDRESSES
  httpd_cgi_add(   &adrs);
#endif
#if  WEBSERVER_CONF_NEIGHBORS
  httpd_cgi_add(   &nbrs);
#endif
#if  WEBSERVER_CONF_ROUTES
  httpd_cgi_add(   &rtes);
#endif
#if  WEBSERVER_CONF_SENSORS
  httpd_cgi_add(&sensors);
#endif
#if  WEBSERVER_CONF_TICTACTOE
  httpd_cgi_add( &tictac);
#endif
#if  WEBSERVER_CONF_AJAX
  httpd_cgi_add( &ajax);
#endif
}
Exemplo n.º 2
0
void
httpd_cgi_init(void)
{
    httpd_cgi_add(&file);
    httpd_cgi_add(&tcp);
    httpd_cgi_add(&proc);
}
Exemplo n.º 3
0
void
webserver_init(void)
{
  httpd_init();

  httpd_group_add(&main_group);
  httpd_group_add(&sensors_group);
  httpd_group_add(&status_group);
  httpd_group_add(&config_group);
  httpd_group_add(&statistics_group);
  httpd_group_add(&admin_group);

  httpd_group_add_page(&main_group, &webserver_main);
#if CETIC_NODE_INFO
  httpd_group_add_page(&sensors_group, &webserver_sensors_info);
  httpd_cgi_add(&webserver_sensor);
  httpd_group_add_page(&sensors_group, &webserver_sensors_tree);
  httpd_group_add_page(&sensors_group, &webserver_sensors_prr);
  httpd_group_add_page(&sensors_group, &webserver_sensors_ps);
  httpd_group_add_page(&sensors_group, &webserver_sensors_hc);
  httpd_cgi_command_add(&webserver_sensors_reset_stats_all_cmd);
  httpd_cgi_command_add(&webserver_sensor_reset_stats_cmd);
  httpd_cgi_command_add(&webserver_sensor_delete_node_cmd);
#endif
#if CETIC_NODE_CONFIG
  httpd_group_add_page(&sensors_group, &webserver_sensors_config);
#endif
  httpd_group_add_page(&status_group, &webserver_network);
#if UIP_CONF_IPV6_RPL
  httpd_group_add_page(&status_group, &webserver_rpl);
#endif
  httpd_group_add_page(&config_group, &webserver_config);
  httpd_group_add_page(&statistics_group, &webserver_statistics);
  if ((nvm_data.global_flags & CETIC_GLOBAL_DISABLE_CONFIG) == 0) {
#if UIP_CONF_IPV6_RPL
    httpd_cgi_command_add(&webserver_rpl_gr_cmd);
    httpd_cgi_command_add(&webserver_rpl_reset_cmd);
    httpd_cgi_command_add(&webserver_rpl_child_cmd);
#endif
    httpd_cgi_command_add(&webserver_network_route_add_cmd);
    httpd_cgi_command_add(&webserver_network_route_rm_cmd);
    httpd_cgi_command_add(&webserver_network_nbr_rm_cmd);
    httpd_cgi_command_add(&webserver_config_set_cmd);
    httpd_cgi_command_add(&webserver_config_reset_cmd);
    httpd_group_add_page(&admin_group, &webserver_admin);
    httpd_cgi_command_add(&webserver_admin_restart_cmd);
#if CONTIKI_TARGET_NATIVE
#if !CETIC_6LBR_ONE_ITF
    httpd_cgi_command_add(&webserver_admin_reset_slip_radio_cmd);
#endif
    httpd_cgi_command_add(&webserver_admin_reboot_cmd);
    httpd_cgi_command_add(&webserver_admin_halt_cmd);
    httpd_cgi_add(&webserver_log_send_log);
    httpd_cgi_add(&webserver_log_send_err);
    httpd_cgi_command_add(&webserver_log_clear_log_cmd);
    httpd_group_add_page(&admin_group, &webserver_plugins);
#endif
  }
}
Exemplo n.º 4
0
void
httpd_cgi_init(void)
{
  
  httpd_cgi_add(&sensors);
  httpd_cgi_add(&nodeid);
  httpd_cgi_add(&neighbors);

  announcement_register(&announcement, 31,
			received_announcement);
  announcement_listen(2);

  /*  neighbor_discovery_open(&conn, 31,
			  CLOCK_SECOND * 4,
			  CLOCK_SECOND * 20,
			  CLOCK_SECOND * 60,
			  &neighbor_discovery_callbacks);
			  neighbor_discovery_start(&conn, 0);*/
}
Exemplo n.º 5
0
void
httpd_cgi_init(void)
{
  httpd_cgi_add(&file);
  httpd_cgi_add(&tcp);
  httpd_cgi_add(&proc);
  httpd_cgi_add(&togglegreen);
#if WEBSERVER_CONF_STATUSPAGE && NETSTACK_CONF_WITH_IPV6
  httpd_cgi_add(&adrs);
  httpd_cgi_add(&nbrs);
  httpd_cgi_add(&rtes);
#endif
}
Exemplo n.º 6
0
void
httpd_cgi_init(void)
{
#if HTTPD_FS_STATISTICS
  httpd_cgi_add(   &file);
#endif
  httpd_cgi_add(    &tcp);
  httpd_cgi_add(   &proc);
  httpd_cgi_add(   &adrs);
  httpd_cgi_add(   &nbrs);
  httpd_cgi_add(   &rtes);
  httpd_cgi_add(&sensors);
}
Exemplo n.º 7
0
/*---------------------------------------------------------------------------*/
void
httpd_group_add_page(httpd_group_t *group, httpd_cgi_call_t *c)
{
    httpd_cgi_call_t *l;

    c->group = group;
    c->next_in_group = NULL;
    if(group->first_page == NULL) {
        group->first_page = c;
    } else {
        for(l = group->first_page; l->next_in_group != NULL; l = l->next_in_group);
        l->next_in_group = c;
    }
    group->count++;
    httpd_cgi_add(c);
}
Exemplo n.º 8
0
void
httpd_cgi_init(void)
{
    httpd_cgi_add(&file);
    httpd_cgi_add(&tcp);
    httpd_cgi_add(&proc);
#if WEBSERVER_CONF_STATUSPAGE && UIP_CONF_IPV6
    httpd_cgi_add(&adrs);
    httpd_cgi_add(&nbrs);
    httpd_cgi_add(&rtes);
#endif
}
Exemplo n.º 9
0
void
httpd_cgi_init(void)
{
  httpd_cgi_add(&file);
  httpd_cgi_add(&tcp);
  httpd_cgi_add(&proc);

  httpd_cgi_add(&amap);
  httpd_cgi_add(&adrs);
  httpd_cgi_add(&nbrs);
  httpd_cgi_add(&nbrsping);
  httpd_cgi_add(&rtes);
  httpd_cgi_add(&rtesping);
  httpd_cgi_add(&rplr);
  httpd_cgi_add(&rplrt);

  httpd_cgi_add(&reboot);

  simple_udp_ping_init(); /* ability to send and reply to UDP pings */
}