Subject: library function for SRV RR

From: [email-masked]
Date: Thu, 8 Nov 2001 19:53:29 +0200

Hello,

Has there been any discussion about specifying a funtion call for SRV RRs?

For example:

struct hostent2 *getipnodebyservice(const char *name, int af, int flags, int
*error_num);

where 

struct hostent2 {
	char *h_name;
	char **h_alias;
	int h_addrtype;
	int h_length;
	char **h_addr_list;
	int	*protocol_list;
}

/Mikael

to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.

---

From: Vladislav Yasevich <[email-masked]>
Date: Thu, 08 Nov 2001 14:00:05 -0500

Mikael

I think getaddrinfo/getnameinfo can be adopted to use SRV RRs.  They
already take all the parameters you've specified and more.

-vlad

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++
Vladislav Yasevich		Tel: (603) 884-1079
Compaq Computer Corp.		Fax: (435) 514-6884
110 Spit Brook Rd ZK03-3/T07
Nashua, NH 03062

---

From: Paul A Vixie <[email-masked]>
Date: Thu, 08 Nov 2001 11:16:02 -0800

how about bind8/contrib/srv, whose .h file contains the following

/****************************************************************************
** $Id: srv.h,v 1.1 1998/07/30 21:56:39 vixie Exp $
**
** Definition of something or other
**
** Created : 979899
**
** Copyright (C) 1997 by Troll Tech AS.  All rights reserved.
**
****************************************************************************/

#ifndef SRV_H
#define SRV_H

struct srvhost {
  unsigned int pref;
  struct srvhost * next;
  unsigned int port;
  unsigned int weight;
  unsigned int rweight;
  char name[1];
};

extern void freesrvhost ( struct srvhost * );

extern struct srvhost * getsrv( const char * domain,
				const char * service,
				const char * protocol );

#endif

---

From: Mike Schiraldi <[email-masked]>
Date: Thu, 8 Nov 2001 14:29:07 -0500

> Has there been any discussion about specifying a funtion call for SRV RRs?

There are a few libraries out there that implement a nice API for this. One
is libsrv, available at http://cvs.vanrein.org/~libsrv/browse/ (though at
this moment, the site appears to be down)

Another, called RULI, is at http://ruli.sourceforge.net/. I haven't tried
this project, but at least their site is up.

-- 
Mike Schiraldi
Verisign Applied Research