Lines Matching refs:p

73 #define pack_BOOL(p, t) pack_BYTE(p, t)  argument
74 #define unpack_BOOL(p, t) unpack_BYTE(p, t) argument
75 #define unpack3_BOOL(p, x, m, t) unpack3_BYTE(p, x, m, t) argument
80 UINT16* p = ptr; in pack_UINT16() local
81 *p = cpu_to_be16(t); in pack_UINT16()
87 UINT16* p = ptr; in unpack_UINT16() local
88 *t = be16_to_cpu(*p); in unpack_UINT16()
104 UINT32* p = ptr; in pack_UINT32() local
105 *p = cpu_to_be32(t); in pack_UINT32()
111 UINT32* p = ptr; in unpack_UINT32() local
112 *t = be32_to_cpu(*p); in unpack_UINT32()
130 #define pack_TPM_RESULT(p, t) pack_UINT32(p, t) argument
131 #define pack_TPM_PCRINDEX(p, t) pack_UINT32(p, t) argument
132 #define pack_TPM_DIRINDEX(p, t) pack_UINT32(p, t) argument
133 #define pack_TPM_HANDLE(p, t) pack_UINT32(p, t) argument
134 #define pack_TPM_AUTHHANDLE(p, t) pack_TPM_HANDLE(p, t) argument
135 #define pack_TCPA_HASHHANDLE(p, t) pack_TPM_HANDLE(p, t) argument
136 #define pack_TCPA_HMACHANDLE(p, t) pack_TPM_HANDLE(p, t) argument
137 #define pack_TCPA_ENCHANDLE(p, t) pack_TPM_HANDLE(p, t) argument
138 #define pack_TPM_KEY_HANDLE(p, t) pack_TPM_HANDLE(p, t) argument
139 #define pack_TCPA_ENTITYHANDLE(p, t) pack_TPM_HANDLE(p, t) argument
140 #define pack_TPM_RESOURCE_TYPE(p, t) pack_UINT32(p, t) argument
141 #define pack_TPM_COMMAND_CODE(p, t) pack_UINT32(p, t) argument
142 #define pack_TPM_PROTOCOL_ID(p, t) pack_UINT16(p, t) argument
143 #define pack_TPM_AUTH_DATA_USAGE(p, t) pack_BYTE(p, t) argument
144 #define pack_TPM_ENTITY_TYPE(p, t) pack_UINT16(p, t) argument
145 #define pack_TPM_ALGORITHM_ID(p, t) pack_UINT32(p, t) argument
146 #define pack_TPM_KEY_USAGE(p, t) pack_UINT16(p, t) argument
147 #define pack_TPM_STARTUP_TYPE(p, t) pack_UINT16(p, t) argument
148 #define pack_TPM_CAPABILITY_AREA(p, t) pack_UINT32(p, t) argument
149 #define pack_TPM_ENC_SCHEME(p, t) pack_UINT16(p, t) argument
150 #define pack_TPM_SIG_SCHEME(p, t) pack_UINT16(p, t) argument
151 #define pack_TPM_MIGRATE_SCHEME(p, t) pack_UINT16(p, t) argument
152 #define pack_TPM_PHYSICAL_PRESENCE(p, t) pack_UINT16(p, t) argument
153 #define pack_TPM_KEY_FLAGS(p, t) pack_UINT32(p, t) argument
154 #define pack_TPM_LOCALITY_SELECTION(p, t) pack_BYTE(p, t) argument
156 #define unpack_TPM_RESULT(p, t) unpack_UINT32(p, t) argument
157 #define unpack_TPM_PCRINDEX(p, t) unpack_UINT32(p, t) argument
158 #define unpack_TPM_DIRINDEX(p, t) unpack_UINT32(p, t) argument
159 #define unpack_TPM_HANDLE(p, t) unpack_UINT32(p, t) argument
160 #define unpack_TPM_AUTHHANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
161 #define unpack_TCPA_HASHHANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
162 #define unpack_TCPA_HMACHANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
163 #define unpack_TCPA_ENCHANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
164 #define unpack_TPM_KEY_HANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
165 #define unpack_TCPA_ENTITYHANDLE(p, t) unpack_TPM_HANDLE(p, t) argument
166 #define unpack_TPM_RESOURCE_TYPE(p, t) unpack_UINT32(p, t) argument
167 #define unpack_TPM_COMMAND_CODE(p, t) unpack_UINT32(p, t) argument
168 #define unpack_TPM_PROTOCOL_ID(p, t) unpack_UINT16(p, t) argument
169 #define unpack_TPM_AUTH_DATA_USAGE(p, t) unpack_BYTE(p, t) argument
170 #define unpack_TPM_ENTITY_TYPE(p, t) unpack_UINT16(p, t) argument
171 #define unpack_TPM_ALGORITHM_ID(p, t) unpack_UINT32(p, t) argument
172 #define unpack_TPM_KEY_USAGE(p, t) unpack_UINT16(p, t) argument
173 #define unpack_TPM_STARTUP_TYPE(p, t) unpack_UINT16(p, t) argument
174 #define unpack_TPM_CAPABILITY_AREA(p, t) unpack_UINT32(p, t) argument
175 #define unpack_TPM_ENC_SCHEME(p, t) unpack_UINT16(p, t) argument
176 #define unpack_TPM_SIG_SCHEME(p, t) unpack_UINT16(p, t) argument
177 #define unpack_TPM_MIGRATE_SCHEME(p, t) unpack_UINT16(p, t) argument
178 #define unpack_TPM_PHYSICAL_PRESENCE(p, t) unpack_UINT16(p, t) argument
179 #define unpack_TPM_KEY_FLAGS(p, t) unpack_UINT32(p, t) argument
180 #define unpack_TPM_LOCALITY_SELECTION(p, t) unpack_BYTE(p, t) argument
182 #define unpack3_TPM_RESULT(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
183 #define unpack3_TPM_PCRINDEX(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
184 #define unpack3_TPM_DIRINDEX(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
185 #define unpack3_TPM_HANDLE(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
186 #define unpack3_TPM_AUTHHANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
187 #define unpack3_TCPA_HASHHANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
188 #define unpack3_TCPA_HMACHANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
189 #define unpack3_TCPA_ENCHANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
190 #define unpack3_TPM_KEY_HANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
191 #define unpack3_TCPA_ENTITYHANDLE(p, l, m, t) unpack3_TPM_HANDLE(p, l, m, t) argument
192 #define unpack3_TPM_RESOURCE_TYPE(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
193 #define unpack3_TPM_COMMAND_CODE(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
194 #define unpack3_TPM_PROTOCOL_ID(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
195 #define unpack3_TPM_AUTH_DATA_USAGE(p, l, m, t) unpack3_BYTE(p, l, m, t) argument
196 #define unpack3_TPM_ENTITY_TYPE(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
197 #define unpack3_TPM_ALGORITHM_ID(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
198 #define unpack3_TPM_KEY_USAGE(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
199 #define unpack3_TPM_STARTUP_TYPE(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
200 #define unpack3_TPM_CAPABILITY_AREA(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
201 #define unpack3_TPM_ENC_SCHEME(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
202 #define unpack3_TPM_SIG_SCHEME(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
203 #define unpack3_TPM_MIGRATE_SCHEME(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
204 #define unpack3_TPM_PHYSICAL_PRESENCE(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
205 #define unpack3_TPM_KEY_FLAGS(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
206 #define unpack3_TPM_LOCALITY_SELECTION(p, l, m, t) unpack3_BYTE(p, l, m, t) argument
207 #define unpack3_TPM_DEEP_QUOTE_INFO(p, l, m, t) unpack3_UINT32(p, l, m, t) argument
235 #define pack_TPM_AUTH_HANDLE(p, t) pack_UINT32(p, t) argument
236 #define pack_TCS_CONTEXT_HANDLE(p, t) pack_UINT32(p, t) argument
237 #define pack_TCS_KEY_HANDLE(p, t) pack_UINT32(p, t) argument
239 #define unpack_TPM_AUTH_HANDLE(p, t) unpack_UINT32(p, t) argument
240 #define unpack_TCS_CONTEXT_HANDLE(p, t) unpack_UINT32(p, t) argument
241 #define unpack_TCS_KEY_HANDLE(p, t) unpack_UINT32(p, t) argument
328 #define pack_TPM_SECRET(p, t) pack_TPM_AUTHDATA(p, t) argument
329 #define pack_TPM_ENCAUTH(p, t) pack_TPM_AUTHDATA(p, t) argument
330 #define pack_TPM_PAYLOAD_TYPE(p, t) pack_BYTE(p, t) argument
331 #define pack_TPM_TAG(p, t) pack_UINT16(p, t) argument
332 #define pack_TPM_STRUCTURE_TAG(p, t) pack_UINT16(p, t) argument
334 #define unpack_TPM_SECRET(p, t) unpack_TPM_AUTHDATA(p, t) argument
335 #define unpack_TPM_ENCAUTH(p, t) unpack_TPM_AUTHDATA(p, t) argument
336 #define unpack_TPM_PAYLOAD_TYPE(p, t) unpack_BYTE(p, t) argument
337 #define unpack_TPM_TAG(p, t) unpack_UINT16(p, t) argument
338 #define unpack_TPM_STRUCTURE_TAG(p, t) unpack_UINT16(p, t) argument
339 #define unpack3_TPM_STRUCTURE_TAG(p, l, m, t) unpack3_UINT16(p, l, m, t) argument
423 #define unpack3_TPM_PCRVALUE(p...) unpack3_TPM_DIGEST(p) argument
427 #define unpack3_TPM_COMPOSITE_HASH(ptr, p, m, d) unpack3_TPM_DIGEST(ptr, p, m, d) argument
607 inline BYTE* pack_TPM_PCR_SELECTION(BYTE* ptr, const TPM_PCR_SELECTION* p) { in pack_TPM_PCR_SELECTION() argument
608 ptr = pack_UINT16(ptr, p->sizeOfSelect); in pack_TPM_PCR_SELECTION()
609 ptr = pack_BUFFER(ptr, p->pcrSelect, p->sizeOfSelect); in pack_TPM_PCR_SELECTION()
614 inline BYTE* unpack_TPM_PCR_SELECTION(BYTE* ptr, TPM_PCR_SELECTION* p, UnpackPtr alloc) { in unpack_TPM_PCR_SELECTION() argument
615 ptr = unpack_UINT16(ptr, &p->sizeOfSelect); in unpack_TPM_PCR_SELECTION()
616 ptr = unpack_PTR(ptr, &p->pcrSelect, p->sizeOfSelect, alloc); in unpack_TPM_PCR_SELECTION()
621 inline int unpack3_TPM_PCR_SELECTION(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_SELECTION* p, Unpa… in unpack3_TPM_PCR_SELECTION() argument
622 return unpack3_UINT16(ptr, pos, max, &p->sizeOfSelect) || in unpack3_TPM_PCR_SELECTION()
623 unpack3_PTR(ptr, pos, max, &p->pcrSelect, p->sizeOfSelect, alloc); in unpack3_TPM_PCR_SELECTION()
627 inline int sizeof_TPM_PCR_SELECTION(const TPM_PCR_SELECTION* p) { in sizeof_TPM_PCR_SELECTION() argument
628 return 2 + p->sizeOfSelect; in sizeof_TPM_PCR_SELECTION()
632 inline BYTE* pack_TPM_PCR_INFO(BYTE* ptr, const TPM_PCR_INFO* p) { in pack_TPM_PCR_INFO() argument
633 ptr = pack_TPM_PCR_SELECTION(ptr, &p->pcrSelection); in pack_TPM_PCR_INFO()
634 ptr = pack_TPM_COMPOSITE_HASH(ptr, &p->digestAtRelease); in pack_TPM_PCR_INFO()
635 ptr = pack_TPM_COMPOSITE_HASH(ptr, &p->digestAtCreation); in pack_TPM_PCR_INFO()
640 inline int unpack3_TPM_PCR_INFO(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_INFO* p, UnpackPtr allo… in unpack3_TPM_PCR_INFO() argument
641 return unpack3_TPM_PCR_SELECTION(ptr, pos, max, &p->pcrSelection, alloc) || in unpack3_TPM_PCR_INFO()
642 unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtRelease) || in unpack3_TPM_PCR_INFO()
643 unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtCreation); in unpack3_TPM_PCR_INFO()
647 inline int sizeof_TPM_PCR_INFO(const TPM_PCR_INFO* p) { in sizeof_TPM_PCR_INFO() argument
649 rc += sizeof_TPM_PCR_SELECTION(&p->pcrSelection); in sizeof_TPM_PCR_INFO()
650 rc += sizeof_TPM_COMPOSITE_HASH(&p->digestAtRelease); in sizeof_TPM_PCR_INFO()
651 rc += sizeof_TPM_COMPOSITE_HASH(&p->digestAtCreation); in sizeof_TPM_PCR_INFO()
656 inline BYTE* pack_TPM_PCR_INFO_LONG(BYTE* ptr, const TPM_PCR_INFO_LONG* p) { in pack_TPM_PCR_INFO_LONG() argument
657 ptr = pack_TPM_STRUCTURE_TAG(ptr, p->tag); in pack_TPM_PCR_INFO_LONG()
658 ptr = pack_TPM_LOCALITY_SELECTION(ptr, p->localityAtCreation); in pack_TPM_PCR_INFO_LONG()
659 ptr = pack_TPM_LOCALITY_SELECTION(ptr, p->localityAtRelease); in pack_TPM_PCR_INFO_LONG()
660 ptr = pack_TPM_PCR_SELECTION(ptr, &p->creationPCRSelection); in pack_TPM_PCR_INFO_LONG()
661 ptr = pack_TPM_PCR_SELECTION(ptr, &p->releasePCRSelection); in pack_TPM_PCR_INFO_LONG()
662 ptr = pack_TPM_COMPOSITE_HASH(ptr, &p->digestAtCreation); in pack_TPM_PCR_INFO_LONG()
663 ptr = pack_TPM_COMPOSITE_HASH(ptr, &p->digestAtRelease); in pack_TPM_PCR_INFO_LONG()
668 inline int sizeof_TPM_PCR_INFO_LONG(const TPM_PCR_INFO_LONG* p) { in sizeof_TPM_PCR_INFO_LONG() argument
670 rc += sizeof_TPM_STRUCTURE_TAG(p->tag); in sizeof_TPM_PCR_INFO_LONG()
671 rc += sizeof_TPM_LOCALITY_SELECTION(p->localityAtCreation); in sizeof_TPM_PCR_INFO_LONG()
672 rc += sizeof_TPM_LOCALITY_SELECTION(p->localityAtRelease); in sizeof_TPM_PCR_INFO_LONG()
673 rc += sizeof_TPM_PCR_SELECTION(&p->creationPCRSelection); in sizeof_TPM_PCR_INFO_LONG()
674 rc += sizeof_TPM_PCR_SELECTION(&p->releasePCRSelection); in sizeof_TPM_PCR_INFO_LONG()
675 rc += sizeof_TPM_COMPOSITE_HASH(&p->digestAtCreation); in sizeof_TPM_PCR_INFO_LONG()
676 rc += sizeof_TPM_COMPOSITE_HASH(&p->digestAtRelease); in sizeof_TPM_PCR_INFO_LONG()
681 inline int unpack3_TPM_PCR_INFO_LONG(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_INFO_LONG* p, Unpa… in unpack3_TPM_PCR_INFO_LONG() argument
682 return unpack3_TPM_STRUCTURE_TAG(ptr, pos, max, &p->tag) || in unpack3_TPM_PCR_INFO_LONG()
684 &p->localityAtCreation) || in unpack3_TPM_PCR_INFO_LONG()
686 &p->localityAtRelease) || in unpack3_TPM_PCR_INFO_LONG()
688 &p->creationPCRSelection, alloc) || in unpack3_TPM_PCR_INFO_LONG()
690 &p->releasePCRSelection, alloc) || in unpack3_TPM_PCR_INFO_LONG()
692 &p->digestAtCreation) || in unpack3_TPM_PCR_INFO_LONG()
693 unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtRelease); in unpack3_TPM_PCR_INFO_LONG()
697 inline BYTE* pack_TPM_PCR_COMPOSITE(BYTE* ptr, const TPM_PCR_COMPOSITE* p) { in pack_TPM_PCR_COMPOSITE() argument
698 ptr = pack_TPM_PCR_SELECTION(ptr, &p->select); in pack_TPM_PCR_COMPOSITE()
699 ptr = pack_UINT32(ptr, p->valueSize); in pack_TPM_PCR_COMPOSITE()
700 ptr = pack_BUFFER(ptr, (const BYTE*)p->pcrValue, p->valueSize); in pack_TPM_PCR_COMPOSITE()
705 inline int unpack3_TPM_PCR_COMPOSITE(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_COMPOSITE* p, Unpa… in unpack3_TPM_PCR_COMPOSITE() argument
706 return unpack3_TPM_PCR_SELECTION(ptr, pos, max, &p->select, alloc) || in unpack3_TPM_PCR_COMPOSITE()
707 unpack3_UINT32(ptr, pos, max, &p->valueSize) || in unpack3_TPM_PCR_COMPOSITE()
708 unpack3_PTR(ptr, pos, max, (BYTE**)&p->pcrValue, p->valueSize, alloc); in unpack3_TPM_PCR_COMPOSITE()
923 #define pack_TPM_RSP_HEADER(p, t, s, r) pack_TPM_RQU_HEADER(p, t, s, r) argument
924 #define unpack_TPM_RSP_HEADER(p, t, s, r) unpack_TPM_RQU_HEADER(p, t, s, r) argument
925 #define unpack3_TPM_RSP_HEADER(p, l, m, t, s, r) unpack3_TPM_RQU_HEADER(p, l, m, t, s, r) argument