blob: f2282e7c44c15b6be9bf4691fc955536b1b53cbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
* $Source$
* $Author$
*
* Copyright 1990 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* For copying and distribution information, please see the file
* <krb5/copyright.h>.
*
* krb5_address_compare()
*/
#if !defined(lint) && !defined(SABER)
static char rcsid_addr_comp_c[] =
"$Id$";
#endif /* !lint & !SABER */
#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)
const krb5_address *addr1;
const krb5_address *addr2;
{
if (addr1->addrtype != addr2->addrtype)
return(FALSE);
if (addr1->length != addr2->length)
return(FALSE);
if (memcmp((char *)addr1->contents, (char *)addr2->contents,
addr1->length))
return FALSE;
else
return TRUE;
}
|