tsig_250.c revision dafcb997e390efa4423883dafd100c975c4095d6
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC 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.59 2004/03/05 05:10:07 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);
}
static inline isc_boolean_t
return (ISC_TRUE);
}
static inline isc_boolean_t
return (ISC_TRUE);
}
#endif /* RDATA_ANY_255_TSIG_250_C */