Renamed the rimebuf module to packetbuf to signal that the module is used outside of a pure Rime context (e.g., the sicslowpan code uses it).
This commit is contained in:
parent
932fc9f748
commit
65eb5fd4e8
90 changed files with 690 additions and 687 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: deluge.c,v 1.4 2009/03/01 12:49:43 nvt-se Exp $
|
||||
* $Id: deluge.c,v 1.5 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -269,7 +269,7 @@ send_request(void *arg)
|
|||
|
||||
PRINTF("Sending request for page %d, version %u, request_set %u\n",
|
||||
request.pagenum, request.version, request.request_set);
|
||||
rimebuf_copyfrom((uint8_t *)&request, sizeof (request));
|
||||
packetbuf_copyfrom((uint8_t *)&request, sizeof (request));
|
||||
unicast_send(&deluge_uc, &obj->summary_from);
|
||||
|
||||
/* Deluge R.2 */
|
||||
|
@ -300,7 +300,7 @@ advertise_summary(struct deluge_object *obj)
|
|||
PRINTF("Advertising summary for object id %u: version=%u, available=%u\n",
|
||||
(unsigned) obj->object_id, summary.version, summary.highest_available);
|
||||
|
||||
rimebuf_copyfrom((uint8_t *)&summary, sizeof (summary));
|
||||
packetbuf_copyfrom((uint8_t *)&summary, sizeof (summary));
|
||||
broadcast_send(&deluge_broadcast);
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ send_page(struct deluge_object *obj, unsigned pagenum)
|
|||
for(cp = buf; cp + S_PKT <= (unsigned char *)&buf[S_PAGE]; cp += S_PKT) {
|
||||
pkt.crc = checksum(cp, S_PKT);
|
||||
memcpy(pkt.payload, cp, S_PKT);
|
||||
rimebuf_copyfrom((uint8_t *)&pkt, sizeof (pkt));
|
||||
packetbuf_copyfrom((uint8_t *)&pkt, sizeof (pkt));
|
||||
broadcast_send(&deluge_broadcast);
|
||||
|
||||
obj->tx_set &= ~(1 << pkt.packetnum++);
|
||||
|
@ -517,8 +517,8 @@ unicast_recv(struct unicast_conn *c, rimeaddr_t *sender)
|
|||
char *msg;
|
||||
int len;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
len = rimebuf_datalen();
|
||||
msg = packetbuf_dataptr();
|
||||
len = packetbuf_datalen();
|
||||
if(len < 5)
|
||||
return;
|
||||
|
||||
|
@ -551,7 +551,7 @@ send_profile(struct deluge_object *obj)
|
|||
msg->version_vector[i] = obj->pages[i].version;
|
||||
}
|
||||
|
||||
rimebuf_copyfrom(buf, sizeof (buf));
|
||||
packetbuf_copyfrom(buf, sizeof (buf));
|
||||
broadcast_send(&deluge_broadcast);
|
||||
}
|
||||
}
|
||||
|
@ -627,8 +627,8 @@ broadcast_recv(struct broadcast_conn *c, rimeaddr_t *sender)
|
|||
int len;
|
||||
struct deluge_msg_profile *profile;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
len = rimebuf_datalen();
|
||||
msg = packetbuf_dataptr();
|
||||
len = packetbuf_datalen();
|
||||
if(len < 5)
|
||||
return;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rime-debug.c,v 1.2 2008/08/15 18:58:42 adamdunkels Exp $
|
||||
* $Id: shell-rime-debug.c,v 1.3 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -98,10 +98,10 @@ PROCESS_THREAD(shell_broadcast_process, ev, data)
|
|||
PROCESS_EXIT();
|
||||
}
|
||||
|
||||
if(len < RIMEBUF_SIZE) {
|
||||
rimebuf_clear();
|
||||
rimebuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = rimebuf_dataptr();
|
||||
if(len < PACKETBUF_SIZE) {
|
||||
packetbuf_clear();
|
||||
packetbuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = packetbuf_dataptr();
|
||||
memcpy(msg->data, input->data1, input->len1);
|
||||
memcpy(msg->data + input->len1, input->data2, input->len2);
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
|
@ -121,7 +121,7 @@ recv_broadcast(struct broadcast_conn *c, rimeaddr_t *from)
|
|||
struct collect_msg *msg;
|
||||
rtimer_clock_t latency;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
msg = packetbuf_dataptr();
|
||||
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
latency = timesynch_time() - msg->timestamp;
|
||||
|
@ -132,7 +132,7 @@ recv_broadcast(struct broadcast_conn *c, rimeaddr_t *from)
|
|||
printf("broadcast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
||||
from->u8[0], from->u8[1],
|
||||
(1000L * latency) / RTIMER_ARCH_SECOND,
|
||||
rimebuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||
msg->data);
|
||||
}
|
||||
static const struct broadcast_callbacks broadcast_callbacks = {recv_broadcast};
|
||||
|
@ -170,10 +170,10 @@ PROCESS_THREAD(shell_unicast_process, ev, data)
|
|||
PROCESS_EXIT();
|
||||
}
|
||||
|
||||
if(len < RIMEBUF_SIZE) {
|
||||
rimebuf_clear();
|
||||
rimebuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = rimebuf_dataptr();
|
||||
if(len < PACKETBUF_SIZE) {
|
||||
packetbuf_clear();
|
||||
packetbuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = packetbuf_dataptr();
|
||||
memcpy(msg->data, input->data1, input->len1);
|
||||
memcpy(msg->data + input->len1, input->data2, input->len2);
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
|
@ -193,7 +193,7 @@ recv_uc(struct unicast_conn *c, rimeaddr_t *from)
|
|||
struct collect_msg *msg;
|
||||
rtimer_clock_t latency;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
msg = packetbuf_dataptr();
|
||||
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
latency = timesynch_time() - msg->timestamp;
|
||||
|
@ -204,7 +204,7 @@ recv_uc(struct unicast_conn *c, rimeaddr_t *from)
|
|||
printf("unicast message received from %d.%d, latency %lu ms, data '%.*s'\n",
|
||||
from->u8[0], from->u8[1],
|
||||
(1000L * latency) / RTIMER_ARCH_SECOND,
|
||||
rimebuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||
packetbuf_datalen() - COLLECT_MSG_HDRSIZE,
|
||||
msg->data);
|
||||
}
|
||||
static const struct unicast_callbacks unicast_callbacks = {recv_uc};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rime-netcmd.c,v 1.5 2008/11/17 22:52:10 oliverschmidt Exp $
|
||||
* $Id: shell-rime-netcmd.c,v 1.6 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -112,15 +112,15 @@ PROCESS_THREAD(shell_netcmd_process, ev, data)
|
|||
PROCESS_BEGIN();
|
||||
|
||||
len = strlen((char *)data);
|
||||
if(len > RIMEBUF_SIZE) {
|
||||
if(len > PACKETBUF_SIZE) {
|
||||
char buf[32];
|
||||
snprintf(buf, sizeof(buf), "%d", len);
|
||||
shell_output_str(&netcmd_command, "command line too large: ", buf);
|
||||
} else {
|
||||
|
||||
rimebuf_clear();
|
||||
msg = rimebuf_dataptr();
|
||||
rimebuf_set_datalen(len + 2 + TRICKLEMSG_HDR_SIZE);
|
||||
packetbuf_clear();
|
||||
msg = packetbuf_dataptr();
|
||||
packetbuf_set_datalen(len + 2 + TRICKLEMSG_HDR_SIZE);
|
||||
strcpy(msg->netcmd, data);
|
||||
msg->crc = crc16_data(msg->netcmd, len, 0);
|
||||
/* printf("netcmd sending '%s'\n", msg->netcmd);*/
|
||||
|
@ -136,14 +136,14 @@ recv_trickle(struct trickle_conn *c)
|
|||
struct trickle_msg *msg;
|
||||
int len;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
msg = packetbuf_dataptr();
|
||||
|
||||
if(rimebuf_datalen() > 2 + TRICKLEMSG_HDR_SIZE) {
|
||||
if(packetbuf_datalen() > 2 + TRICKLEMSG_HDR_SIZE) {
|
||||
|
||||
/* First ensure that the old process is killed. */
|
||||
process_exit(&shell_netcmd_server_process);
|
||||
|
||||
len = rimebuf_datalen() - 2 - TRICKLEMSG_HDR_SIZE;
|
||||
len = packetbuf_datalen() - 2 - TRICKLEMSG_HDR_SIZE;
|
||||
|
||||
/* Make sure that the incoming command is null-terminated (which
|
||||
is should be already). */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rime-ping.c,v 1.6 2009/03/05 23:54:14 adamdunkels Exp $
|
||||
* $Id: shell-rime-ping.c,v 1.7 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -86,9 +86,9 @@ PROCESS_THREAD(shell_rime_ping_process, ev, data)
|
|||
shell_output_str(&rime_ping_command, "Sending 4 pings to ", buf);
|
||||
|
||||
for(i = 0; i < 4; ++i) {
|
||||
rimebuf_clear();
|
||||
ping = rimebuf_dataptr();
|
||||
rimebuf_set_datalen(sizeof(struct rime_ping_msg));
|
||||
packetbuf_clear();
|
||||
ping = packetbuf_dataptr();
|
||||
packetbuf_set_datalen(sizeof(struct rime_ping_msg));
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
ping->pingtime = timesynch_time();
|
||||
#else
|
||||
|
@ -128,7 +128,7 @@ recv_mesh(struct mesh_conn *c, rimeaddr_t *from, u8_t hops)
|
|||
char buf[64];
|
||||
rtimer_clock_t pingrecvtime;
|
||||
|
||||
ping = rimebuf_dataptr();
|
||||
ping = packetbuf_dataptr();
|
||||
|
||||
if(waiting_for_pong == 0) {
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rime-sniff.c,v 1.2 2009/03/02 21:58:16 adamdunkels Exp $
|
||||
* $Id: shell-rime-sniff.c,v 1.3 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -79,14 +79,14 @@ sniff_attributes_output(int type)
|
|||
struct sniff_attributes_blob msg;
|
||||
msg.len = 10;
|
||||
msg.type = type;
|
||||
msg.rssi = rimebuf_attr(RIMEBUF_ATTR_RSSI);
|
||||
msg.lqi = rimebuf_attr(RIMEBUF_ATTR_LINK_QUALITY);
|
||||
msg.timestamp = rimebuf_attr(RIMEBUF_ATTR_TIMESTAMP);
|
||||
msg.listen_time = rimebuf_attr(RIMEBUF_ATTR_LISTEN_TIME);
|
||||
msg.transmit_time = rimebuf_attr(RIMEBUF_ATTR_TRANSMIT_TIME);
|
||||
msg.channel = rimebuf_attr(RIMEBUF_ATTR_CHANNEL);
|
||||
rimeaddr_copy(&msg.src, rimebuf_addr(RIMEBUF_ADDR_SENDER));
|
||||
rimeaddr_copy(&msg.dest, rimebuf_addr(RIMEBUF_ADDR_RECEIVER));
|
||||
msg.rssi = packetbuf_attr(PACKETBUF_ATTR_RSSI);
|
||||
msg.lqi = packetbuf_attr(PACKETBUF_ATTR_LINK_QUALITY);
|
||||
msg.timestamp = packetbuf_attr(PACKETBUF_ATTR_TIMESTAMP);
|
||||
msg.listen_time = packetbuf_attr(PACKETBUF_ATTR_LISTEN_TIME);
|
||||
msg.transmit_time = packetbuf_attr(PACKETBUF_ATTR_TRANSMIT_TIME);
|
||||
msg.channel = packetbuf_attr(PACKETBUF_ATTR_CHANNEL);
|
||||
rimeaddr_copy(&msg.src, packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
||||
rimeaddr_copy(&msg.dest, packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
|
||||
|
||||
shell_output(&sniff_command, &msg, sizeof(msg), NULL, 0);
|
||||
}
|
||||
|
@ -96,11 +96,11 @@ sniff_packet_output(int type)
|
|||
{
|
||||
struct sniff_packet_blob msg;
|
||||
|
||||
msg.len = rimebuf_totlen() / 2 + 1;
|
||||
msg.len = packetbuf_totlen() / 2 + 1;
|
||||
msg.type = type;
|
||||
shell_output(&sniff_command, &msg, sizeof(msg),
|
||||
rimebuf_dataptr(), (rimebuf_datalen() & 0xfffe) +
|
||||
2 * (rimebuf_totlen() & 1));
|
||||
packetbuf_dataptr(), (packetbuf_datalen() & 0xfffe) +
|
||||
2 * (packetbuf_totlen() & 1));
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rime.c,v 1.12 2009/02/11 11:08:53 adamdunkels Exp $
|
||||
* $Id: shell-rime.c,v 1.13 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -183,8 +183,8 @@ PROCESS_THREAD(shell_packetize_process, ev, data)
|
|||
PROCESS_WAIT_EVENT_UNTIL(ev == shell_event_input);
|
||||
|
||||
if(q == NULL) {
|
||||
rimebuf_clear();
|
||||
q = queuebuf_new_from_rimebuf();
|
||||
packetbuf_clear();
|
||||
q = queuebuf_new_from_packetbuf();
|
||||
if(q == NULL) {
|
||||
shell_output_str(&packetize_command, "packetize: could not allocate packet buffer", "");
|
||||
PROCESS_EXIT();
|
||||
|
@ -197,7 +197,7 @@ PROCESS_THREAD(shell_packetize_process, ev, data)
|
|||
|
||||
len = input->len1 + input->len2;
|
||||
|
||||
if(len + size >= RIMEBUF_SIZE ||
|
||||
if(len + size >= PACKETBUF_SIZE ||
|
||||
len == 0) {
|
||||
shell_output(&packetize_command,
|
||||
ptr, size,
|
||||
|
@ -296,9 +296,9 @@ PROCESS_THREAD(shell_nodes_process, ev, data)
|
|||
is_sink = 1;
|
||||
}
|
||||
|
||||
rimebuf_clear();
|
||||
msg = rimebuf_dataptr();
|
||||
rimebuf_set_datalen(sizeof(struct netflood_msg));
|
||||
packetbuf_clear();
|
||||
msg = packetbuf_dataptr();
|
||||
packetbuf_set_datalen(sizeof(struct netflood_msg));
|
||||
msg->type = NETFLOOD_TYPE_NODES;
|
||||
netflood_send(&netflood, nodes_seqno++);
|
||||
|
||||
|
@ -369,10 +369,10 @@ PROCESS_THREAD(shell_send_process, ev, data)
|
|||
PROCESS_EXIT();
|
||||
}
|
||||
|
||||
if(len < RIMEBUF_SIZE) {
|
||||
rimebuf_clear();
|
||||
rimebuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = rimebuf_dataptr();
|
||||
if(len < PACKETBUF_SIZE) {
|
||||
packetbuf_clear();
|
||||
packetbuf_set_datalen(len + COLLECT_MSG_HDRSIZE);
|
||||
msg = packetbuf_dataptr();
|
||||
memcpy(msg->data, input->data1, input->len1);
|
||||
memcpy(msg->data + input->len1, input->data2, input->len2);
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
|
@ -395,7 +395,7 @@ recv_collect(const rimeaddr_t *originator, u8_t seqno, u8_t hops)
|
|||
rtimer_clock_t latency;
|
||||
int len;
|
||||
|
||||
collect_msg = rimebuf_dataptr();
|
||||
collect_msg = packetbuf_dataptr();
|
||||
|
||||
#if TIMESYNCH_CONF_ENABLED
|
||||
latency = timesynch_time() - collect_msg->timestamp;
|
||||
|
@ -412,20 +412,20 @@ recv_collect(const rimeaddr_t *originator, u8_t seqno, u8_t hops)
|
|||
uint16_t latency;
|
||||
} msg;
|
||||
|
||||
if(rimebuf_datalen() >= COLLECT_MSG_HDRSIZE) {
|
||||
len = rimebuf_datalen() - COLLECT_MSG_HDRSIZE;
|
||||
if(packetbuf_datalen() >= COLLECT_MSG_HDRSIZE) {
|
||||
len = packetbuf_datalen() - COLLECT_MSG_HDRSIZE;
|
||||
|
||||
if(collect_msg->crc == crc16_data(collect_msg->data, len, 0)) {
|
||||
msg.len = 5 + (rimebuf_datalen() - COLLECT_MSG_HDRSIZE) / 2;
|
||||
msg.len = 5 + (packetbuf_datalen() - COLLECT_MSG_HDRSIZE) / 2;
|
||||
rimeaddr_copy((rimeaddr_t *)&msg.originator, originator);
|
||||
msg.seqno = seqno;
|
||||
msg.hops = hops;
|
||||
msg.latency = latency;
|
||||
/* printf("recv_collect datalen %d\n", rimebuf_datalen());*/
|
||||
/* printf("recv_collect datalen %d\n", packetbuf_datalen());*/
|
||||
|
||||
shell_output(&collect_command,
|
||||
&msg, sizeof(msg),
|
||||
collect_msg->data, rimebuf_datalen() - COLLECT_MSG_HDRSIZE);
|
||||
collect_msg->data, packetbuf_datalen() - COLLECT_MSG_HDRSIZE);
|
||||
}
|
||||
}
|
||||
} else if(waiting_for_nodes) {
|
||||
|
@ -449,7 +449,7 @@ send_collect(void *dummy)
|
|||
#else
|
||||
msg.timestamp = 0;
|
||||
#endif
|
||||
rimebuf_copyfrom(&msg, COLLECT_MSG_HDRSIZE);
|
||||
packetbuf_copyfrom(&msg, COLLECT_MSG_HDRSIZE);
|
||||
collect_send(&collect, COLLECT_REXMITS);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -459,7 +459,7 @@ recv_netflood(struct netflood_conn *c, rimeaddr_t *from,
|
|||
{
|
||||
struct netflood_msg *msg;
|
||||
|
||||
msg = rimebuf_dataptr();
|
||||
msg = packetbuf_dataptr();
|
||||
if(msg->type == NETFLOOD_TYPE_NODES) {
|
||||
ctimer_set(&ctimer, random_rand() % (CLOCK_SECOND * 8),
|
||||
send_collect, NULL);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-rsh.c,v 1.2 2008/11/09 10:53:25 adamdunkels Exp $
|
||||
* $Id: shell-rsh.c,v 1.3 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -96,14 +96,14 @@ PROCESS_THREAD(shell_rsh_process, ev, data)
|
|||
meshconn_close_connection(&meshconn);
|
||||
PROCESS_EXIT();
|
||||
}
|
||||
if(input->len1 + input->len2 >= RIMEBUF_SIZE) {
|
||||
if(input->len1 + input->len2 >= PACKETBUF_SIZE) {
|
||||
shell_output_str(&rsh_command, "rsh: input too long", "");
|
||||
} else {
|
||||
rimebuf_clear();
|
||||
memcpy(rimebuf_dataptr(), input->data1, input->len1);
|
||||
memcpy((char *)rimebuf_dataptr() + input->len1,
|
||||
packetbuf_clear();
|
||||
memcpy(packetbuf_dataptr(), input->data1, input->len1);
|
||||
memcpy((char *)packetbuf_dataptr() + input->len1,
|
||||
input->data2, input->len2);
|
||||
rimebuf_set_datalen(input->len1 + input->len2);
|
||||
packetbuf_set_datalen(input->len1 + input->len2);
|
||||
meshconn_send(&meshconn);
|
||||
}
|
||||
}
|
||||
|
@ -125,11 +125,11 @@ PROCESS_THREAD(shell_rsh_server_process, ev, data)
|
|||
} else if(ev == shell_event_input) {
|
||||
struct shell_input *input;
|
||||
input = data;
|
||||
rimebuf_clear();
|
||||
memcpy(rimebuf_dataptr(), input->data1, input->len1);
|
||||
memcpy((char *)rimebuf_dataptr() + input->len1,
|
||||
packetbuf_clear();
|
||||
memcpy(packetbuf_dataptr(), input->data1, input->len1);
|
||||
memcpy((char *)packetbuf_dataptr() + input->len1,
|
||||
input->data2, input->len2);
|
||||
rimebuf_set_datalen(input->len1 + input->len2);
|
||||
packetbuf_set_datalen(input->len1 + input->len2);
|
||||
/* printf("Sending meshconn with %d + %d bytes\n",
|
||||
input->len1, input->len2);*/
|
||||
meshconn_send(&meshconn);
|
||||
|
@ -150,10 +150,10 @@ recv_meshconn(struct meshconn_conn *c)
|
|||
/* int ret;
|
||||
struct process *started_process;*/
|
||||
|
||||
/* printf("got '%.*s'\n", rimebuf_datalen(), (char *)rimebuf_dataptr());*/
|
||||
/* printf("got '%.*s'\n", packetbuf_datalen(), (char *)packetbuf_dataptr());*/
|
||||
/* Echo reply */
|
||||
if(!initiator) {
|
||||
rimebuf_copyfrom("abcdefghijklmnopq", 18);
|
||||
packetbuf_copyfrom("abcdefghijklmnopq", 18);
|
||||
meshconn_send(c);
|
||||
}
|
||||
|
||||
|
@ -162,14 +162,14 @@ recv_meshconn(struct meshconn_conn *c)
|
|||
if(front_process != NULL &&
|
||||
process_is_running(front_process)) {
|
||||
struct shell_input input;
|
||||
input.data1 = rimebuf_dataptr();
|
||||
input.len1 = rimebuf_datalen();
|
||||
input.data1 = packetbuf_dataptr();
|
||||
input.len1 = packetbuf_datalen();
|
||||
input.data2 = "";
|
||||
input.len2 = 0;
|
||||
process_post_synch(front_process, shell_event_input, &input);
|
||||
} else {
|
||||
|
||||
ret = shell_start_command(rimebuf_dataptr(), rimebuf_datalen(),
|
||||
ret = shell_start_command(packetbuf_dataptr(), packetbuf_datalen(),
|
||||
&rsh_server_command, &started_process);
|
||||
|
||||
if(started_process != NULL &&
|
||||
|
@ -178,8 +178,8 @@ recv_meshconn(struct meshconn_conn *c)
|
|||
front_process = started_process;
|
||||
}
|
||||
}
|
||||
/* shell_input(rimebuf_dataptr(), rimebuf_datalen());*/
|
||||
/* shell_output(&rsh_command, rimebuf_dataptr(), rimebuf_datalen(), "", 0);*/
|
||||
/* shell_input(packetbuf_dataptr(), packetbuf_datalen());*/
|
||||
/* shell_output(&rsh_command, packetbuf_dataptr(), packetbuf_datalen(), "", 0);*/
|
||||
#endif
|
||||
}
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue