#include "contiki.h"
#include "lib/random.h"
#include "sys/ctimer.h"
#include "sys/etimer.h"
#include "net/ip/uip.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ip/uip-debug.h"
#include "simple-udp.h"
#include "servreg-hack.h"
#include <stdio.h>
#include <string.h>
Macros | |
#define | SEND_INTERVAL (30 * CLOCK_SECOND) |
#define | SEND_TIME (random_rand() % (SEND_INTERVAL)) |
#define | SERVICE_ID 190 |
#define | UDP_PORT 1234 |
Functions | |
PROCESS (unicast_sender_process,"Unicast sender example process") | |
PROCESS_THREAD (unicast_sender_process, ev, data) | |
static void | receiver (struct simple_udp_connection *c, const uip_ipaddr_t *sender_addr, uint16_t sender_port, const uip_ipaddr_t *receiver_addr, uint16_t receiver_port, const uint8_t *data, uint16_t datalen) |
static void | set_global_address (void) |
Variables | |
static struct simple_udp_connection | unicast_connection |
AUTOSTART_PROCESSES & | unicast_sender_process |
#define SEND_INTERVAL (30 * CLOCK_SECOND) |
Referenced by PROCESS_THREAD().
#define SEND_TIME (random_rand() % (SEND_INTERVAL)) |
#define SERVICE_ID 190 |
Referenced by PROCESS_THREAD().
#define UDP_PORT 1234 |
Referenced by PROCESS_THREAD().
PROCESS | ( | unicast_sender_process | , |
"Unicast sender example process" | |||
) |
PROCESS_THREAD | ( | unicast_sender_process | , |
ev | , | ||
data | |||
) |
References addr, buf, etimer_expired(), etimer_reset(), etimer_set(), NULL, printf, PROCESS_BEGIN, PROCESS_END, PROCESS_WAIT_EVENT_UNTIL, receiver(), SEND_INTERVAL, SERVICE_ID, servreg_hack_init(), servreg_hack_lookup(), set_global_address(), simple_udp_register(), simple_udp_sendto(), UDP_PORT, uip_debug_ipaddr_print(), and unicast_connection.
|
static |
References printf.
Referenced by PROCESS_THREAD().
|
static |
References ADDR_AUTOCONF, uip_ds6_netif::addr_list, ADDR_PREFERRED, ADDR_TENTATIVE, i, ipaddr, uip_ds6_addr::ipaddr, uip_ds6_addr::isused, printf, uip_ds6_addr::state, state, uip_debug_ipaddr_print(), uip_ds6_addr_add(), UIP_DS6_ADDR_NB, uip_ds6_if, uip_ds6_set_addr_iid(), uip_ip6addr, and uip_lladdr.
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
AUTOSTART_PROCESSES& unicast_sender_process |