Lines Matching refs:buf
89 int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len);
90 int (*send) (struct tpm_chip *chip, u8 *buf, size_t len);
413 int tpm_buf_init(struct tpm_buf *buf, u16 tag, u32 ordinal);
414 void tpm_buf_reset(struct tpm_buf *buf, u16 tag, u32 ordinal);
415 int tpm_buf_init_sized(struct tpm_buf *buf);
416 void tpm_buf_reset_sized(struct tpm_buf *buf);
417 void tpm_buf_destroy(struct tpm_buf *buf);
418 u32 tpm_buf_length(struct tpm_buf *buf);
419 void tpm_buf_append(struct tpm_buf *buf, const u8 *new_data, u16 new_length);
420 void tpm_buf_append_u8(struct tpm_buf *buf, const u8 value);
421 void tpm_buf_append_u16(struct tpm_buf *buf, const u16 value);
422 void tpm_buf_append_u32(struct tpm_buf *buf, const u32 value);
423 u8 tpm_buf_read_u8(struct tpm_buf *buf, off_t *offset);
424 u16 tpm_buf_read_u16(struct tpm_buf *buf, off_t *offset);
425 u32 tpm_buf_read_u32(struct tpm_buf *buf, off_t *offset);
426 void tpm_buf_append_handle(struct tpm_chip *chip, struct tpm_buf *buf, u32 handle);
464 extern ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_buf *buf,
474 static inline void tpm_buf_append_empty_auth(struct tpm_buf *buf, u32 handle) in tpm_buf_append_empty_auth() argument
477 tpm_buf_append_u32(buf, 9); /* total length of auth */ in tpm_buf_append_empty_auth()
478 tpm_buf_append_u32(buf, handle); in tpm_buf_append_empty_auth()
479 tpm_buf_append_u16(buf, 0); /* nonce len */ in tpm_buf_append_empty_auth()
480 tpm_buf_append_u8(buf, 0); /* attributes */ in tpm_buf_append_empty_auth()
481 tpm_buf_append_u16(buf, 0); /* hmac len */ in tpm_buf_append_empty_auth()
510 static inline void tpm_buf_append_empty_auth(struct tpm_buf *buf, u32 handle) in tpm_buf_append_empty_auth() argument
524 void tpm_buf_append_name(struct tpm_chip *chip, struct tpm_buf *buf,
526 void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf,
529 void tpm_buf_append_auth(struct tpm_chip *chip, struct tpm_buf *buf,
532 struct tpm_buf *buf, in tpm_buf_append_hmac_session_opt() argument
541 tpm_buf_append_hmac_session(chip, buf, attributes, passphrase, passphraselen); in tpm_buf_append_hmac_session_opt()
543 offset = buf->handles * 4 + TPM_HEADER_SIZE; in tpm_buf_append_hmac_session_opt()
544 head = (struct tpm_header *)buf->data; in tpm_buf_append_hmac_session_opt()
550 if (tpm_buf_length(buf) == offset) in tpm_buf_append_hmac_session_opt()
558 void tpm_buf_fill_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf);
559 int tpm_buf_check_hmac_response(struct tpm_chip *chip, struct tpm_buf *buf,
573 struct tpm_buf *buf) in tpm_buf_fill_hmac_session() argument
577 struct tpm_buf *buf, in tpm_buf_check_hmac_response() argument