44 |
uint16_t nauth; |
uint16_t nauth; |
45 |
uint16_t nadd; |
uint16_t nadd; |
46 |
}; |
}; |
47 |
|
/* Structure used to access type and class fields. |
48 |
|
* They are totally unaligned, but gcc 4.3.4 thinks that pointer of type uint16_t* |
49 |
|
* is 16-bit aligned and replaces 16-bit memcpy (in move_from_unaligned16 macro) |
50 |
|
* with aligned halfword access on arm920t! |
51 |
|
* Oh well. Slapping PACKED everywhere seems to help: */ |
52 |
struct dns_prop { |
struct dns_prop { |
53 |
uint16_t type; |
uint16_t type PACKED; |
54 |
uint16_t class; |
uint16_t class PACKED; |
55 |
}; |
} PACKED; |
56 |
/* element of known name, ip address and reversed ip address */ |
/* element of known name, ip address and reversed ip address */ |
57 |
struct dns_entry { |
struct dns_entry { |
58 |
struct dns_entry *next; |
struct dns_entry *next; |
464 |
unsigned lsa_size; |
unsigned lsa_size; |
465 |
int udps, opts; |
int udps, opts; |
466 |
uint16_t port = 53; |
uint16_t port = 53; |
467 |
uint8_t buf[MAX_PACK_LEN + 1]; |
/* Ensure buf is 32bit aligned (we need 16bit, but 32bit can't hurt) */ |
468 |
|
uint8_t buf[MAX_PACK_LEN + 1] ALIGN4; |
469 |
|
|
470 |
opts = getopt32(argv, "vi:c:t:p:d", &listen_interface, &fileconf, &sttl, &sport); |
opts = getopt32(argv, "vi:c:t:p:d", &listen_interface, &fileconf, &sttl, &sport); |
471 |
//if (opts & 0x1) // -v |
//if (opts & 0x1) // -v |