sig_24.c revision 15a44745412679c30a6d022733925af70a38b715
/*
* Copyright (C) 1999, 2000 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.44 2000/07/27 09:49:42 tale Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
/* RFC 2535 */
#ifndef RDATA_GENERIC_SIG_24_C
#define RDATA_GENERIC_SIG_24_C
static inline isc_result_t
unsigned char c;
long i;
char *e;
/*
* Type covered.
*/
if (i < 0 || i > 65535)
return (ISC_R_RANGE);
if (*e != 0)
return (result);
covered = (dns_rdatatype_t)i;
}
/*
* Algorithm.
*/
/*
* Labels.
*/
return (ISC_R_RANGE);
/*
* Original ttl.
*/
/*
* Signature expiration.
*/
/*
* Time signed.
*/
/*
* Key footprint.
*/
/*
* Signer.
*/
/*
* Sig.
*/
}
static inline isc_result_t
char buf[sizeof "4294967295"];
unsigned long ttl;
unsigned long when;
unsigned long exp;
unsigned long foot;
/*
* Type covered.
*/
/*
* XXXAG We should have something like dns_rdatatype_isknown()
* that does the right thing with type 0.
*/
} else {
char buf[sizeof "65535"];
}
/*
* Algorithm.
*/
/*
* Labels.
*/
/*
* Ttl.
*/
/*
* Sig exp.
*/
/*
* Time signed.
*/
/*
* Footprint.
*/
/*
* Signer.
*/
/*
* Sig.
*/
return (ISC_R_SUCCESS);
}
static inline isc_result_t
/*
* type covered: 2
* algorithm: 1
* labels: 1
* original ttl: 4
* signature expiration: 4
* time signed: 4
* key footprint: 2
*/
return (ISC_R_UNEXPECTEDEND);
/*
* Signer.
*/
/*
* Sig.
*/
}
static inline isc_result_t
/*
* 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 order;
if (order != 0)
return (order);
if (order != 0)
return (order);
}
static inline isc_result_t
/*
* Type covered.
*/
/*
* Algorithm.
*/
/*
* Labels.
*/
/*
* Original TTL.
*/
/*
* Expire time.
*/
/*
* Time signed.
*/
/*
* Key ID.
*/
/*
* Signer name.
*/
/*
* Signature.
*/
}
static inline isc_result_t
/*
* Type covered.
*/
/*
* Algorithm.
*/
/*
* Labels.
*/
/*
* Original TTL.
*/
/*
* Expire time.
*/
/*
* Time signed.
*/
/*
* Key ID.
*/
/*
* Signature.
*/
goto cleanup;
} else
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
}
static inline void
return;
}
static inline isc_result_t
return (ISC_R_SUCCESS);
}
static inline isc_result_t
return (ISC_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 */