title: How masking works
body: <p>I am new at C, and I am debugging with source code. However, I am confused with this code snippet.</p>
  
  <p>When the values are assigned to the structure value, I think it is some masking. But not sure, and if it is masking. How does masking work in this concept?</p>
  
  <p>Many thanks,</p>
  
  <pre><code>#define MSGINFO_ENABLE                   0x01
  #define MIME_ENABLE                      0x02
  #define FASTSTART_CODERS_IN_OFFERED      0x04
  #define TRANSADDR_ENABLE                 0x08
  
  typedef struct {
  
      unsigned int    msginfo_mask;     /* added in version 0x0101               */
  
  } VIRTBOARD; 
  
  
  VIRTBOARD       VirtBoard;
  
  /* Not sure I understand what is happening here. */
  VirtBoard.msginfo_mask  = MSGINFO_ENABLE | MIME_ENABLE | FASTSTART_CODERS_IN_OFFERED | TRANSADDR_ENABLE;
  </code></pre>