aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/krb/addr_comp.c
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-03-09 10:57:00 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-03-09 10:57:00 +0000
commit4fea0525a661d98020910411e0abcbafbc6f01cf (patch)
tree9bf7bc5c9209c893d985bec2fc578fc8fbc9ce15 /src/lib/krb5/krb/addr_comp.c
parentc2bf9b223a73d5a3565e740f4f2b0b789ae521b6 (diff)
downloadkrb5-4fea0525a661d98020910411e0abcbafbc6f01cf.zip
krb5-4fea0525a661d98020910411e0abcbafbc6f01cf.tar.gz
krb5-4fea0525a661d98020910411e0abcbafbc6f01cf.tar.bz2
*** empty log message ***
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@377 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/addr_comp.c')
-rw-r--r--src/lib/krb5/krb/addr_comp.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/addr_comp.c b/src/lib/krb5/krb/addr_comp.c
new file mode 100644
index 0000000..9777e47
--- /dev/null
+++ b/src/lib/krb5/krb/addr_comp.c
@@ -0,0 +1,38 @@
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * krb5_address_compare()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char addr_comp_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+
+/*
+ * If the two addresses are the same, return TRUE, else return FALSE
+ */
+krb5_boolean
+krb5_address_compare(addr1, addr2)
+krb5_address *addr1, *addr2;
+{
+ if (addr1->addrtype != addr2->addrtype)
+ return(FALSE);
+
+ if (addr1->length != addr2->length)
+ return(FALSE);
+ if (bcmp((char *)addr1->contents, (char *)addr2->contents, addr1->length))
+ return FALSE;
+ else
+ return TRUE;
+}