tsig_250.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 1999-2005, 2007, 2009, 2011, 2012, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/* 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
else
isc_region_consume(&sr, n);
/*
* Original ID.
*/
n = uint16_fromregion(&sr);
/*
* Error.
*/
n = uint16_fromregion(&sr);
/*
* Other Size.
*/
n = uint16_fromregion(&sr);
/*
* Other.
*/
else
}
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);
}
static inline int
}
#endif /* RDATA_ANY_255_TSIG_250_C */