#include <stdio.h>
#include <string.h>
#include "contiki-net.h"
#include "httpd.h"
#include "httpd-cgi.h"
#include "httpd-fs.h"
#include "simple-rpl.h"
#include "net/rpl/rpl.h"
#include "net/rpl/rpl-private.h"
#include "lib/petsciiconv.h"
#include "simple-udp-ping.h"
#include "ip64-addrmap.h"
#include "network-reboot.h"
Macros | |
#define | httpd_cgi_sprint_ip6 httpd_sprint_ip6 |
#define | httpd_snprintf snprintf |
#define | HTTPD_STRING_ATTR |
Functions | |
static | for (s->u.count=0;s->u.count< UIP_CONNS;++s->u.count) |
for (s->u.ptr=nbr_table_head(ds6_neighbors), nbr_no=1;s->u.ptr!=NULL;s->u.ptr=nbr_table_next(ds6_neighbors, s->u.ptr)) | |
static unsigned short | generate_file_stats (void *arg) |
httpd_cgifunction | httpd_cgi (char *name) |
void | httpd_cgi_add (struct httpd_cgi_call *c) |
HTTPD_CGI_CALL (file, file_name, file_stats) | |
HTTPD_CGI_CALL (tcp, tcp_name, tcp_stats) | |
HTTPD_CGI_CALL (proc, proc_name, processes) | |
HTTPD_CGI_CALL (adrs, adrs_name, addresses) | |
HTTPD_CGI_CALL (nbrs, nbrs_name, neighbors) | |
HTTPD_CGI_CALL (nbrsping, nbrsping_name, neighborsping) | |
HTTPD_CGI_CALL (nbrsled, nbrsled_name, neighborsled) | |
HTTPD_CGI_CALL (rtes, rtes_name, routes) | |
HTTPD_CGI_CALL (rtesping, rtesping_name, routesping) | |
HTTPD_CGI_CALL (rplr, rplreset_name, rplreset) | |
HTTPD_CGI_CALL (rplrt, rplroot_name, rplroot) | |
HTTPD_CGI_CALL (amap, addrmap_name, addrmap) | |
HTTPD_CGI_CALL (reboot, reboot_name, reboot_function) | |
void | httpd_cgi_init (void) |
if (rpl_repair_root(RPL_DEFAULT_INSTANCE)) | |
if (ret==0) | |
static unsigned short | make_addresses (void *p) |
static unsigned short | make_addrmap (void *p) |
static unsigned short | make_led_toggle (void *p) |
static unsigned short | make_neighbor (void *p) |
static unsigned short | make_neighbor_roomfor (void *p) |
static unsigned short | make_processes (void *p) |
static unsigned short | make_route (void *p) |
static unsigned short | make_routes_roomfor (void *p) |
static unsigned short | make_tcp_stats (void *arg) |
network_reboot_reboot (120) | |
static | printf ("\n\r PT_THREAD, neighbors") |
static | printf ("\n\r PT_THREAD, neighborsping") |
printf ("\n\r PT_THREAD, neighborsled") | |
static | printf ("\n\r PT_THREAD, routes") |
static | printf ("\n\r PT_THREAD, routesping") |
static | printf ("\n\r PT_THREAD, addrmap") |
static | printf ("\n\r PT_THREAD, rplreset") |
printf ("\n\r PT_THREAD, rplroot") | |
static | printf ("\n\r PT_THREAD, reboot_function") |
static PSOCK_GENERATOR_SEND & | s (void *)(strchr(ptr, ' ')+1) |
static unsigned short | write_mss_error (int code) |
Variables | |
static const char | called [] |
static struct httpd_cgi_call * | calls = NULL |
static const char | closed [] |
static const char | closing [] |
else | |
static const char | established [] |
static const char | file_name [] |
static const char | fin_wait_1 [] |
static const char | fin_wait_2 [] |
static const char httpd_cgi_addrh[] | HTTPD_STRING_ATTR = "<tr><td>" |
static const char | last_ack [] |
static uint8_t | nbr_no = 1 |
static const char | none [] |
static const char | proc_name [] |
ret = simple_rpl_init_dag_immediately() | |
static const char | running [] |
static PSOCK_END & | s |
static const char * | states [] |
static const char | syn_rcvd [] |
static const char | syn_sent [] |
static const char | tcp_name [] |
static const char | time_wait [] |
uip_ds6_netif_t | uip_ds6_if |
uip_ds6_nbr_t | uip_ds6_nbr_cache [] |
#define httpd_cgi_sprint_ip6 httpd_sprint_ip6 |
Referenced by make_addresses(), make_addrmap(), make_neighbor(), make_route(), and make_routes_roomfor().
#define httpd_snprintf snprintf |
Referenced by make_addresses(), make_addrmap(), make_led_toggle(), make_neighbor(), make_neighbor_roomfor(), make_route(), and make_routes_roomfor().
#define HTTPD_STRING_ATTR |
References httpd_state::count, make_tcp_stats(), PSOCK_GENERATOR_SEND, httpd_state::sout, uip_conn::tcpstateflags, httpd_state::u, UIP_CLOSED, uip_conns, and UIP_TS_MASK.
for | ( | s->u. | ptr = nbr_table_head(ds6_neighbors) , |
nbr_no | = 1; s->u.ptr != NULL; s->u.ptr = nbr_table_next(ds6_neighbors, s->u.ptr) |
||
) |
References make_neighbor(), PSOCK_GENERATOR_SEND, and httpd_state::sout.
|
static |
References httpd_fs_count(), uip_appdata, and uip_mss.
httpd_cgifunction httpd_cgi | ( | char * | name | ) |
References httpd_cgi_call::function, httpd_cgi_call::name, httpd_cgi_call::next, and NULL.
Referenced by while().
void httpd_cgi_add | ( | struct httpd_cgi_call * | c | ) |
References c, httpd_cgi_call::next, and NULL.
Referenced by httpd_cgi_init().
HTTPD_CGI_CALL | ( | file | , |
file_name | , | ||
file_stats | |||
) |
HTTPD_CGI_CALL | ( | tcp | , |
tcp_name | , | ||
tcp_stats | |||
) |
HTTPD_CGI_CALL | ( | proc | , |
proc_name | , | ||
processes | |||
) |
HTTPD_CGI_CALL | ( | adrs | , |
adrs_name | , | ||
addresses | |||
) |
HTTPD_CGI_CALL | ( | nbrs | , |
nbrs_name | , | ||
neighbors | |||
) |
HTTPD_CGI_CALL | ( | nbrsping | , |
nbrsping_name | , | ||
neighborsping | |||
) |
HTTPD_CGI_CALL | ( | nbrsled | , |
nbrsled_name | , | ||
neighborsled | |||
) |
HTTPD_CGI_CALL | ( | rtes | , |
rtes_name | , | ||
routes | |||
) |
HTTPD_CGI_CALL | ( | rtesping | , |
rtesping_name | , | ||
routesping | |||
) |
HTTPD_CGI_CALL | ( | rplr | , |
rplreset_name | , | ||
rplreset | |||
) |
HTTPD_CGI_CALL | ( | rplrt | , |
rplroot_name | , | ||
rplroot | |||
) |
HTTPD_CGI_CALL | ( | amap | , |
addrmap_name | , | ||
addrmap | |||
) |
HTTPD_CGI_CALL | ( | reboot | , |
reboot_name | , | ||
reboot_function | |||
) |
void httpd_cgi_init | ( | void | ) |
References httpd_cgi_add(), and simple_udp_ping_init().
Referenced by httpd_init().
if | ( | rpl_repair_root(RPL_DEFAULT_INSTANCE) | ) |
References PSOCK_SEND_STR, and httpd_state::sout.
References PSOCK_SEND_STR, and httpd_state::sout.
|
static |
|
static |
References clock_time(), ip64_addrmap_entry::flags, httpd_cgi_sprint_ip6, httpd_snprintf, httpd_sprint_ip4(), timer::interval, ip64_addrmap_entry::ip4addr, ip64_addrmap_entry::ip4port, ip64_addrmap_entry::ip6addr, ip64_addrmap_entry::ip6port, ip64_addrmap_entry::mapped_port, NULL, ip64_addrmap_entry::protocol, httpd_state::ptr, timer::start, ip64_addrmap_entry::timer, timer_expired(), httpd_state::u, uip_appdata, uip_mss, and write_mss_error().
|
static |
References httpd_snprintf, uip_appdata, uip_mss, and write_mss_error().
|
static |
References httpd_cgi_sprint_ip6, httpd_snprintf, uip_ds6_nbr::ipaddr, nbr, NULL, httpd_state::ptr, RPL_DAG_MC_ETX_DIVISOR, rpl_get_parent_link_metric(), simple_udp_ping_get_delay(), simple_udp_ping_has_reply(), simple_udp_ping_has_sent(), httpd_state::u, uip_appdata, uip_ds6_nbr_get_ll(), uip_mss, and write_mss_error().
Referenced by for().
|
static |
References httpd_snprintf, nbr, NBR_TABLE_CONF_MAX_NEIGHBORS, nbr_table_head(), nbr_table_next(), NULL, uip_appdata, uip_mss, and write_mss_error().
|
static |
References petsciiconv_toascii(), PROCESS_NAME_STRING, state, states, strncpy(), uip_appdata, and uip_mss.
|
static |
References httpd_cgi_sprint_ip6, httpd_snprintf, uip_ds6_route::ipaddr, NULL, httpd_state::ptr, RPL_DAG_MC_ETX_DIVISOR, rpl_get_parent_link_metric(), simple_udp_ping_get_delay(), simple_udp_ping_has_reply(), simple_udp_ping_has_sent(), uip_ds6_route::state, httpd_state::u, uip_appdata, uip_ds6_nbr_lladdr_from_ipaddr(), uip_ds6_route_nexthop(), uip_mss, and write_mss_error().
|
static |
|
static |
References buf, httpd_state::count, httpd_sprint_ip6(), uip_conn::lport, uip_conn::nrtx, uip_conn::ripaddr, uip_conn::rport, states, uip_conn::tcpstateflags, uip_conn::timer, httpd_state::u, uip_ip6addr_t::u8, uip_appdata, uip_conns, uip_htons(), uip_mss, uip_outstanding, uip_stopped, and UIP_TS_MASK.
Referenced by for().
network_reboot_reboot | ( | 120 | ) |
static printf | ( | "\n\r | PT_THREAD, |
neighbors" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
neighborsping" | |||
) |
printf | ( | "\n\r | PT_THREAD, |
neighborsled" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
routes" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
routesping" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
addrmap" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
rplreset" | |||
) |
printf | ( | "\n\r | PT_THREAD, |
rplroot" | |||
) |
static printf | ( | "\n\r | PT_THREAD, |
reboot_function" | |||
) |
static PSOCK_GENERATOR_SEND& s | ( | void * | ) |
|
static |
References uip_appdata, and uip_mss.
Referenced by make_addresses(), make_addrmap(), make_led_toggle(), make_neighbor(), make_neighbor_roomfor(), make_route(), and make_routes_roomfor().
|
static |
|
static |
|
static |
|
static |
else |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
ret = simple_rpl_init_dag_immediately() |
Referenced by call_process(), get_sensor_value(), handle_incoming_rrep(), handle_incoming_rreq(), nbr_table_remove(), netstack_aes_decrypt(), netstack_aes_encrypt(), netstack_aes_verify(), output(), qsend_list(), qsend_packet(), resolv_lookup(), rtimer_arch_init(), send_one_packet(), send_packet(), tcpip_output(), trx_bit_read(), uip_udp_packet_send(), uip_udp_packet_sendto(), and websocket_open().
|
static |
PSOCK_END & s |
|
static |
Referenced by make_processes(), and make_tcp_stats().
|
static |
|
static |
|
static |
|
static |
uip_ds6_nbr_t uip_ds6_nbr_cache[] |