mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-26 11:52:25 +01:00
62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
diff --git a/src/libreplace/__ns_initparse.c b/src/libreplace/__ns_initparse.c
|
|
index 10a7c9c..f22fa09 100644
|
|
--- a/src/libreplace/__ns_initparse.c
|
|
+++ b/src/libreplace/__ns_initparse.c
|
|
@@ -52,26 +52,6 @@ static void setsection(ns_msg *msg, ns_sect sect);
|
|
|
|
/* Public. */
|
|
|
|
-/* These need to be in the same order as the nres.h:ns_flag enum. */
|
|
-struct _ns_flagdata _ns_flagdata[16] = {
|
|
- { 0x8000, 15 }, /* qr. */
|
|
- { 0x7800, 11 }, /* opcode. */
|
|
- { 0x0400, 10 }, /* aa. */
|
|
- { 0x0200, 9 }, /* tc. */
|
|
- { 0x0100, 8 }, /* rd. */
|
|
- { 0x0080, 7 }, /* ra. */
|
|
- { 0x0040, 6 }, /* z. */
|
|
- { 0x0020, 5 }, /* ad. */
|
|
- { 0x0010, 4 }, /* cd. */
|
|
- { 0x000f, 0 }, /* rcode. */
|
|
- { 0x0000, 0 }, /* expansion (1/6). */
|
|
- { 0x0000, 0 }, /* expansion (2/6). */
|
|
- { 0x0000, 0 }, /* expansion (3/6). */
|
|
- { 0x0000, 0 }, /* expansion (4/6). */
|
|
- { 0x0000, 0 }, /* expansion (5/6). */
|
|
- { 0x0000, 0 }, /* expansion (6/6). */
|
|
-};
|
|
-
|
|
int
|
|
ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
|
|
const u_char *optr = ptr;
|
|
diff --git a/src/libreplace/__ns_msg_getflag.c b/src/libreplace/__ns_msg_getflag.c
|
|
index 19bfb88..a46c017 100644
|
|
--- a/src/libreplace/__ns_msg_getflag.c
|
|
+++ b/src/libreplace/__ns_msg_getflag.c
|
|
@@ -11,6 +11,25 @@
|
|
#include "arpa_nameser.h"
|
|
|
|
|
|
+/* These need to be in the same order as the nres.h:ns_flag enum. */
|
|
+struct _ns_flagdata _ns_flagdata[16] = {
|
|
+ { 0x8000, 15 }, /* qr. */
|
|
+ { 0x7800, 11 }, /* opcode. */
|
|
+ { 0x0400, 10 }, /* aa. */
|
|
+ { 0x0200, 9 }, /* tc. */
|
|
+ { 0x0100, 8 }, /* rd. */
|
|
+ { 0x0080, 7 }, /* ra. */
|
|
+ { 0x0040, 6 }, /* z. */
|
|
+ { 0x0020, 5 }, /* ad. */
|
|
+ { 0x0010, 4 }, /* cd. */
|
|
+ { 0x000f, 0 }, /* rcode. */
|
|
+ { 0x0000, 0 }, /* expansion (1/6). */
|
|
+ { 0x0000, 0 }, /* expansion (2/6). */
|
|
+ { 0x0000, 0 }, /* expansion (3/6). */
|
|
+ { 0x0000, 0 }, /* expansion (4/6). */
|
|
+ { 0x0000, 0 }, /* expansion (5/6). */
|
|
+ { 0x0000, 0 }, /* expansion (6/6). */
|
|
+};
|
|
|
|
int __ns_msg_getflag(ns_msg handle, int flag) {
|
|
return(((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift);
|