title: Is NetworkByteOrder is the same as Big endian?
body: <p>I create a demo to prove network byte order is the same as big endian:</p>
  
  <pre><code>#include "stdio.h"
  #include "stdint.h"
  #include "winsock2.h"
  #define BL32(x)  ((((x) &amp; 0x000000ffUL) &lt;&lt; 24) | \
                   (((x) &amp; 0x0000ff00UL) &lt;&lt;  8) | \
                   (((x) &amp; 0x00ff0000UL) &gt;&gt;  8) | \
                   (((x) &amp; 0xff000000UL) &gt;&gt; 24))
  int main(int argc, char* argv[])
  {
      uint32_t s = INT_MAX; // little endian
      uint32_t network = htonl(s);
      uint32_t bigendian = BL32(s);
      if(network == bigendian) {
          printf("nbo is same as big endian\n");
      } else {
          printf("nbo isn't same as big endian\n");
      }
  
      return 0;
  }
  </code></pre>
  
  <p>This program runs on an x86(litte endian) Windows PC, and it gives output:</p>
  
  <pre><code>nbo is same as big endian
  </code></pre>
  
  <p>I didn't see this mentioned in the textbook or tutorial, so I want to confirm it's right or not.</p>
  
  <p>BTW I think it's very important to help understand what is byte order in the network. Why most of the question concentrates only on "big vs little endian"...</p>