author christos <>
Sat, 28 Jan 2012 01:35:04 +0000
changeset 208533 fb64bd2b788b
child 208537 aebc4a30671c
permissions -rw-r--r--
import trousers 0.3.8 from sourceforge. TrouSerS is the open-source TCG Software Stack

 * Licensed Materials - Property of IBM
 * trousers - An open source TCG Software Stack
 * (C) Copyright International Business Machines Corp. 2004

 * include/linux/tpm.h
 * Device driver for TCPA TPM (trusted platform module).
#ifndef _TPM_H_
#define _TPM_H_

#if (defined (__linux) || defined (linux))
#include <linux/ioctl.h>
#elif (defined (__OpenBSD__) || defined (__FreeBSD__))
#include <sys/ioctl.h>

/* ioctl commands */
#define	TPMIOC_CANCEL		_IO('T', 0x00)
#define	TPMIOC_TRANSMIT		_IO('T', 0x01)

#if defined(__KERNEL__)
extern ssize_t tpm_transmit(const char *buf, size_t bufsiz);
extern ssize_t tpm_extend(int index, u8 *digest);
extern ssize_t tpm_pcrread(int index, u8 *hash);
extern ssize_t tpm_dirread(int index, u8 *hash);
extern ssize_t tpm_cap_version(int *maj, int *min, int *ver, int *rev);
extern ssize_t tpm_cap_pcr(int *pcrs);
extern ssize_t tpm_cap_dir(int *dirs);
extern ssize_t tpm_cap_manufacturer(int *manufacturer);
extern ssize_t tpm_cap_slot(int *slots);
#endif /* __KERNEL__ */