aboutsummaryrefslogtreecommitdiffstats
path: root/lib/canohost.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/canohost.h')
-rw-r--r--lib/canohost.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/canohost.h b/lib/canohost.h
new file mode 100644
index 00000000..25fa30f2
--- /dev/null
+++ b/lib/canohost.h
@@ -0,0 +1,43 @@
+ /********************************************************************\
+ * BitlBee -- An IRC to other IM-networks gateway *
+ * *
+ * Copyright 2002-2017 Wilmer van der Gaast and others *
+ \********************************************************************/
+
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License with
+ the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
+ if not, write to the Free Software Foundation, Inc., 51 Franklin St.,
+ Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+/* These two functions, with some modifications, taken from OpenSSH:
+ *
+ * $OpenBSD: canohost.c,v 1.73 2016/03/07 19:02:43 djm Exp
+ *
+ * Author: Tatu Ylonen <ylo@cs.hut.fi>
+ * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
+ * All rights reserved
+ * Functions for returning the canonical host name of the remote site.
+ *
+ * As far as I am concerned, the code I have written for this software
+ * can be used freely for any purpose. Any derived versions of this
+ * software must be clearly marked as such, and if the derived work is
+ * incompatible with the protocol description in the RFC file, it must be
+ * called by a name other than "ssh" or "Secure Shell".
+ */
+
+#include <bitlbee.h>
+
+G_MODULE_EXPORT char *reverse_lookup(const struct sockaddr *from_, const socklen_t fromlen_);
+G_MODULE_EXPORT void ipv64_normalise_mapped(struct sockaddr_storage *addr, socklen_t *len);