ReactOS  0.4.14-dev-98-gb0d4763
record.c
Go to the documentation of this file.
1 /*
2  * DNS support
3  *
4  * Copyright (C) 2006 Hans Leidekker
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include "precomp.h"
22 
23 #define NDEBUG
24 #include <debug.h>
25 
26 const char *dns_type_to_str( unsigned short type )
27 {
28  switch (type)
29  {
30 #define X(x) case (x): return #x;
32  X(DNS_TYPE_A)
33  X(DNS_TYPE_NS)
34  X(DNS_TYPE_MD)
35  X(DNS_TYPE_MF)
38  X(DNS_TYPE_MB)
39  X(DNS_TYPE_MG)
40  X(DNS_TYPE_MR)
46  X(DNS_TYPE_MX)
48  X(DNS_TYPE_RP)
52  X(DNS_TYPE_RT)
57  X(DNS_TYPE_PX)
67  X(DNS_TYPE_KX)
69  X(DNS_TYPE_A6)
87 #undef X
88  default: { static char tmp[7]; sprintf( tmp, "0x%04x", type ); return tmp; }
89  }
90 }
91 
92 static int dns_strcmpX( LPCVOID str1, LPCVOID str2, BOOL wide )
93 {
94  if (wide)
95  return lstrcmpiW( str1, str2 );
96  else
97  return lstrcmpiA( str1, str2 );
98 }
99 
100 /******************************************************************************
101  * DnsRecordCompare [DNSAPI.@]
102  *
103  */
105 {
106  BOOL wide;
107  unsigned int i;
108 
109  DPRINT( "(%p,%p)\n", r1, r2 );
110 
111  if (r1->wType != r2->wType ||
112  r1->wDataLength != r2->wDataLength ||
113  r1->Flags.S.Section != r2->Flags.S.Section ||
114  r1->Flags.S.Delete != r2->Flags.S.Delete ||
115  r1->Flags.S.Unused != r2->Flags.S.Unused ||
116  r1->Flags.S.Reserved != r2->Flags.S.Reserved ||
117  r1->dwReserved != r2->dwReserved) return FALSE;
118 
120  if (dns_strcmpX( r1->pName, r2->pName, wide )) return FALSE;
121 
122  switch (r1->wType)
123  {
124  case DNS_TYPE_A:
125  {
126  if (r1->Data.A.IpAddress != r2->Data.A.IpAddress) return FALSE;
127  break;
128  }
129  case DNS_TYPE_SOA:
130  {
131  if (r1->Data.SOA.dwSerialNo != r2->Data.SOA.dwSerialNo ||
133  r1->Data.SOA.dwRetry != r2->Data.SOA.dwRetry ||
136  return FALSE;
138  r2->Data.SOA.pNamePrimaryServer, wide ) ||
140  r2->Data.SOA.pNameAdministrator, wide ))
141  return FALSE;
142  break;
143  }
144  case DNS_TYPE_PTR:
145  case DNS_TYPE_NS:
146  case DNS_TYPE_CNAME:
147  case DNS_TYPE_MB:
148  case DNS_TYPE_MD:
149  case DNS_TYPE_MF:
150  case DNS_TYPE_MG:
151  case DNS_TYPE_MR:
152  {
154  r2->Data.PTR.pNameHost, wide )) return FALSE;
155  break;
156  }
157  case DNS_TYPE_MINFO:
158  case DNS_TYPE_RP:
159  {
161  r2->Data.MINFO.pNameMailbox, wide ) ||
163  r2->Data.MINFO.pNameErrorsMailbox, wide ))
164  return FALSE;
165  break;
166  }
167  case DNS_TYPE_MX:
168  case DNS_TYPE_AFSDB:
169  case DNS_TYPE_RT:
170  {
172  return FALSE;
174  r2->Data.MX.pNameExchange, wide ))
175  return FALSE;
176  break;
177  }
178  case DNS_TYPE_HINFO:
179  case DNS_TYPE_ISDN:
180  case DNS_TYPE_TEXT:
181  case DNS_TYPE_X25:
182  {
184  return FALSE;
185  for (i = 0; i < r1->Data.TXT.dwStringCount; i++)
186  {
188  r2->Data.TXT.pStringArray[i], wide ))
189  return FALSE;
190  }
191  break;
192  }
193  case DNS_TYPE_NULL:
194  {
196  return FALSE;
197  if (memcmp( r1->Data.Null.Data,
199  return FALSE;
200  break;
201  }
202  case DNS_TYPE_AAAA:
203  {
204  for (i = 0; i < sizeof(IP6_ADDRESS)/sizeof(DWORD); i++)
205  {
206  if (r1->Data.AAAA.Ip6Address.IP6Dword[i] !=
207  r2->Data.AAAA.Ip6Address.IP6Dword[i]) return FALSE;
208  }
209  break;
210  }
211  case DNS_TYPE_KEY:
212  {
213  if (r1->Data.KEY.wFlags != r2->Data.KEY.wFlags ||
216  return FALSE;
217  if (memcmp( r1->Data.KEY.Key, r2->Data.KEY.Key,
218  r1->wDataLength - sizeof(DNS_KEY_DATA) + 1 ))
219  return FALSE;
220  break;
221  }
222  case DNS_TYPE_SIG:
223  {
225  r2->Data.SIG.pNameSigner, wide ))
226  return FALSE;
234  return FALSE;
236  r1->wDataLength - sizeof(DNS_SIG_DATAA) + 1 ))
237  return FALSE;
238  break;
239  }
240  case DNS_TYPE_ATMA:
241  {
243  return FALSE;
244  for (i = 0; i < DNS_ATMA_MAX_ADDR_LENGTH; i++)
245  {
246  if (r1->Data.ATMA.Address[i] != r2->Data.ATMA.Address[i])
247  return FALSE;
248  }
249  break;
250  }
251  case DNS_TYPE_NXT:
252  {
254  r2->Data.NXT.pNameNext, wide )) return FALSE;
255  if (r1->Data.NXT.wNumTypes != r2->Data.NXT.wNumTypes) return FALSE;
256  if (memcmp( r1->Data.NXT.wTypes, r2->Data.NXT.wTypes,
257  r1->wDataLength - sizeof(DNS_NXT_DATAA) + sizeof(WORD) ))
258  return FALSE;
259  break;
260  }
261  case DNS_TYPE_SRV:
262  {
264  r2->Data.SRV.pNameTarget, wide )) return FALSE;
265  if (r1->Data.SRV.wPriority != r2->Data.SRV.wPriority ||
266  r1->Data.SRV.wWeight != r2->Data.SRV.wWeight ||
267  r1->Data.SRV.wPort != r2->Data.SRV.wPort)
268  return FALSE;
269  break;
270  }
271  case DNS_TYPE_TKEY:
272  {
274  r2->Data.TKEY.pNameAlgorithm, wide ))
275  return FALSE;
278  r1->Data.TKEY.wMode != r2->Data.TKEY.wMode ||
279  r1->Data.TKEY.wError != r2->Data.TKEY.wError ||
284  return FALSE;
285 
286  /* FIXME: ignoring pAlgorithmPacket field */
287  if (memcmp( r1->Data.TKEY.pKey, r2->Data.TKEY.pKey,
288  r1->Data.TKEY.wKeyLength ) ||
290  r1->Data.TKEY.wOtherLength )) return FALSE;
291  break;
292  }
293  case DNS_TYPE_TSIG:
294  {
296  r2->Data.TSIG.pNameAlgorithm, wide ))
297  return FALSE;
301  r1->Data.TSIG.wError != r2->Data.TSIG.wError ||
306  return FALSE;
307 
308  /* FIXME: ignoring pAlgorithmPacket field */
310  r1->Data.TSIG.wSigLength ) ||
312  r1->Data.TSIG.wOtherLength )) return FALSE;
313  break;
314  }
315  case DNS_TYPE_WINS:
316  {
321  return FALSE;
323  r1->wDataLength - sizeof(DNS_WINS_DATA) + sizeof(IP4_ADDRESS) ))
324  return FALSE;
325  break;
326  }
327  case DNS_TYPE_WINSR:
328  {
332  return FALSE;
334  r2->Data.WINSR.pNameResultDomain, wide ))
335  return FALSE;
336  break;
337  }
338  default:
339  DPRINT1( "unknown type: %s\n", dns_type_to_str( r1->wType ) );
340  return FALSE;
341  }
342  return TRUE;
343 }
344 
346 {
347  switch (in)
348  {
349  case DnsCharSetUnicode:
350  {
351  switch (out)
352  {
353  case DnsCharSetUnicode: return dns_strdup_w( src );
354  case DnsCharSetUtf8: return dns_strdup_wu( src );
355  case DnsCharSetAnsi: return dns_strdup_wa( src );
356  default:
357  DPRINT1( "unhandled target charset: %d\n", out );
358  break;
359  }
360  break;
361  }
362  case DnsCharSetUtf8:
363  switch (out)
364  {
365  case DnsCharSetUnicode: return dns_strdup_uw( src );
366  case DnsCharSetUtf8: return dns_strdup_u( src );
367  case DnsCharSetAnsi: return dns_strdup_ua( src );
368  default:
369  DPRINT1( "unhandled target charset: %d\n", out );
370  break;
371  }
372  break;
373  case DnsCharSetAnsi:
374  switch (out)
375  {
376  case DnsCharSetUnicode: return dns_strdup_aw( src );
377  case DnsCharSetUtf8: return dns_strdup_au( src );
378  case DnsCharSetAnsi: return dns_strdup_a( src );
379  default:
380  DPRINT1( "unhandled target charset: %d\n", out );
381  break;
382  }
383  break;
384  default:
385  DPRINT1( "unhandled source charset: %d\n", in );
386  break;
387  }
388  return NULL;
389 }
390 
391 /******************************************************************************
392  * DnsRecordCopyEx [DNSAPI.@]
393  *
394  */
396 {
397  DNS_RECORD *dst;
398  unsigned int i, size;
399 
400  DPRINT( "(%p,%d,%d)\n", src, in, out );
401 
402  size = FIELD_OFFSET(DNS_RECORD, Data) + src->wDataLength;
404  if (!dst) return NULL;
405 
406  memcpy( dst, src, size );
407 
408  if (src->Flags.S.CharSet == DnsCharSetUtf8 ||
409  src->Flags.S.CharSet == DnsCharSetAnsi ||
410  src->Flags.S.CharSet == DnsCharSetUnicode) in = src->Flags.S.CharSet;
411 
412  dst->Flags.S.CharSet = out;
413  dst->pName = dns_strcpyX( src->pName, in, out );
414  if (!dst->pName) goto error;
415 
416  switch (src->wType)
417  {
418  case DNS_TYPE_HINFO:
419  case DNS_TYPE_ISDN:
420  case DNS_TYPE_TEXT:
421  case DNS_TYPE_X25:
422  {
423  for (i = 0; i < src->Data.TXT.dwStringCount; i++)
424  {
425  dst->Data.TXT.pStringArray[i] =
426  dns_strcpyX( src->Data.TXT.pStringArray[i], in, out );
427 
428  if (!dst->Data.TXT.pStringArray[i])
429  {
430  while (i > 0) HeapFree( GetProcessHeap(), 0, dst->Data.TXT.pStringArray[--i] );
431  goto error;
432  }
433  }
434  break;
435  }
436  case DNS_TYPE_MINFO:
437  case DNS_TYPE_RP:
438  {
439  dst->Data.MINFO.pNameMailbox =
440  dns_strcpyX( src->Data.MINFO.pNameMailbox, in, out );
441  if (!dst->Data.MINFO.pNameMailbox) goto error;
442 
443  dst->Data.MINFO.pNameErrorsMailbox =
444  dns_strcpyX( src->Data.MINFO.pNameErrorsMailbox, in, out );
445  if (!dst->Data.MINFO.pNameErrorsMailbox)
446  {
447  HeapFree( GetProcessHeap(), 0, dst->Data.MINFO.pNameMailbox );
448  goto error;
449  }
450  break;
451  }
452  case DNS_TYPE_AFSDB:
453  case DNS_TYPE_RT:
454  case DNS_TYPE_MX:
455  {
456  dst->Data.MX.pNameExchange =
457  dns_strcpyX( src->Data.MX.pNameExchange, in, out );
458  if (!dst->Data.MX.pNameExchange) goto error;
459  break;
460  }
461  case DNS_TYPE_NXT:
462  {
463  dst->Data.NXT.pNameNext =
464  dns_strcpyX( src->Data.NXT.pNameNext, in, out );
465  if (!dst->Data.NXT.pNameNext) goto error;
466  break;
467  }
468  case DNS_TYPE_CNAME:
469  case DNS_TYPE_MB:
470  case DNS_TYPE_MD:
471  case DNS_TYPE_MF:
472  case DNS_TYPE_MG:
473  case DNS_TYPE_MR:
474  case DNS_TYPE_NS:
475  case DNS_TYPE_PTR:
476  {
477  dst->Data.PTR.pNameHost =
478  dns_strcpyX( src->Data.PTR.pNameHost, in, out );
479  if (!dst->Data.PTR.pNameHost) goto error;
480  break;
481  }
482  case DNS_TYPE_SIG:
483  {
484  dst->Data.SIG.pNameSigner =
485  dns_strcpyX( src->Data.SIG.pNameSigner, in, out );
486  if (!dst->Data.SIG.pNameSigner) goto error;
487  break;
488  }
489  case DNS_TYPE_SOA:
490  {
491  dst->Data.SOA.pNamePrimaryServer =
492  dns_strcpyX( src->Data.SOA.pNamePrimaryServer, in, out );
493  if (!dst->Data.SOA.pNamePrimaryServer) goto error;
494 
495  dst->Data.SOA.pNameAdministrator =
496  dns_strcpyX( src->Data.SOA.pNameAdministrator, in, out );
497  if (!dst->Data.SOA.pNameAdministrator)
498  {
499  HeapFree( GetProcessHeap(), 0, dst->Data.SOA.pNamePrimaryServer );
500  goto error;
501  }
502  break;
503  }
504  case DNS_TYPE_SRV:
505  {
506  dst->Data.SRV.pNameTarget =
507  dns_strcpyX( src->Data.SRV.pNameTarget, in, out );
508  if (!dst->Data.SRV.pNameTarget) goto error;
509  break;
510  }
511  default:
512  break;
513  }
514  return dst;
515 
516 error:
517  HeapFree( GetProcessHeap(), 0, dst->pName );
518  HeapFree( GetProcessHeap(), 0, dst );
519  return NULL;
520 }
521 
522 /******************************************************************************
523  * DnsRecordListFree [DNSAPI.@]
524  *
525  */
527 {
528  DNS_RECORD *r, *next;
529  unsigned int i;
530 
531  DPRINT( "(%p,%d)\n", list, type );
532 
533  if (!list) return;
534 
535  switch (type)
536  {
537  case DnsFreeRecordList:
538  {
539  for (r = list; (list = r); r = next)
540  {
541  HeapFree( GetProcessHeap(), 0, r->pName );
542 
543  switch (r->wType)
544  {
545  case DNS_TYPE_HINFO:
546  case DNS_TYPE_ISDN:
547  case DNS_TYPE_TEXT:
548  case DNS_TYPE_X25:
549  {
550  for (i = 0; i < r->Data.TXT.dwStringCount; i++)
551  HeapFree( GetProcessHeap(), 0, r->Data.TXT.pStringArray[i] );
552 
553  break;
554  }
555  case DNS_TYPE_MINFO:
556  case DNS_TYPE_RP:
557  {
558  HeapFree( GetProcessHeap(), 0, r->Data.MINFO.pNameMailbox );
559  HeapFree( GetProcessHeap(), 0, r->Data.MINFO.pNameErrorsMailbox );
560  break;
561  }
562  case DNS_TYPE_AFSDB:
563  case DNS_TYPE_RT:
564  case DNS_TYPE_MX:
565  {
566  HeapFree( GetProcessHeap(), 0, r->Data.MX.pNameExchange );
567  break;
568  }
569  case DNS_TYPE_NXT:
570  {
571  HeapFree( GetProcessHeap(), 0, r->Data.NXT.pNameNext );
572  break;
573  }
574  case DNS_TYPE_CNAME:
575  case DNS_TYPE_MB:
576  case DNS_TYPE_MD:
577  case DNS_TYPE_MF:
578  case DNS_TYPE_MG:
579  case DNS_TYPE_MR:
580  case DNS_TYPE_NS:
581  case DNS_TYPE_PTR:
582  {
583  HeapFree( GetProcessHeap(), 0, r->Data.PTR.pNameHost );
584  break;
585  }
586  case DNS_TYPE_SIG:
587  {
588  HeapFree( GetProcessHeap(), 0, r->Data.SIG.pNameSigner );
589  break;
590  }
591  case DNS_TYPE_SOA:
592  {
593  HeapFree( GetProcessHeap(), 0, r->Data.SOA.pNamePrimaryServer );
594  HeapFree( GetProcessHeap(), 0, r->Data.SOA.pNameAdministrator );
595  break;
596  }
597  case DNS_TYPE_SRV:
598  {
599  HeapFree( GetProcessHeap(), 0, r->Data.SRV.pNameTarget );
600  break;
601  }
602  default:
603  break;
604  }
605 
606  next = r->pNext;
607  HeapFree( GetProcessHeap(), 0, r );
608  }
609  break;
610  }
611  case DnsFreeFlat:
613  {
614  DPRINT1( "unhandled free type: %d\n", type );
615  break;
616  }
617  default:
618  DPRINT1( "unknown free type: %d\n", type );
619  break;
620  }
621 }
622 
623 /******************************************************************************
624  * DnsRecordSetCompare [DNSAPI.@]
625  *
626  */
628  PDNS_RECORD *diff1, PDNS_RECORD *diff2 )
629 {
630  BOOL ret = TRUE;
631  DNS_RECORD *r, *t, *u;
632  DNS_RRSET rr1, rr2;
633 
634  DPRINT( "(%p,%p,%p,%p)\n", set1, set2, diff1, diff2 );
635 
636  if (!set1 && !set2) return FALSE;
637 
638  if (diff1) *diff1 = NULL;
639  if (diff2) *diff2 = NULL;
640 
641  if (set1 && !set2)
642  {
643  if (diff1) *diff1 = DnsRecordSetCopyEx( set1, 0, set1->Flags.S.CharSet );
644  return FALSE;
645  }
646  if (!set1 && set2)
647  {
648  if (diff2) *diff2 = DnsRecordSetCopyEx( set2, 0, set2->Flags.S.CharSet );
649  return FALSE;
650  }
651 
652  DNS_RRSET_INIT( rr1 );
653  DNS_RRSET_INIT( rr2 );
654 
655  for (r = set1; r; r = r->pNext)
656  {
657  for (t = set2; t; t = t->pNext)
658  {
659  u = DnsRecordCopyEx( r, r->Flags.S.CharSet, t->Flags.S.CharSet );
660  if (!u) goto error;
661 
662  if (!DnsRecordCompare( t, u ))
663  {
664  DNS_RRSET_ADD( rr1, u );
665  ret = FALSE;
666  }
668  }
669  }
670 
671  for (t = set2; t; t = t->pNext)
672  {
673  for (r = set1; r; r = r->pNext)
674  {
675  u = DnsRecordCopyEx( t, t->Flags.S.CharSet, r->Flags.S.CharSet );
676  if (!u) goto error;
677 
678  if (!DnsRecordCompare( r, u ))
679  {
680  DNS_RRSET_ADD( rr2, u );
681  ret = FALSE;
682  }
684  }
685  }
686 
687  DNS_RRSET_TERMINATE( rr1 );
688  DNS_RRSET_TERMINATE( rr2 );
689 
690  if (diff1) *diff1 = rr1.pFirstRR;
692 
693  if (diff2) *diff2 = rr2.pFirstRR;
695 
696  return ret;
697 
698 error:
699  DNS_RRSET_TERMINATE( rr1 );
700  DNS_RRSET_TERMINATE( rr2 );
701 
704 
705  return FALSE;
706 }
707 
708 /******************************************************************************
709  * DnsRecordSetCopyEx [DNSAPI.@]
710  *
711  */
713 {
714  DNS_RRSET dst_set;
715  DNS_RECORD *src, *dst;
716 
717  DPRINT( "(%p,%d,%d)\n", src_set, in, out );
718 
719  DNS_RRSET_INIT( dst_set );
720 
721  for (src = src_set; (src_set = src); src = src_set->pNext)
722  {
723  dst = DnsRecordCopyEx( src, in, out );
724  if (!dst)
725  {
726  DNS_RRSET_TERMINATE( dst_set );
728  return NULL;
729  }
730  DNS_RRSET_ADD( dst_set, dst );
731  }
732 
733  DNS_RRSET_TERMINATE( dst_set );
734  return dst_set.pFirstRR;
735 }
736 
737 /******************************************************************************
738  * DnsRecordSetDetach [DNSAPI.@]
739  *
740  */
742 {
743  DNS_RECORD *r, *s;
744 
745  DPRINT( "(%p)\n", set );
746 
747  for (r = set; (set = r); r = set->pNext)
748  {
749  if (r->pNext && !r->pNext->pNext)
750  {
751  s = r->pNext;
752  r->pNext = NULL;
753  return s;
754  }
755  }
756  return NULL;
757 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define DNS_RRSET_ADD(rrset, pnewRR)
Definition: windns.h:651
DNS_A_DATA A
Definition: windns.h:609
#define DNS_TYPE_RT
Definition: windns.h:61
DNS_PTR_DATAW PTR
Definition: windns.h:611
#define DNS_TYPE_MD
Definition: windns.h:43
BYTE chAlgorithm
Definition: windns.h:338
#define DNS_TYPE_RP
Definition: windns.h:57
#define DNS_TYPE_A
Definition: windns.h:41
#define TRUE
Definition: types.h:120
DWORD Section
Definition: windns.h:238
DWORD dwRefresh
Definition: windns.h:362
#define DNS_TYPE_UNSPEC
Definition: windns.h:85
LPWSTR pNamePrimaryServer
Definition: windns.h:359
LPWSTR pNameAlgorithm
Definition: windns.h:440
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
DWORD dwCacheTimeout
Definition: windns.h:472
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
static LPWSTR dns_strdup_aw(LPCSTR str)
Definition: precomp.h:43
#define error(str)
Definition: mkdosfs.c:1605
DWORD dwExpireTime
Definition: windns.h:415
DNS_SOA_DATAW SOA
Definition: windns.h:610
DWORD dwMappingFlag
Definition: windns.h:470
DNS_MX_DATAW MX
Definition: windns.h:613
PBYTE pSignature
Definition: windns.h:442
#define DNS_TYPE_UID
Definition: windns.h:83
DWORD Unused
Definition: windns.h:241
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
WORD wOtherLength
Definition: windns.h:419
#define DNS_TYPE_PX
Definition: windns.h:66
DWORD IP6Dword[4]
Definition: windns.h:165
static DNS_RECORDW r1
Definition: record.c:37
const char * dns_type_to_str(unsigned short type)
Definition: record.c:26
DWORD dwCreateTime
Definition: windns.h:414
LPWSTR pNameErrorsMailbox
Definition: windns.h:282
BYTE chAlgorithm
Definition: windns.h:261
GLdouble GLdouble t
Definition: gl.h:2047
#define DNS_TYPE_SRV
Definition: windns.h:73
DNS_TSIG_DATAW TSIG
Definition: windns.h:624
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define DNS_TYPE_TEXT
Definition: windns.h:56
#define DNS_TYPE_CERT
Definition: windns.h:77
#define DNS_TYPE_WKS
Definition: windns.h:51
#define DNS_TYPE_AAAA
Definition: windns.h:68
#define DNS_TYPE_TSIG
Definition: windns.h:88
#define DNS_TYPE_SIG
Definition: windns.h:64
#define DNS_TYPE_MG
Definition: windns.h:48
#define X(x)
#define DNS_RRSET_TERMINATE(rrset)
Definition: windns.h:659
#define DNS_ATMA_MAX_ADDR_LENGTH
Definition: windns.h:105
PBYTE pOtherData
Definition: windns.h:413
DNS_WINSR_DATAW WINSR
Definition: windns.h:626
BOOL bPacketPointers
Definition: windns.h:451
#define DNS_TYPE_X25
Definition: windns.h:59
WORD wTypeCovered
Definition: windns.h:337
#define DNS_TYPE_NXT
Definition: windns.h:70
BYTE Data[1]
Definition: windns.h:299
LPWSTR pNameMailbox
Definition: windns.h:281
PDNS_RECORD WINAPI DnsRecordSetDetach(PDNS_RECORD set)
Definition: record.c:741
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static int dns_strcmpX(LPCVOID str1, LPCVOID str2, BOOL wide)
Definition: record.c:92
DNS_TKEY_DATAW TKEY
Definition: windns.h:623
DWORD dwCacheTimeout
Definition: windns.h:457
#define DNS_TYPE_UINFO
Definition: windns.h:82
BYTE chProtocol
Definition: windns.h:260
LPWSTR pNameNext
Definition: windns.h:309
WORD wDataLength
Definition: windns.h:601
PBYTE pKey
Definition: windns.h:412
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define DNS_TYPE_ZERO
Definition: windns.h:40
#define DNS_TYPE_TKEY
Definition: windns.h:87
#define DNS_TYPE_GPOS
Definition: windns.h:67
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
union _DnsRecordW::@3175 Flags
DWORD cWinsServerCount
Definition: windns.h:458
WORD wMode
Definition: windns.h:416
DNS_ATMA_DATA ATMA
Definition: windns.h:620
#define DNS_TYPE_KEY
Definition: windns.h:65
WORD wKeyTag
Definition: windns.h:343
WORD wOtherLength
Definition: windns.h:449
BYTE Signature[1]
Definition: windns.h:345
unsigned int BOOL
Definition: ntddk_ex.h:94
DNS_NULL_DATA Null
Definition: windns.h:615
static char * dns_strdup_u(const char *src)
Definition: precomp.h:65
DNS_AAAA_DATA AAAA
Definition: windns.h:617
DWORD dwLookupTimeout
Definition: windns.h:471
#define DNS_TYPE_PTR
Definition: windns.h:52
static LPSTR dns_strdup_a(LPCSTR src)
Definition: precomp.h:55
BYTE Address[DNS_ATMA_MAX_ADDR_LENGTH]
Definition: windns.h:255
#define DNS_TYPE_EID
Definition: windns.h:71
#define DNS_TYPE_NSAP
Definition: windns.h:62
#define DNS_TYPE_NIMLOC
Definition: windns.h:72
WORD wNumTypes
Definition: windns.h:310
DNS_NXT_DATAW NXT
Definition: windns.h:621
static LPWSTR dns_strdup_w(LPCWSTR src)
Definition: precomp.h:75
LPWSTR pNameExchange
Definition: windns.h:292
WORD wError
Definition: windns.h:447
#define DNS_TYPE_OPT
Definition: windns.h:81
smooth NULL
Definition: ftsmooth.c:416
#define DNS_TYPE_WINS
Definition: windns.h:96
#define DNS_TYPE_CNAME
Definition: windns.h:45
void DPRINT(...)
Definition: polytest.cpp:61
LPWSTR pNameHost
Definition: windns.h:319
#define PDNS_RECORD
Definition: windns.h:636
DWORD dwStringCount
Definition: windns.h:390
#define DNS_TYPE_MAILB
Definition: windns.h:91
IP4_ADDRESS IpAddress
Definition: windns.h:246
WORD wFudgeTime
Definition: windns.h:445
DNS_MINFO_DATAW MINFO
Definition: windns.h:612
static LPWSTR dns_strdup_uw(const char *str)
Definition: precomp.h:31
#define DNS_TYPE_KX
Definition: windns.h:76
DWORD dwTimeSigned
Definition: windns.h:342
PDNS_RECORD WINAPI DnsRecordSetCopyEx(PDNS_RECORD src_set, DNS_CHARSET in, DNS_CHARSET out)
Definition: record.c:712
DNS_KEY_DATA KEY
Definition: windns.h:618
GLsizeiptr size
Definition: glext.h:5919
#define DNS_TYPE_A6
Definition: windns.h:78
#define DNS_TYPE_NAPTR
Definition: windns.h:75
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DNS_TYPE_AXFR
Definition: windns.h:90
WORD wWeight
Definition: windns.h:379
LPWSTR pNameSigner
Definition: windns.h:336
#define DNS_TYPE_MB
Definition: windns.h:47
WORD wFlags
Definition: windns.h:259
DNS_TXT_DATAW TXT
Definition: windns.h:614
BYTE AddressType
Definition: windns.h:254
#define DNS_TYPE_AFSDB
Definition: windns.h:58
static DNS_RECORDW r2
Definition: record.c:38
#define WINAPI
Definition: msvc.h:8
#define DNS_TYPE_IXFR
Definition: windns.h:89
static char * dns_strdup_au(LPCSTR src)
Definition: precomp.h:109
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
WORD wTypes[1]
Definition: windns.h:311
WORD wPort
Definition: windns.h:380
DWORD dwRetry
Definition: windns.h:363
DWORD dwOriginalTtl
Definition: windns.h:340
DWORD Delete
Definition: windns.h:239
#define DNS_TYPE_SOA
Definition: windns.h:46
int ret
DWORD dwReserved
Definition: windns.h:607
VOID WINAPI DnsRecordListFree(PDNS_RECORD list, DNS_FREE_TYPE type)
Definition: record.c:526
DWORD IP4_ADDRESS
Definition: windns.h:36
DWORD dwExpiration
Definition: windns.h:341
WORD wSigLength
Definition: windns.h:448
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static char * dns_strdup_wu(LPCWSTR str)
Definition: precomp.h:97
DWORD dwByteCount
Definition: windns.h:298
GLdouble s
Definition: gl.h:2039
Definition: _list.h:228
#define DNS_TYPE_MX
Definition: windns.h:55
#define DNS_TYPE_MR
Definition: windns.h:49
WORD wPreference
Definition: windns.h:293
#define DNS_RECORD
Definition: windns.h:635
GLenum src
Definition: glext.h:6340
BOOL bPacketPointers
Definition: windns.h:421
UCHAR cAlgNameLength
Definition: windns.h:420
BYTE Key[1]
Definition: windns.h:262
#define DNS_TYPE_WINSR
Definition: windns.h:97
static void set1(uint8 *data, int x, int y)
Definition: nanoxwin.c:811
UCHAR cAlgNameLength
Definition: windns.h:450
WORD wType
Definition: windns.h:600
PDNS_RECORD pFirstRR
Definition: windns.h:640
#define DNS_TYPE_ANY
Definition: windns.h:94
static LPVOID dns_strcpyX(LPCVOID src, DNS_CHARSET in, DNS_CHARSET out)
Definition: record.c:345
WORD wKeyLength
Definition: windns.h:418
LPWSTR pNameResultDomain
Definition: windns.h:473
BYTE chLabelCount
Definition: windns.h:339
#define DNS_TYPE_GID
Definition: windns.h:84
#define DNS_TYPE_NULL
Definition: windns.h:50
DWORD dwMappingFlag
Definition: windns.h:455
enum _DNS_CHARSET DNS_CHARSET
LONGLONG i64CreateTime
Definition: windns.h:444
static unsigned __int64 next
Definition: rand_nt.c:6
WORD wPriority
Definition: windns.h:378
GLuint in
Definition: glext.h:9616
DWORD dwSerialNo
Definition: windns.h:361
WORD wOriginalXid
Definition: windns.h:446
#define DNS_TYPE_MINFO
Definition: windns.h:54
GLenum GLenum dst
Definition: glext.h:6340
IP4_ADDRESS WinsServers[1]
Definition: windns.h:459
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
LPWSTR pNameAlgorithm
Definition: windns.h:410
DWORD Reserved
Definition: windns.h:242
WORD wError
Definition: windns.h:417
LPWSTR pNameAdministrator
Definition: windns.h:360
BOOL WINAPI DnsRecordSetCompare(PDNS_RECORD set1, PDNS_RECORD set2, PDNS_RECORD *diff1, PDNS_RECORD *diff2)
Definition: record.c:627
#define DNS_TYPE_SINK
Definition: windns.h:80
#define DNS_TYPE_ADDRS
Definition: windns.h:86
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DNS_TYPE_NSAPPTR
Definition: windns.h:63
DNS_WINS_DATA WINS
Definition: windns.h:625
DNS_IP6_ADDRESS Ip6Address
Definition: windns.h:250
#define DPRINT1
Definition: precomp.h:8
static LPSTR dns_strdup_ua(const char *src)
Definition: precomp.h:122
#define DNS_TYPE_ATMA
Definition: windns.h:74
CONST void * LPCVOID
Definition: windef.h:191
#define DNS_TYPE_NS
Definition: windns.h:42
DNS_RECORD_FLAGS S
Definition: windns.h:604
DWORD dwLookupTimeout
Definition: windns.h:456
#define DNS_TYPE_DNAME
Definition: windns.h:79
DWORD dwExpire
Definition: windns.h:364
#define DNS_TYPE_ISDN
Definition: windns.h:60
static LPSTR dns_strdup_wa(LPCWSTR str)
Definition: precomp.h:85
DNS_FREE_TYPE
Definition: windns.h:137
#define DNS_RRSET_INIT(rrset)
Definition: windns.h:644
#define DNS_TYPE_MF
Definition: windns.h:44
#define DNS_TYPE_LOC
Definition: windns.h:69
PDNS_RECORD WINAPI DnsRecordCopyEx(PDNS_RECORD src, DNS_CHARSET in, DNS_CHARSET out)
Definition: record.c:395
Definition: _set.h:46
DWORD dwDefaultTtl
Definition: windns.h:365
union _DnsRecordW::@3176 Data
#define DNS_TYPE_MAILA
Definition: windns.h:92
LPWSTR pNameTarget
Definition: windns.h:377
#define HeapFree(x, y, z)
Definition: compat.h:394
LPWSTR pStringArray[1]
Definition: windns.h:391
DWORD CharSet
Definition: windns.h:240
#define DNS_TYPE_HINFO
Definition: windns.h:53
DNS_SRV_DATAW SRV
Definition: windns.h:622
BOOL WINAPI DnsRecordCompare(PDNS_RECORD r1, PDNS_RECORD r2)
Definition: record.c:104
LPWSTR pName
Definition: windns.h:599
PBYTE pOtherData
Definition: windns.h:443
DNS_SIG_DATAW SIG
Definition: windns.h:619