tsig_250.c revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
/*
* 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: tsig_250.c,v 1.43 2000/08/01 01:25:04 tale Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
#ifndef RDATA_ANY_255_TSIG_250_C
#define RDATA_ANY_255_TSIG_250_C
#define RRTYPE_TSIG_ATTRIBUTES \
static inline isc_result_t
long i;
char *e;
/*
* Algorithm Name.
*/
/*
* Time Signed: 48 bits.
*/
if (*e != 0)
return (DNS_R_SYNTAX);
if ((sigtime >> 48) != 0)
return (ISC_R_RANGE);
/*
* Fudge.
*/
return (ISC_R_RANGE);
/*
* Signature Size.
*/
return (ISC_R_RANGE);
/*
* Signature.
*/
/*
* Original ID.
*/
return (ISC_R_RANGE);
/*
* Error.
*/
!= ISC_R_SUCCESS)
{
if (*e != 0)
return (DNS_R_UNKNOWN);
if (i < 0 || i > 0xffff)
return (ISC_R_RANGE);
rcode = (dns_rcode_t)i;
}
/*
* Other Len.
*/
return (ISC_R_RANGE);
/*
* Other Data.
*/
}
static inline isc_result_t
char buf[sizeof "281474976710655 "];
char *bufp;
unsigned short n;
/*
* Algorithm Name.
*/
/*
* Time Signed.
*/
*bufp-- = 0;
*bufp-- = ' ';
do {
sigtime /= 10;
} while (sigtime != 0);
bufp++;
/*
* Fudge.
*/
n = uint16_fromregion(&sr);
/*
* Signature Size.
*/
n = uint16_fromregion(&sr);
/*
* Signature.
*/
else
isc_region_consume(&sr, n);
/*
* Original ID.
*/
n = uint16_fromregion(&sr);
/*
* Error.
*/
n = uint16_fromregion(&sr);
else {
}
/*
* Other Size.
*/
n = uint16_fromregion(&sr);
/*
* Other.
*/
}
static inline isc_result_t
unsigned long n;
/*
* Algorithm Name.
*/
/*
* Time Signed + Fudge.
*/
return (ISC_R_UNEXPECTEDEND);
/*
* Signature Length + Signature.
*/
return (ISC_R_UNEXPECTEDEND);
n = uint16_fromregion(&sr);
return (ISC_R_UNEXPECTEDEND);
/*
* Original ID + Error.
*/
return (ISC_R_UNEXPECTEDEND);
/*
* Other Length + Other.
*/
return (ISC_R_UNEXPECTEDEND);
n = uint16_fromregion(&sr);
return (ISC_R_UNEXPECTEDEND);
}
static inline isc_result_t
}
static inline int
int order;
if (order != 0)
return (order);
}
static inline isc_result_t
/*
* Algorithm Name.
*/
return (ISC_R_NOSPACE);
/*
* Time Signed: 48 bits.
*/
target));
target));
/*
* Fudge.
*/
/*
* Signature Size.
*/
/*
* Signature.
*/
return (ISC_R_NOSPACE);
/*
* Original ID.
*/
/*
* Error.
*/
/*
* Other Len.
*/
/*
* Other Data.
*/
}
static inline isc_result_t
/*
* Algorithm Name.
*/
/*
* Time Signed.
*/
/*
* Fudge.
*/
/*
* Signature Size.
*/
/*
* Signature.
*/
goto cleanup;
} else
/*
* Original ID.
*/
/*
* Error.
*/
/*
* Other Size.
*/
/*
* Other.
*/
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);
}
#endif /* RDATA_ANY_255_TSIG_250_C */