本文整理汇总了C++中ANNOTATE函数的典型用法代码示例。如果您正苦于以下问题:C++ ANNOTATE函数的具体用法?C++ ANNOTATE怎么用?C++ ANNOTATE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ANNOTATE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ppp_reject_protocol
/*
* Unknown Protocol Handler, sends reject
*/
static void
ppp_reject_protocol(u16_t protocol, u8_t *buffer, u16_t count)
{
u16_t i;
u8_t *dptr, *sptr;
LCPPKT *pkt;
/* first copy rejected packet back, start from end and work forward,
+++ Pay attention to buffer managment when updated. Assumes fixed
PPP blocks. */
ANNOTATE("Rejecting Protocol\n");
if((count + 6) > PPP_RX_BUFFER_SIZE) {
/* This is a fatal error +++ do somthing about it. */
ANNOTATE("Cannot Reject Protocol, PKT to big\n");
return;
}
dptr = buffer + count + 6;
sptr = buffer + count;
for(i = 0; i < count; ++i) {
*dptr-- = *sptr--;
}
pkt = (LCPPKT *)buffer;
pkt->code = PROT_REJ; /* Write Conf_rej */
/*pkt->id = tid++;*/ /* write tid */
pkt->len = uip_htons(count + 6);
*((u16_t *)(&pkt->data)) = uip_htons(protocol);
ahdlc_tx(LCP, buffer, 0, (u16_t)(count + 6), 0);
}
开发者ID:lepton-distribution,项目名称:lepton,代码行数:33,代码来源:ppp.c
示例2: scan_packet
/* scan_packet(list,buffer,len)
*
* list = list of supported ID's
* *buffer pointer to the first code in the packet
* length of the codespace
*/
u16_t
scan_packet(u16_t protocol, u8_t *list, u8_t *buffer, u8_t *options, u16_t len)
{
u8_t *tlist, *bptr;
u8_t *tptr;
u8_t bad = 0;
u8_t i, j, good;
bptr = tptr = options;
/* scan through the packet and see if it has any unsupported codes */
while(bptr < options + len) {
/* get code and see if it matches somwhere in the list, if not
we don't support it */
i = *bptr++;
/* ANNOTATE("%x - ",i);*/
tlist = list;
good = 0;
while(*tlist) {
/* ANNOTATE("%x ",*tlist);*/
if(i == *tlist++) {
good = 1;
break;
}
}
if(!good) {
/* we don't understand it, write it back */
bad = 1;
*tptr++ = i;
j = *tptr++ = *bptr++;
for(i = 0; i < j - 2; ++i) {
*tptr++ = *bptr++;
}
} else {
/* advance over to next option */
bptr += *bptr - 1;
}
}
/* Bad? if we we need to send a config Reject */
if(bad) {
/* write the config Rej packet we've built above, take on the header */
bptr = buffer;
*bptr++ = CONF_REJ; /* Write Conf_rej */
bptr++; /* skip over ID */
*bptr++ = 0;
*bptr = tptr - buffer;
/* length right here? */
/* write the reject frame */
ANNOTATE("Writing Reject frame --\n");
ahdlc_tx(protocol, buffer, 0, (u16_t)(tptr - buffer), 0);
ANNOTATE("\nEnd writing reject \n");
}
return bad;
}
开发者ID:lepton-distribution,项目名称:lepton,代码行数:63,代码来源:ppp.c
示例3: dump_ppp_packet
void
dump_ppp_packet(u8_t *buffer, u16_t len)
{
int i;
ANNOTATE("\n");
for(i = 0;i < len; ++i) {
if((i & 0x1f) == 0x10) {
ANNOTATE("\n");
}
ANNOTATE("0x%02x ",buffer[i]);
}
ANNOTATE("\n\n");
}
开发者ID:lepton-distribution,项目名称:lepton,代码行数:14,代码来源:ppp.c
示例4: uip_ds6_route_add
/*---------------------------------------------------------------------------*/
uip_ds6_route_t *
uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length, uip_ipaddr_t *nexthop,
uint8_t metric)
{
if(uip_ds6_list_loop
((uip_ds6_element_t *)uip_ds6_routing_table, UIP_DS6_ROUTE_NB,
sizeof(uip_ds6_route_t), ipaddr, length,
(uip_ds6_element_t **)&locroute) == FREESPACE) {
locroute->isused = 1;
uip_ipaddr_copy(&(locroute->ipaddr), ipaddr);
locroute->length = length;
uip_ipaddr_copy(&(locroute->nexthop), nexthop);
locroute->metric = metric;
#ifdef UIP_DS6_ROUTE_STATE_TYPE
memset(&locroute->state, 0, sizeof(UIP_DS6_ROUTE_STATE_TYPE));
#endif
PRINTF("DS6: adding route: ");
PRINT6ADDR(ipaddr);
PRINTF(" via ");
PRINT6ADDR(nexthop);
PRINTF("\n");
ANNOTATE("#L %u 1;blue\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
}
return locroute;
}
开发者ID:ChristianKniep,项目名称:hexabus,代码行数:29,代码来源:uip-ds6.c
示例5: uip_ds6_defrt_rm
/*---------------------------------------------------------------------------*/
void
uip_ds6_defrt_rm(uip_ds6_defrt_t *defrt)
{
uip_ds6_defrt_t *d;
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
/* Make sure that the defrt is in the list before we remove it. */
for(d = list_head(defaultrouterlist);
d != NULL;
d = list_item_next(d)) {
if(d == defrt) {
PRINTF("Removing default route\n");
list_remove(defaultrouterlist, defrt);
memb_free(&defaultroutermemb, defrt);
ANNOTATE("#L %u 0\n", defrt->ipaddr.u8[sizeof(uip_ipaddr_t) - 1]);
#if UIP_DS6_NOTIFICATIONS
call_route_callback(UIP_DS6_NOTIFICATION_DEFRT_RM,
&defrt->ipaddr, &defrt->ipaddr);
#endif
return;
}
}
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
}
开发者ID:BaliAutomation,项目名称:contiki,代码行数:31,代码来源:uip-ds6-route.c
示例6: rpl_remove_routes_by_nexthop
/*---------------------------------------------------------------------------*/
void
rpl_remove_routes_by_nexthop(struct in6_addr *nexthop, rpl_dag_t *dag)
{
/* uip_ds6_route_t *r;
r = uip_ds6_route_list_head();
while(r != NULL) {
if(uip_ipaddr_cmp(&r->nexthop, nexthop) &&
r->state.dag == dag) {
uip_ds6_route_rm(r);
r = uip_ds6_route_list_head();
} else {
r = list_item_next(r);
}
}
ANNOTATE("#L %u 0\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
*/
#if 0
uip_ds6_route_t *locroute;
for(locroute = uip_ds6_routing_table;
locroute < uip_ds6_routing_table + UIP_DS6_ROUTE_NB;
locroute++) {
if(locroute->isused
&& uip_ipaddr_cmp(&locroute->nexthop, nexthop)
&& locroute->state.dag == dag) {
locroute->isused = 0;
}
}
ANNOTATE("#L %u 0\n",nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
#endif /* 0 */
}
开发者ID:markushx,项目名称:librpl,代码行数:34,代码来源:rpl.c
示例7: uip_ds6_defrt_add
/*---------------------------------------------------------------------------*/
uip_ds6_defrt_t *
uip_ds6_defrt_add(uip_ipaddr_t *ipaddr, unsigned long interval)
{
if(uip_ds6_list_loop
((uip_ds6_element_t *)uip_ds6_defrt_list, UIP_DS6_DEFRT_NB,
sizeof(uip_ds6_defrt_t), ipaddr, 128,
(uip_ds6_element_t **)&locdefrt) == FREESPACE) {
locdefrt->isused = 1;
uip_ipaddr_copy(&locdefrt->ipaddr, ipaddr);
if(interval != 0) {
stimer_set(&locdefrt->lifetime, interval);
locdefrt->isinfinite = 0;
} else {
locdefrt->isinfinite = 1;
}
PRINTF("Adding defrouter with ip addr ");
PRINT6ADDR(&locdefrt->ipaddr);
PRINTF("\n");
ANNOTATE("#L %u 1\n", ipaddr->u8[sizeof(uip_ipaddr_t) - 1]);
return locdefrt;
}
return NULL;
}
开发者ID:ChristianKniep,项目名称:hexabus,代码行数:27,代码来源:uip-ds6.c
示例8: uip_ds6_defrt_add
/*---------------------------------------------------------------------------*/
uip_ds6_defrt_t *
uip_ds6_defrt_add(uip_ipaddr_t *ipaddr, unsigned long interval)
{
uip_ds6_defrt_t *d;
#if _DEBUG_ != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* _DEBUG_ != DEBUG_NONE */
PRINTF("uip_ds6_defrt_add\n");
d = uip_ds6_defrt_lookup(ipaddr);
if(d == NULL) {
d = memb_alloc(&defaultroutermemb);
if(d == NULL) {
PRINTF("uip_ds6_defrt_add: could not add default route to ");
PRINT6ADDR(ipaddr);
PRINTF(", out of memory\n");
return NULL;
} else {
PRINTF("uip_ds6_defrt_add: adding default route to ");
PRINT6ADDR(ipaddr);
PRINTF("\n");
}
list_push(defaultrouterlist, d);
}
if(ipaddr == NULL) {
/* A special case: if uip_ds6_defrt_add() is called with a NULL
route, this is an indication that we want to force packets to
go out to the fallback interface. If so, we add an unspecified
route to the list of default routes. uip_ds6_defrt_choose()
will trap this and ensure that packets go to the fallback
interface. */
uip_create_unspecified(&d->ipaddr);
ipaddr = &d->ipaddr;
} else {
uip_ipaddr_copy(&d->ipaddr, ipaddr);
}
if(interval != 0) {
stimer_set(&d->lifetime, interval);
d->isinfinite = 0;
} else {
d->isinfinite = 1;
}
ANNOTATE("#L %u 1\n", ipaddr->u8[sizeof(uip_ipaddr_t) - 1]);
#if UIP_DS6_NOTIFICATIONS
call_route_callback(UIP_DS6_NOTIFICATION_DEFRT_ADD, ipaddr, ipaddr);
#endif
#if _DEBUG_ != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* _DEBUG_ != DEBUG_NONE */
return d;
}
开发者ID:exziled,项目名称:WeatherSystem,代码行数:60,代码来源:uip-ds6-route.c
示例9: printip
void
printip(uip_ipaddr_t ip2)
{
#if (UIP_LOGGING == 1) && (DEBUG & DEBUG_ANNOTATE)
unsigned char *ip = (unsigned char *)ip2.u8;
ANNOTATE(" %d:%d:%d:%d ",ip[0],ip[1],ip[2],ip[3]);
#endif
}
开发者ID:lepton-distribution,项目名称:lepton-root.scions,代码行数:8,代码来源:ipv6cp.c
示例10: uip_ds6_defrt_rm
/*---------------------------------------------------------------------------*/
void
uip_ds6_defrt_rm(uip_ds6_defrt_t *defrt)
{
if(defrt != NULL) {
defrt->isused = 0;
ANNOTATE("#L %u 0\n", defrt->ipaddr.u8[sizeof(uip_ipaddr_t) - 1]);
}
return;
}
开发者ID:ChristianKniep,项目名称:hexabus,代码行数:10,代码来源:uip-ds6.c
示例11: ipv6cp_init
/*---------------------------------------------------------------------------*/
void
ipv6cp_init(void)
{
ANNOTATE("ipv6cp init\n");
ipv6cp_state = 0;
ppp_retry = 0;
pppif.ipaddr.u16[0] = pppif.ipaddr.u16[1] = 0;
TIMER_expire();
}
开发者ID:lepton-distribution,项目名称:lepton-root.scions,代码行数:10,代码来源:ipv6cp.c
示例12: uip_ds6_defrt_add
/*---------------------------------------------------------------------------*/
uip_ds6_defrt_t *
uip_ds6_defrt_add(uip_ipaddr_t *ipaddr, unsigned long interval)
{
uip_ds6_defrt_t *d;
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
PRINTF("uip_ds6_defrt_add\n");
d = uip_ds6_defrt_lookup(ipaddr);
if(d == NULL) {
d = memb_alloc(&defaultroutermemb);
if(d == NULL) {
PRINTF("uip_ds6_defrt_add: could not add default route to ");
PRINT6ADDR(ipaddr);
PRINTF(", out of memory\n");
return NULL;
} else {
PRINTF("uip_ds6_defrt_add: adding default route to ");
PRINT6ADDR(ipaddr);
PRINTF("\n");
}
list_push(defaultrouterlist, d);
}
uip_ipaddr_copy(&d->ipaddr, ipaddr);
//ADILA EDIT 03/11/14
//d->parentCh = cc2420_get_channel();
/*if(d->parentCh == 0) {
d->parentCh = 26;
}*/
//printf("\n\nINITIALISE D->PARENTCH %d\n\n", d->parentCh);
//-------------------
if(interval != 0) {
stimer_set(&d->lifetime, interval);
d->isinfinite = 0;
} else {
d->isinfinite = 1;
}
ANNOTATE("#L %u 1\n", ipaddr->u8[sizeof(uip_ipaddr_t) - 1]);
#if UIP_DS6_NOTIFICATIONS
call_route_callback(UIP_DS6_NOTIFICATION_DEFRT_ADD, ipaddr, ipaddr);
#endif
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
return d;
}
开发者ID:Noradila,项目名称:multichannel-RPL,代码行数:57,代码来源:uip-ds6-route.c
示例13: uip_ds6_route_rm
/*---------------------------------------------------------------------------*/
void
uip_ds6_route_rm(uip_ds6_route_t *route)
{
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
if(route != NULL && route->routes != NULL) {
PRINTF("uip_ds6_route_rm: removing route: ");
PRINT6ADDR(&route->ipaddr);
PRINTF("\n");
list_remove(route->routes->route_list, route);
if(list_head(route->routes->route_list) == NULL) {
/* If this was the only route using this neighbor, remove the
neibhor from the table */
PRINTF("uip_ds6_route_rm: removing neighbor too\n");
nbr_table_remove(nbr_routes, route->routes->route_list);
}
memb_free(&routememb, route);
num_routes--;
PRINTF("uip_ds6_route_rm num %d\n", num_routes);
#if UIP_DS6_NOTIFICATIONS
call_route_callback(UIP_DS6_NOTIFICATION_ROUTE_RM,
&route->ipaddr, uip_ds6_route_nexthop(route));
#endif
#if 0 //(DEBUG & DEBUG_ANNOTATE) == DEBUG_ANNOTATE
/* we need to check if this was the last route towards "nexthop" */
/* if so - remove that link (annotation) */
uip_ds6_route_t *r;
for(r = uip_ds6_route_head();
r != NULL;
r = uip_ds6_route_next(r)) {
uip_ipaddr_t *nextr, *nextroute;
nextr = uip_ds6_route_nexthop(r);
nextroute = uip_ds6_route_nexthop(route);
if(nextr != NULL &&
nextroute != NULL &&
uip_ipaddr_cmp(nextr, nextroute)) {
/* we found another link using the specific nexthop, so keep the #L */
return;
}
}
ANNOTATE("#L %u 0\n", uip_ds6_route_nexthop(route)->u8[sizeof(uip_ipaddr_t) - 1]);
#endif
}
#if DEBUG != DEBUG_NONE
assert_nbr_routes_list_sane();
#endif /* DEBUG != DEBUG_NONE */
return;
}
开发者ID:AlexandreRio,项目名称:contiki,代码行数:56,代码来源:uip-ds6-route.c
示例14: new_dio_interval
/*---------------------------------------------------------------------------*/
static void
new_dio_interval(rpl_instance_t *instance, int isReset)
{
uint32_t time;
clock_time_t ticks;
/* TODO: too small timer intervals for many cases */
time = 1UL << instance->dio_intcurrent;
/* Convert from milliseconds to CLOCK_TICKS. */
ticks = (time * CLOCK_SECOND) / 1000;
instance->dio_next_delay = ticks;
/* random number between I/2 and I */
ticks = ticks / 2 + (ticks / 2 * (uint32_t)random_rand()) / RANDOM_RAND_MAX;
/* opt trickle*/
/*
if (isReset == 1) {
ticks * (uint32_t)random_rand() / RANDOM_RAND_MAX;
}
else {
ticks = ticks / 2 + (ticks / 2 * (uint32_t)random_rand()) / RANDOM_RAND_MAX;
}
*/
/*
* The intervals must be equally long among the nodes for Trickle to
* operate efficiently. Therefore we need to calculate the delay between
* the randomized time and the start time of the next interval.
*/
instance->dio_next_delay -= ticks;
instance->dio_send = 1;
#if RPL_CONF_STATS
/* keep some stats */
instance->dio_totint++;
instance->dio_totrecv += instance->dio_counter;
ANNOTATE("#A rank=%u.%u(%u),stats=%d %d %d %d,color=%s\n",
DAG_RANK(instance->current_dag->rank, instance),
(10 * (instance->current_dag->rank % instance->min_hoprankinc)) / instance->min_hoprankinc,
instance->current_dag->version,
instance->dio_totint, instance->dio_totsend,
instance->dio_totrecv,instance->dio_intcurrent,
instance->current_dag->rank == ROOT_RANK(instance) ? "BLUE" : "ORANGE");
#endif /* RPL_CONF_STATS */
/* reset the redundancy counter */
instance->dio_counter = 0;
/* schedule the timer */
PRINTF("RPL: Scheduling DIO timer %lu ticks in future (Interval)\n", ticks);
ctimer_set(&instance->dio_timer, ticks, &handle_dio_timer, instance);
}
开发者ID:ChandlerWu,项目名称:Contiki,代码行数:56,代码来源:rpl-timers.c
示例15: rpl_set_root
rpl_dag_t *
rpl_set_root(uip_ipaddr_t *dag_id)
{
rpl_dag_t *dag;
int version;
version = -1;
dag = rpl_get_dag(RPL_DEFAULT_INSTANCE);
if(dag != NULL) {
PRINTF("RPL: Dropping a joined DAG when setting this node as root");
version = dag->version;
rpl_free_dag(dag);
}
dag = rpl_alloc_dag(RPL_DEFAULT_INSTANCE);
if(dag == NULL) {
PRINTF("RPL: Failed to allocate a DAG\n");
return NULL;
}
dag->joined = 1;
dag->version = version + 1;
dag->grounded = RPL_GROUNDED;
dag->mop = RPL_MOP_DEFAULT;
dag->of = &RPL_OF;
dag->preferred_parent = NULL;
dag->dtsn_out = 1; /* Trigger DAOs from the beginning. */
memcpy(&dag->dag_id, dag_id, sizeof(dag->dag_id));
dag->dio_intdoubl = DEFAULT_DIO_INTERVAL_DOUBLINGS;
dag->dio_intmin = DEFAULT_DIO_INTERVAL_MIN;
dag->dio_redundancy = DEFAULT_DIO_REDUNDANCY;
dag->max_rankinc = DEFAULT_MAX_RANKINC;
dag->min_hoprankinc = DEFAULT_MIN_HOPRANKINC;
dag->default_lifetime = RPL_DEFAULT_LIFETIME;
dag->lifetime_unit = RPL_DEFAULT_LIFETIME_UNIT;
dag->rank = ROOT_RANK(dag);
dag->of->update_metric_container(dag);
PRINTF("RPL: Node set to be a DAG root with DAG ID ");
PRINT6ADDR(&dag->dag_id);
PRINTF("\n");
ANNOTATE("#A root=%u\n",dag->dag_id.u8[sizeof(dag->dag_id) - 1]);
rpl_reset_dio_timer(dag, 1);
return dag;
}
开发者ID:lepton-distribution,项目名称:lepton-root.scions,代码行数:54,代码来源:rpl-dag.c
示例16: uip_ds6_route_rm_by_nexthop
/*---------------------------------------------------------------------------*/
void
uip_ds6_route_rm_by_nexthop(uip_ipaddr_t *nexthop)
{
for(locroute = uip_ds6_routing_table;
locroute < uip_ds6_routing_table + UIP_DS6_ROUTE_NB;
locroute++) {
if(locroute->isused && uip_ipaddr_cmp(&locroute->nexthop, nexthop)) {
locroute->isused = 0;
}
}
ANNOTATE("#L %u 0\n",nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
}
开发者ID:ChristianKniep,项目名称:hexabus,代码行数:13,代码来源:uip-ds6.c
示例17: rpl_remove_parent
/*---------------------------------------------------------------------------*/
void
rpl_remove_parent(rpl_dag_t *dag, rpl_parent_t *parent)
{
rpl_nullify_parent(dag, parent);
PRINTF("RPL: Removing parent ");
PRINT6ADDR(&parent->addr);
PRINTF("\n");
ANNOTATE("#L %u 0\n", parent->addr.u8[sizeof(uip_ipaddr_t) - 1]);
list_remove(dag->parents, parent);
memb_free(&parent_memb, parent);
}
开发者ID:Johnyren,项目名称:orpl,代码行数:14,代码来源:rpl-dag.c
示例18: uip_ds6_route_add
/*---------------------------------------------------------------------------*/
uip_ds6_route_t *
uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length, uip_ipaddr_t *nexthop,
uint8_t metric)
{
loc_loop_state = uip_ds6_list_loop
((uip_ds6_element_t *)uip_ds6_routing_table, UIP_DS6_ROUTE_NB,
sizeof(uip_ds6_route_t), ipaddr, length,
(uip_ds6_element_t **)&locroute);
#ifdef UIP_DS6_ROUTE_STATE_CLEAN
if (loc_loop_state == NOSPACE) {
for(locroute = uip_ds6_routing_table;
locroute < uip_ds6_routing_table + UIP_DS6_ROUTE_NB;
++locroute) {
if(locroute->isused
&& (UIP_DS6_ROUTE_STATE_CLEAN(&locroute->state))) {
uip_ds6_route_rm(locroute);
loc_loop_state = FREESPACE;
break;
}
}
}
if (loc_loop_state == NOSPACE) {
locroute = NULL;
}
#endif /* UIP_DS6_ROUTE_STATE_TYPE */
if (loc_loop_state == FREESPACE) {
locroute->isused = 1;
uip_ipaddr_copy(&(locroute->ipaddr), ipaddr);
locroute->length = length;
uip_ipaddr_copy(&(locroute->nexthop), nexthop);
locroute->metric = metric;
#ifdef UIP_DS6_ROUTE_STATE_TYPE
memset (&(locroute->state),0,sizeof(UIP_DS6_ROUTE_STATE_TYPE));
#endif
PRINTF("DS6: adding route: ");
PRINT6ADDR(ipaddr);
PRINTF(" via ");
PRINT6ADDR(nexthop);
PRINTF("\n");
ANNOTATE("#L %u 1;blue\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
}
return locroute;
}
开发者ID:Feandil,项目名称:RPL_Gateway,代码行数:49,代码来源:uip-ds6.c
示例19: rpl_remove_routes_by_nexthop
/*---------------------------------------------------------------------------*/
void
rpl_remove_routes_by_nexthop(uip_ipaddr_t *nexthop, rpl_dag_t *dag)
{
uip_ds6_route_t *r;
r = uip_ds6_route_head();
while(r != NULL) {
if(uip_ipaddr_cmp(uip_ds6_route_nexthop(r), nexthop) &&
r->state.dag == dag) {
r->state.lifetime = 0;
}
r = uip_ds6_route_next(r);
}
ANNOTATE("#L %u 0\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
}
开发者ID:NesrineKhelifi,项目名称:contiki,代码行数:17,代码来源:rpl.c
示例20: remove_parents
/* Remove DAG parents with a rank that is at least the same as minimum_rank. */
static void
remove_parents(rpl_dag_t *dag, rpl_rank_t minimum_rank)
{
rpl_parent_t *p, *p2;
PRINTF("RPL: Removing parents (minimum rank %u)\n",
minimum_rank);
for(p = list_head(dag->parents); p != NULL; p = p2) {
p2 = p->next;
if(p->rank >= minimum_rank) {
rpl_remove_parent(dag, p);
ANNOTATE("#L %u 0\n", p->addr.u8[sizeof(uip_ipaddr_t) - 1]);
}
}
}
开发者ID:Johnyren,项目名称:orpl,代码行数:17,代码来源:rpl-dag.c
注:本文中的ANNOTATE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论