/* * $Source$ * $Author$ * * Copyright 1989,1990 by the Massachusetts Institute of Technology. * * For copying and distribution information, please see the file * . * * Glue between Kerberos version and ISODE 6.0 version of structures. */ #if !defined(lint) && !defined(SABER) static char rcsid_kadr2adr_c[] = "$Id$"; #endif /* lint || saber */ #include #include /*#include */ #include #include #include "asn1glue.h" #include /* ISODE defines max(a,b) */ struct type_KRB5_HostAddress * krb5_addr2KRB5_HostAddress(val, error) register krb5_address const *val; register int *error; { register struct type_KRB5_HostAddress *retval; retval = (struct type_KRB5_HostAddress *) xmalloc(sizeof(*retval)); if (!retval) { nomem: *error = ENOMEM; return(0); } xbzero(retval, sizeof(*retval)); retval->addr__type = val->addrtype; retval->address = str2qb((char *)val->contents, val->length, 1); if (!retval->address) { xfree(retval); goto nomem; } return(retval); }