sig_24.c revision 0bd044c2afee944d93879a7de82cd2ccc0635798
/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* $Id: sig_24.c,v 1.24 1999/10/08 21:42:23 tale Exp $ */
/* RFC 2065 */
#ifndef RDATA_GENERIC_SIG_24_C
#define RDATA_GENERIC_SIG_24_C
static inline dns_result_t
{
unsigned char c;
long i;
char *e;
/* type covered */
if (i < 0 || i > 65535)
return (DNS_R_RANGE);
if (*e != 0)
return (result);
covered = (dns_rdatatype_t)i;
}
/* algorithm */
/* labels */
return (DNS_R_RANGE);
/* original ttl */
/* signature expiration */
/* time signed */
/* key footprint */
/* signer */
/* sig */
}
static inline dns_result_t
{
char buf[sizeof "4294967295"];
unsigned long ttl;
unsigned long when;
unsigned long exp;
unsigned long foot;
/* type covered */
/* algorithm */
/* labels */
/* ttl */
/* sig exp */
/* time signed */
/* footprint */
/* signer */
/* sig */
return DNS_R_SUCCESS;
}
static inline dns_result_t
{
else
/*
* type covered: 2
* algorithm: 1
* labels: 1
* original ttl: 4
* signature expiration: 4
* time signed: 4
* key footprint: 2
*/
return (DNS_R_UNEXPECTEDEND);
/* signer */
/* sig */
}
static inline dns_result_t
else
/*
* type covered: 2
* algorithm: 1
* labels: 1
* original ttl: 4
* signature expiration: 4
* time signed: 4
* key footprint: 2
*/
/* signer */
/* signature */
}
static inline int
int result;
if (result != 0)
return (result);
if (result != 0)
return (result);
}
static inline dns_result_t
{
/* Type covered */
/* Algorithm */
/* Labels */
/* Original TTL */
/* Expire time */
/* Time signed */
/* Key ID */
/* Signer name */
/* Signature */
return (DNS_R_NOSPACE);
}
return (DNS_R_SUCCESS);
}
static inline dns_result_t
/* Type covered */
return (ISC_R_UNEXPECTEDEND);
/* Algorithm */
return (ISC_R_UNEXPECTEDEND);
/* Labels */
return (ISC_R_UNEXPECTEDEND);
/* Original TTL */
return (ISC_R_UNEXPECTEDEND);
/* Expire time */
return (ISC_R_UNEXPECTEDEND);
/* Time signed */
return (ISC_R_UNEXPECTEDEND);
/* Key ID */
return (ISC_R_UNEXPECTEDEND);
/* Signature */
return (DNS_R_NOMEMORY);
}
else
return (DNS_R_SUCCESS);
}
static inline void
freestruct_sig(void *source) {
}
static inline dns_result_t
void *arg)
{
(void)add;
(void)arg;
return (DNS_R_SUCCESS);
}
static inline dns_result_t
(void)digest;
(void)arg;
return (DNS_R_NOTIMPLEMENTED);
}
static inline dns_rdatatype_t
isc_region_t r;
dns_rdata_toregion(rdata, &r);
type = uint16_fromregion(&r);
return (type);
}
#endif /* RDATA_GENERIC_SIG_24_C */