/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* As of BIND 8.2.2, ISC (a) removed res_mkupdate(), res_update(), and
* res_mkupdrec() from what they consider the supported interface. The
* functions still exist, but their calling interface has changed, since
* the ns_updrec structure has changed.
*
* It seems probable that res_mkupdate() etc. will return, though possibly
* with other changes, in some future BIND release. In order to avoid
* going to PSARC twice (once to remove the functions, and then again to
* add them back), we retain the old interface as a wrapper around the
* new one.
*/
#include <port_before.h>
#include <malloc.h>
#include <strings.h>
/* get the Solaris ns_updrec before any renaming happens */
/* get the __ISC_ns_updrec */
#include <res_update.h>
#include <port_after.h>
/* un-rename ns_updrec and res_* functions so we can wrap them */
void res_freeupdrec(ns_updrec *);
static int
return (-1);
} else {
}
return (0);
}
static int
/* XXX r_prev and r_next unchanged */
return (-1);
} else {
}
return (0);
}
static void
}
}
static __ISC_ns_updrec *
if (old == 0)
return (0);
if ((r = calloc(1, sizeof (*r))) == 0 ||
free(r);
return (0);
}
/* res_update and res_nupdate want r_glink set up like this */
if (do_glink) {
} else {
}
if (p != 0) {
if (do_glink) {
}
} else {
list = r;
}
}
return (list);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
delete_list(r);
return (ret);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
delete_list(r);
return (ret);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
ret = __ISC_res_update(r);
delete_list(r);
return (ret);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
delete_list(r);
return (ret);
}
__ISC_ns_updrec *n;
ns_updrec *o;
if (n == 0)
return (0);
if ((o = calloc(1, sizeof (*o))) != 0) {
if (new2old(n, o) != 0) {
res_freeupdrec(o);
o = 0;
}
}
return (o);
}
void
if (rrecp == 0)
return;
/* Note: freeing r_dp is the caller's responsibility. */
}