#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, httpd_state::u, UIP_CLOSED, and UIP_TS_MASK.
Referenced by _rww_eeprom_emulator_move_data_to_spare(), tal_init(), tal_pib_set(), transmit_frame(), uhc_enumeration_step18_lpm(), and write_all_tal_pib_to_trx().
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 delay, httpd_cgi_sprint_ip6, httpd_snprintf, uip_ds6_nbr::ipaddr, lladdr, 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, j, 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 delay, httpd_cgi_sprint_ip6, httpd_snprintf, uip_ds6_route::ipaddr, lladdr, 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, conn, 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_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 _exosite_example_configure_http_client(), _sd_init(), anp_client_discovery_complete_handler(), app_debounce_button(), app_wifi_init(), ble_scan_duplication_check(), BuildServerX509CertChain(), burn_certificates(), call_process(), Cert_ComputeTBSCertHash(), chip_apply_conf(), chip_deinit(), chip_reset(), chip_reset_and_cpu_halt(), chip_sleep(), chip_wake(), configure_http_client(), cpu_halt(), cpu_start(), CryptoDecodeRsaPrivKey(), CryptoX509CertDecode(), DecodeBase64File(), demo_start(), EcdsaBuildServerX509CertChain(), enable_disable_ap_mode(), enable_interrupts(), enter_wifi_firmware_download(), execute_state_machine(), exosite_example_activiate(), exosite_example_read_and_write(), get_gpio_val(), get_sensor_value(), GetRootCertificate(), gpio_ioctl(), handle_incoming_rrep(), handle_incoming_rreq(), hif_check_compatibility(), hif_chip_sleep(), hif_chip_wake(), hif_deinit(), hif_enable_access(), hif_handle_isr(), hif_init(), hif_isr(), hif_receive(), hif_register_cb(), hif_send(), hif_set_rx_done(), iot_tls_connect(), iot_tls_read(), iot_tls_write(), IperfCreate(), IperfSocketEventHandler(), IperfTCP_SendTestPacket(), IperfUDP_SendTestPacket(), is_exist_file(), m2m_ota_abort(), m2m_ota_get_firmware_version(), m2m_ota_init(), m2m_ota_notif_check_for_update(), m2m_ota_notif_sched(), m2m_ota_notif_set_url(), m2m_ota_rollback(), m2m_ota_start_update(), m2m_ota_switch_firmware(), m2m_wifi_check_ota_rb(), m2m_wifi_connect_1x_mschap2(), m2m_wifi_connect_1x_tls(), m2m_wifi_connect_open(), m2m_wifi_connect_prepare_msg(), m2m_wifi_connect_psk(), m2m_wifi_connect_wep(), m2m_wifi_disable_ap(), m2m_wifi_download_mode(), m2m_wifi_enable_ap_ext(), m2m_wifi_enable_firmware_logs(), m2m_wifi_get_firmware_version(), m2m_wifi_get_mac_address(), m2m_wifi_get_otp_mac_address(), m2m_wifi_handle_events(), m2m_wifi_init(), m2m_wifi_init_hold(), m2m_wifi_init_start(), m2m_wifi_p2p(), m2m_wifi_p2p_disconnect(), m2m_wifi_prng_get_random_bytes(), m2m_wifi_reinit(), m2m_wifi_req_client_ctrl(), m2m_wifi_req_curr_rssi(), m2m_wifi_req_restrict_ble(), m2m_wifi_req_scan_result(), m2m_wifi_req_server_init(), m2m_wifi_req_unrestrict_ble(), m2m_wifi_request_sleep(), m2m_wifi_set_battery_voltage(), m2m_wifi_set_cust_InfoElement(), m2m_wifi_set_gain_table_idx(), m2m_wifi_set_gains(), m2m_wifi_set_power_profile(), m2m_wifi_set_sleep_mode(), m2m_wifi_set_tx_power(), m2m_wifi_wps_disable(), main(), nbr_table_remove(), netstack_aes_decrypt(), netstack_aes_encrypt(), netstack_aes_verify(), nm_bus_iface_deinit(), nm_bus_iface_init(), nm_bus_iface_reconfigure(), nm_bus_reset(), nm_cpu_start(), nm_drv_deinit(), nm_drv_init(), nm_drv_init_download_mode(), nm_drv_init_hold(), nm_drv_init_start(), nm_get_firmware_full_info(), nm_get_firmware_info(), nm_get_hif_info(), nm_get_ota_firmware_info(), nmi_get_mac_address(), nmi_get_otp_mac_address(), output(), overwrite_efuse_struct(), ParsePrivKey(), ParseRsaPrivKey(), platform_init(), qsend_list(), qsend_packet(), ReadServerX509Chain(), RsaBuildServerX509CertChain(), rtimer_arch_init(), run_sample_test_app(), run_udp_client(), send_one_packet(), send_packet(), set_gpio_dir(), set_gpio_val(), spi_flash_erase(), spi_flash_load_to_cortus_mem(), spi_flash_page_program(), spi_flash_pp(), spi_flash_rdid(), spi_flash_read(), spi_flash_read_internal(), spi_flash_read_status_reg(), spi_flash_sector_erase(), spi_flash_write(), spi_flash_write_disable(), spi_flash_write_enable(), store_file_packet(), tcpip_input(), tcpip_output(), test_call(), test_case_run(), test_suite_run(), tick_counter_check_timer(), TlsSrvSecFwrite(), TlsSrvSecWriteCertChain(), trx_bit_read(), uip_udp_packet_send(), uip_udp_packet_sendto(), update_control_structure(), ValidateKeyMaterial(), wait_for_bootrom(), wait_for_firmware_start(), websocket_open(), wifi_ap_provision(), winc_flash_compare(), winc_flash_write_verify(), winc_init(), WriteRootCertificate(), WriteTlsCertificate(), and WriteTlsServerKeyMaterial().
|
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[] |