Skip to content

Commit

Permalink
Merge pull request #108 from openwsn-berkeley/develop_SW-208
Browse files Browse the repository at this point in the history
SW-208. Fixed.
  • Loading branch information
xvilajosana committed Jul 1, 2015
2 parents c696106 + bc710b1 commit 519c3a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
8 changes: 5 additions & 3 deletions software/openvisualizer/openvisualizer/RPL/RPL.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ class RPL(eventBusClient.eventBusClient):
IANA_ICMPv6_RPL_TYPE = 155

# RPL DIO (RFC6550)
DIO_OPT_GROUNDED = 1<<7
MOP_DIO_A = 1<<5
MOP_DIO_B = 1<<4
DIO_OPT_GROUNDED = 1<<7 # Grounded
# Non-Storing Mode of Operation (1)
MOP_DIO_A = 0<<5
MOP_DIO_B = 0<<4
MOP_DIO_C = 1<<3
# most preferred (7) as I am DAGRoot
PRF_DIO_A = 1<<2
PRF_DIO_B = 1<<1
PRF_DIO_C = 1<<0
Expand Down
17 changes: 0 additions & 17 deletions software/openvisualizer/openvisualizer/openLbr/openLbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class OpenLbr(eventBusClient.eventBusClient):
The IPv6 Flow Label within a RPL domain
'''
#implementing http://tools.ietf.org/html/draft-thubert-6man-flow-label-for-rpl-03
#FLOW_LABEL_RPL_DOMAIN = True

# http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
IANA_PROTOCOL_IPv6ROUTE = 43
Expand Down Expand Up @@ -240,16 +239,6 @@ def _meshToV6_notif(self,sender,signal,data):
#skip the header and process the rest of the message.
ipv6dic['next_header'] = ipv6dic['hop_next_header']

#===================================================================
#if (self.FLOW_LABEL_RPL_DOMAIN and 'flags' in ipv6dic):
#if flow label si formatted following thubert-flow-label draft then check for loops as if it was a hop route header
# if ((ipv6dic['flags'] & self.O_FLAG) == self.O_FLAG):
# log.error("detected possible downstream link on upstream route from {0}".format(",".join(str(c) for c in ipv6dic['src_addr'])))

# if ((ipv6dic['flags'] & self.R_FLAG) == self.R_FLAG):
#error -- loop in the route
# log.error("detected possible loop on upstream route from {0}".format(",".join(str(c) for c in ipv6dic['src_addr'])))

#===================================================================

if (ipv6dic['next_header']==self.IPV6_HEADER):
Expand Down Expand Up @@ -595,12 +584,6 @@ def lowpan_to_ipv6(self,data):
tf = ((pkt_lowpan[0]) >> 3) & 0x03
if (tf == self.IPHC_TF_3B):
pkt_ipv6['flow_label'] = ((pkt_lowpan[ptr]) << 16) + ((pkt_lowpan[ptr+1]) << 8) + ((pkt_lowpan[ptr+2]) << 0)
#print "flow label {0}".format(pkt_ipv6['flow_label'])
#if (self.FLOW_LABEL_RPL_DOMAIN):
# pkt_ipv6['flags']=((pkt_lowpan[ptr]) << 16);
#log this situation as an error to see it
# log.error("FLOW_LABEL_RPL_DOMAIN draft implemented")
# pkt_ipv6['flow_label'] = 0
ptr = ptr + 3
elif (tf == self.IPHC_TF_ELIDED):
pkt_ipv6['flow_label'] = 0
Expand Down

0 comments on commit 519c3a9

Please sign in to comment.