Browse Source

Touch up some comments

Ian Goldberg 1 year ago
parent
commit
2ccb6a6b2a
1 changed files with 9 additions and 9 deletions
  1. 9 9
      Enclave/storage.cpp

+ 9 - 9
Enclave/storage.cpp

@@ -19,7 +19,7 @@ static struct {
     MsgBuffer stg_buf;
     MsgBuffer stg_buf;
     // The destination vector for ORExpand
     // The destination vector for ORExpand
     std::vector<uint32_t> dest;
     std::vector<uint32_t> dest;
-    // The selected array for compaction during public routing
+    // The selected array for compaction during public-channel routing
     // Need a bool array for compaction, and std:vector<bool> lacks .data()
     // Need a bool array for compaction, and std:vector<bool> lacks .data()
     bool *pub_selected;
     bool *pub_selected;
 } storage_state;
 } storage_state;
@@ -224,8 +224,8 @@ bool generate_all_tokens() {
 // if it is a padding message (the low DEST_UID_BITS of the receiver id
 // if it is a padding message (the low DEST_UID_BITS of the receiver id
 // are all 1).  The function is oblivious as to whether the message is a
 // are all 1).  The function is oblivious as to whether the message is a
 // padding message.  msg_size must be a multiple of 16.
 // padding message.  msg_size must be a multiple of 16.
-// sender_id_offset should be set to 4 for private routine, or 8 for
-// public routing.
+// sender_id_offset should be set to 4 for private-channel routing, or 8
+// for public-channel routing.
 static inline void padding_sanitize_msg(unsigned char *msg,
 static inline void padding_sanitize_msg(unsigned char *msg,
     size_t msg_size, size_t sender_id_offset)
     size_t msg_size, size_t sender_id_offset)
 {
 {
@@ -246,10 +246,10 @@ static inline void padding_sanitize_msg(unsigned char *msg,
     uint64_t content_mask = (!((~receiver_id) & uid_mask))-1;
     uint64_t content_mask = (!((~receiver_id) & uid_mask))-1;
 
 
     // Mask the first 16 bytes, which includes the 8 or 12 byte header
     // Mask the first 16 bytes, which includes the 8 or 12 byte header
-    // (depending on private or public routing).  The first 4 bytes are
-    // the destination id; set those to 0xffffffff if this is a padding
-    // message.  Set the rest of the first 16 bytes to 0 if this is a
-    // padding message (all obliviously).
+    // (depending on private or public-channel routing).  The first 4
+    // bytes are the destination id; set those to 0xffffffff if this is
+    // a padding message.  Set the rest of the first 16 bytes to 0 if
+    // this is a padding message (all obliviously).
     *(uint32_t*)(msg) |= uint32_t(~content_mask);
     *(uint32_t*)(msg) |= uint32_t(~content_mask);
     *(uint32_t*)(msg+4) &= uint32_t(content_mask);
     *(uint32_t*)(msg+4) &= uint32_t(content_mask);
     *(uint64_t*)(msg+8) &= content_mask;
     *(uint64_t*)(msg+8) &= content_mask;
@@ -448,8 +448,8 @@ void storage_received(MsgBuffer &storage_buf)
         storage_buf.inserted);
         storage_buf.inserted);
 #endif
 #endif
 
 
-    // For public routing, remove excess per-user messages by making them
-    // padding, and then compact non-padding messages.
+    // For public-channel routing, remove excess per-user messages by
+    // making them padding, and then compact non-padding messages.
     if (!g_teems_config.private_routing) {
     if (!g_teems_config.private_routing) {
         uint8_t *msg = storage_state.stg_buf.buf;
         uint8_t *msg = storage_state.stg_buf.buf;
         uint32_t uid;
         uint32_t uid;