summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/srvrec.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-05-20 13:15:51 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-05-20 13:35:43 +0200
commitf106fecc1d7d0250d1d76c2ba837dc0c870c5fff (patch)
tree1b15821de4a8ad2c43ec92d27e2dc603703238a8 /apt-pkg/contrib/srvrec.h
parent98c934f2723d63d00908803ad47ab1359081ec2d (diff)
add GetSrvRecord helper to apt-pkg/contrib/srvrec.{cc,h}
Diffstat (limited to 'apt-pkg/contrib/srvrec.h')
-rw-r--r--apt-pkg/contrib/srvrec.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
new file mode 100644
index 000000000..583907706
--- /dev/null
+++ b/apt-pkg/contrib/srvrec.h
@@ -0,0 +1,30 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/* ######################################################################
+
+ SRV record support
+
+ ##################################################################### */
+ /*}}}*/
+#ifndef SRVREC_H
+#define SRVREC_H
+
+#include <arpa/nameser.h>
+#include <vector>
+#include <string>
+
+class SrvRec
+{
+ public:
+ std::string target;
+ u_int16_t priority;
+ u_int16_t weight;
+ u_int16_t port;
+
+ // see rfc-2782
+ //int random;
+};
+
+bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result);
+
+#endif