dlaczego endianizm ma znaczenie wśród bitów w bajcie?

poniżej znajduje się struktura IP z biblioteki na komputerze z systemem Linux

   struct ip
      {
    #if __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int ip_hl:4;               /* header length */
        unsigned int ip_v:4;                /* version */
    #endif
    #if __BYTE_ORDER == __BIG_ENDIAN
        unsigned int ip_v:4;                /* version */
        unsigned int ip_hl:4;               /* header length */
    #endif
        u_int8_t ip_tos;                    /* type of service */
        u_short ip_len;                     /* total length */
        u_short ip_id;                      /* identification */
        u_short ip_off;                     /* fragment offset field */
    #define IP_RF 0x8000                    /* reserved fragment flag */
    #define IP_DF 0x4000                    /* dont fragment flag */
    #define IP_MF 0x2000                    /* more fragments flag */
    #define IP_OFFMASK 0x1fff               /* mask for fragmenting bits */
        u_int8_t ip_ttl;                    /* time to live */
        u_int8_t ip_p;                      /* protocol */
        u_short ip_sum;                     /* checksum */
        struct in_addr ip_src, ip_dst;      /* source and dest address */
      };

dla tych linii:

    #if __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int ip_hl:4;               /* header length */
        unsigned int ip_v:4;                /* version */
    #endif
    #if __BYTE_ORDER == __BIG_ENDIAN
        unsigned int ip_v:4;                /* version */
        unsigned int ip_hl:4;               /* header length */
    #endif

dlaczego endianizm ma znaczenie w bajcie? Myślę, że endianess wpływa tylko na wielobajtowe liczby całkowite, ale tutaj wydaje mi się, że endianess wpływa także na rozmieszczenie bitów w bajcie?

poza tym jest to tylko bajt, dlaczego tak jestunsigned int, który ma 4 bajty.

Zauważam, że wireshark pokazuje ip_v i ip_hl jako0x45 Jeśli przechwycę pakiet IP. Pierwszy bajt składa się z ip_v i ip_hl. Umieszczam go w zmiennej znakowejx

to, co jest wynikiemx & 0b11110000 ? czy zawsze 4 nie ma znaczenia, co to jest endianess, czy może 5?

questionAnswers(2)

yourAnswerToTheQuestion