This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] libc/minires-os-if.c


This brings libc/minires up to minires 1.02, 
but using the recently updated w32api/include/windns.h.

Pierre


2007-02-08  Pierre A. Humblet  <Pierre.Humblet@ieee.org>

        * libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
	some obsolete types.


Index: minires-os-if.c
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/libc/minires-os-if.c,v
retrieving revision 1.2
diff -u -p -r1.2 minires-os-if.c
--- minires-os-if.c     15 Dec 2006 09:50:32 -0000      1.2
+++ minires-os-if.c     9 Feb 2007 02:01:20 -0000
@@ -120,10 +120,13 @@ static u_char * write_record(unsigned ch
     }
     break;
   case DNS_TYPE_MINFO:
+  case DNS_TYPE_RP:
     PUTDOMAIN(rr->Data.MINFO.pNameMailbox, ptr);
     PUTDOMAIN(rr->Data.MINFO.pNameErrorsMailbox, ptr);
     break;
   case DNS_TYPE_MX:
+  case DNS_TYPE_AFSDB:
+  case DNS_TYPE_RT:
     if (ptr + 2 > EndPtr)
       ptr += 2;
     else
@@ -131,7 +134,9 @@ static u_char * write_record(unsigned ch
     PUTDOMAIN(rr->Data.MX.pNameExchange, ptr);
     break;
   case DNS_TYPE_HINFO:
-  case DNS_TYPE_TEXT: 
+  case DNS_TYPE_ISDN:
+  case DNS_TYPE_TEXT:
+  case DNS_TYPE_X25: 
   {
     unsigned int i, len;
     for (i = 0; i < rr->Data.TXT.dwStringCount; i++) {
@@ -146,6 +151,16 @@ static u_char * write_record(unsigned ch
     }
     break;
   }
+  case DNS_TYPE_SRV:
+    if (ptr + 6 > EndPtr)
+      ptr += 6;
+    else {
+      PUTSHORT(rr->Data.SRV.wPriority, ptr);
+      PUTSHORT(rr->Data.SRV.wWeight, ptr);
+      PUTSHORT(rr->Data.SRV.wPort, ptr);
+    }
+    PUTDOMAIN(rr->Data.SRV.pNameTarget, ptr);
+    break;
   default:
   {
     unsigned int len = rr->wDataLength;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]