tsig_250.c revision c46f10e4a1702191b003cf8f8fc5059c15d29c48
/*
* Copyright (C) 1999-2001 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.55 2002/01/21 01:07:18 marka 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.
*/
ISC_FALSE));
/*
* Time Signed: 48 bits.
*/
ISC_FALSE));
if (*e != 0)
if ((sigtime >> 48) != 0)
/*
* Fudge.
*/
ISC_FALSE));
/*
* Signature Size.
*/
ISC_FALSE));
/*
* Signature.
*/
/*
* Original ID.
*/
ISC_FALSE));
/*
* Error.
*/
ISC_FALSE));
!= ISC_R_SUCCESS)
{
if (*e != 0)
if (i < 0 || i > 0xffff)
rcode = (dns_rcode_t)i;
}
/*
* Other Len.
*/
ISC_FALSE));
/*
* 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;
/*
* Original ID.
*/
/*
* Error.
*/
/*
* Other Size.
*/
/*
* Other.
*/
goto cleanup;
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 */