52 #define SHELL_ARGS_INIT(args, next_args) (next_args) = (args); 54 #define SHELL_ARGS_NEXT(args, next_args) do { \ 55 (args) = (next_args); \ 56 if((args) != NULL) { \ 57 if(*(args) == '\0') { \ 60 (next_args) = strchr((args), ' '); \ 61 if((next_args) != NULL) { \ 62 *(next_args) = '\0'; \ 72 #define SHELL_OUTPUT(output_func, format, ...) do { \ 74 snprintf(buffer, sizeof(buffer), format, ##__VA_ARGS__); \ 75 (output_func)(buffer); \ 78 typedef void (shell_output_func)(
const char *str);
88 PT_THREAD(shell_input(
struct pt *pt, shell_output_func
output,
const char *cmd));
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
Header file for the link-layer address representation
void shell_output_lladdr(shell_output_func output, const linkaddr_t *lladdr)
Prints a link-layer address.
static uint8_t output(const linkaddr_t *localdest)
Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.
PT_THREAD(shell_input(struct pt *pt, shell_output_func output, const char *cmd))
A protothread that is spawned by a Shell driver when receiving a new line.
void shell_output_6addr(shell_output_func output, const uip_ipaddr_t *ipaddr)
Prints an IPv6 address.
Header file for the Contiki process interface.
Header file for the uIP TCP/IP stack.
void shell_init(void)
Initializes Shell module.