#ifndef VBOOT_REFERENCE_TPM2_MARSHALING_H_
#define VBOOT_REFERENCE_TPM2_MARSHALING_H_
#include "tss_constants.h"
#ifdef __cplusplus
extern "C" {
#endif
int tpm_marshal_command(TPM_CC command, void *tpm_command_body,
void *buffer, int buffer_size);
int tpm_unmarshal_response(TPM_CC command,
void *response_body,
int response_size,
struct tpm2_response *response);
uint32_t tpm_get_packet_size(const uint8_t *packet);
uint32_t tpm_get_packet_response_code(const uint8_t *packet);
void tpm_set_ph_disabled(int flag);
int tpm_is_ph_disabled(void);
#ifdef __cplusplus
}
#endif
#endif