1 diff -Naur tpm-tools-1.3.7/src/tpm_mgmt/tpm_nvcommon.h tpm-tools-1.3.7_NEW/src/tpm_mgmt/tpm_nvcommon.h
2 --- tpm-tools-1.3.7/src/tpm_mgmt/tpm_nvcommon.h 1970-01-01 01:00:00.000000000 +0100
3 +++ tpm-tools-1.3.7_NEW/src/tpm_mgmt/tpm_nvcommon.h 2012-01-06 14:59:52.973469694 +0100
6 + * The Initial Developer of the Original Code is International
7 + * Business Machines Corporation. Portions created by IBM
8 + * Corporation are Copyright (C) 2005 International Business
9 + * Machines Corporation. All Rights Reserved.
11 + * This program is free software; you can redistribute it and/or modify
12 + * it under the terms of the Common Public License as published by
13 + * IBM Corporation; either version 1 of the License, or (at your option)
14 + * any later version.
16 + * This program is distributed in the hope that it will be useful,
17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 + * Common Public License for more details.
21 + * You should have received a copy of the Common Public License
22 + * along with this program; if not, a copy can be viewed at
23 + * http://www.opensource.org/licenses/cpl1.0.php.
25 +#ifndef TPM_NVCOMMON_H
26 +#define TPM_NVCOMMON_H
28 +#include "tpm_tspi.h"
31 +struct strings_with_values
38 +extern const struct strings_with_values permvalues[];
40 +int parseStringWithValues(const char *aArg,
41 + const struct strings_with_values *svals,
42 + unsigned int *x, unsigned int maximum,
45 +char *printValueAsStrings(unsigned int value,
46 + const struct strings_with_values *svals);
48 +int parseHexOrDecimal(const char *aArg, unsigned int *x,
49 + unsigned int minimum, unsigned int maximum,
52 +void displayStringsAndValues(const struct strings_with_values *svals, const char *indent);
54 +TSS_RESULT getNVDataPublic(TSS_HTPM hTpm, TPM_NV_INDEX nvindex, TPM_NV_DATA_PUBLIC **pub);
55 +void freeNVDataPublic(TPM_NV_DATA_PUBLIC *pub);
58 +Decode_UINT32(BYTE * y)
63 + x = ((x << 8) | (y[1] & 0xFF));
64 + x = ((x << 8) | (y[2] & 0xFF));
65 + x = ((x << 8) | (y[3] & 0xFF));
70 +#endif /* TPM_NVCOMMON_H */