#endif /* !lint & !SABER */
#include <krb5/krb5.h>
+#include <krb5/osconf.h>
+
+#ifdef KRB5_USE_INET
+
#include <krb5/ext-proto.h>
#include <krb5/libos-proto.h>
+#include "os-proto.h"
#include <netinet/in.h>
krb5_error_code
krb5_int32 templength;
if (inaddr->addrtype != ADDRTYPE_ADDRPORT)
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
if (inaddr->length != sizeof(smushaddr)+ sizeof(smushport) +
2*sizeof(temptype) + 2*sizeof(templength))
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
marshal = inaddr->contents;
(void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype));
marshal += sizeof(temptype);
if (temptype != htons(ADDRTYPE_INET))
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
(void) memcpy((char *)&templength, (char *)marshal, sizeof(templength));
marshal += sizeof(templength);
if (templength != htonl(sizeof(smushaddr)))
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
(void) memcpy((char *)&smushaddr, (char *)marshal, sizeof(smushaddr));
/* leave in net order */
(void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype));
marshal += sizeof(temptype);
if (temptype != htons(ADDRTYPE_IPPORT))
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
(void) memcpy((char *)&templength, (char *)marshal, sizeof(templength));
marshal += sizeof(templength);
if (templength != htonl(sizeof(smushport)))
- return KRB5KRB_AP_ERR_BADADDR; /* XXX */
+ return KRB5_PROG_ATYPE_NOSUPP;
(void) memcpy((char *)&smushport, (char *)marshal, sizeof(smushport));
/* leave in net order */
*port = (krb5_int16) smushport;
return 0;
}
+#endif