示例#1
0
/*---------------------------------------------------------------------------*/
int
abc_send(struct abc_conn *c)
{
  PRINTF("%d.%d: abc: abc_send on channel %d\n",
	 rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
	 c->channel.channelno);
  return rime_output(&c->channel);
}
示例#2
0
/*---------------------------------------------------------------------------*/
int
chameleon_output(struct channel *c)
{
  int ret;

  PRINTF("%d.%d: chameleon_output channel %d\n",
	 rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
	 c->channelno);

  if(header_module) {
    ret = header_module->output(c);
    packetbuf_set_attr(PACKETBUF_ATTR_CHANNEL, c->channelno);
#if DEBUG
    printhdr(packetbuf_hdrptr(), packetbuf_hdrlen());
#endif /* DEBUG */
    if(ret) {
      rime_output();
      return 1;
    }
  }
  return 0;
}