[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Deluge/Deluge DelugeMetadata.h, 1.4, 1.5 DelugeMetadataM.nc, 1.18, 1.19 DelugeMsgs.h, 1.6, 1.7

Jonathan Hui jwhui at users.sourceforge.net
Tue Jun 28 18:07:16 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29462

Modified Files:
	DelugeMetadata.h DelugeMetadataM.nc DelugeMsgs.h 
Log Message:
Include unique identifier for program image in image
descriptor. Allows the PC-side tools to determine if an image is
identical to another. Of course, there is a slight chance for false
positives but worst case scenario is to submit a Deluge erase command
to the network. The previous method to identifiy images required the
first page of the image to be disseminated had a race condition where
an injection could happen after the image descriptor is disseminated
but before the first page of the image.



Index: DelugeMetadata.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMetadata.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DelugeMetadata.h	17 May 2005 20:55:47 -0000	1.4
--- DelugeMetadata.h	29 Jun 2005 01:07:13 -0000	1.5
***************
*** 40,43 ****
--- 40,44 ----
  
  typedef struct DelugeImgDesc {
+   uint32_t  uid;            // unique id of image
    imgvnum_t vNum;           // version num of image
    imgnum_t  imgNum;         // image number

Index: DelugeMetadataM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMetadataM.nc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** DelugeMetadataM.nc	27 Jun 2005 17:59:01 -0000	1.18
--- DelugeMetadataM.nc	29 Jun 2005 01:07:13 -0000	1.19
***************
*** 255,259 ****
  
    command bool Metadata.isImgDescValid[uint8_t id](DelugeImgDesc* tmpImgDesc) {
!     return (tmpImgDesc->crc == call Crc.crc16(tmpImgDesc, 4));
    }
  
--- 255,259 ----
  
    command bool Metadata.isImgDescValid[uint8_t id](DelugeImgDesc* tmpImgDesc) {
!     return (tmpImgDesc->crc == call Crc.crc16(tmpImgDesc, 8));
    }
  

Index: DelugeMsgs.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMsgs.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DelugeMsgs.h	22 Jun 2005 22:38:08 -0000	1.6
--- DelugeMsgs.h	29 Jun 2005 01:07:14 -0000	1.7
***************
*** 56,60 ****
    uint8_t        type;       // 1
    DelugeNodeDesc nodeDesc;   // 6
!   DelugeImgDesc  imgDesc;    // 8
    uint8_t        numImages;  // 1
  } DelugeAdvMsg;
--- 56,60 ----
    uint8_t        type;       // 1
    DelugeNodeDesc nodeDesc;   // 6
!   DelugeImgDesc  imgDesc;    // 12
    uint8_t        numImages;  // 1
  } DelugeAdvMsg;



More information about the Tinyos-beta-commits mailing list