Lines Matching refs:buf

18 	(const asn1buf *buf);
19 /* requires *buf has been created and not destroyed
21 (in octets) of buf's octet buffer. */
22 #define asn1buf_size(buf) \
23 (((buf) == NULL || (buf)->base == NULL) \
25 : ((buf)->bound - (buf)->base + 1))
28 (const asn1buf *buf);
29 /* requires *buf is allocated
30 effects Returns the number of unused, allocated octets in *buf. */
31 #define asn1buf_free(buf) \
32 (((buf) == NULL || (buf)->base == NULL) \
34 : ((buf)->bound - (buf)->next + 1))
38 (asn1buf *buf, const unsigned int amount);
39 /* requires *buf is allocated
40 modifies *buf
41 effects If buf has less than amount octets of free space, then it is
44 #define asn1buf_ensure_space(buf,amount) \
45 ((asn1buf_free(buf) < (amount)) \
46 ? (asn1buf_expand((buf), (amount)-asn1buf_free(buf))) \
51 (asn1buf *buf, unsigned int inc);
52 /* requires *buf is allocated
53 modifies *buf
54 effects Expands *buf by allocating space for inc more octets.
58 (const asn1buf *buf);
59 /* requires *buf is allocated
60 effects Returns the length of the encoding in *buf. */
61 #define asn1buf_len(buf) ((buf)->next - (buf)->base)
103 (asn1buf **buf);
104 /* effects Creates a new encoding buffer pointed to by *buf.
108 (asn1buf *buf, const krb5_data *code);
109 /* requires *buf has already been allocated
110 effects Turns *buf into a "wrapper" for *code. i.e. *buf is set up
116 (asn1buf *subbuf, const asn1buf *buf,
119 /* requires *subbuf and *buf are allocated
120 effects *subbuf becomes a sub-buffer of *buf. *subbuf begins
121 at *buf's current position and is length octets long.
122 (Unless this would exceed the bounds of *buf -- in
127 (asn1buf *buf, asn1buf *subbuf, const asn1_class Class,
131 /* requires *subbuf is a sub-buffer of *buf, as created by asn1buf_imbed.
133 effects Synchronizes *buf's current position to match that of *subbuf. */
136 (asn1buf *buf, const unsigned int length,
138 /* requires *buf is a subbuffer used in a decoding of a
143 (asn1buf **buf);
144 /* effects Deallocates **buf, sets *buf to NULL. */
147 (asn1buf *buf, const int o);
148 /* requires *buf is allocated
149 effects Inserts o into the buffer *buf, expanding the buffer if
152 extern __inline__ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o)
156 retval = asn1buf_ensure_space(buf,1U);
158 *(buf->next) = (char)o;
159 (buf->next)++;
165 (asn1buf *buf, const unsigned int len, const asn1_octet *s);
166 /* requires *buf is allocated
167 modifies *buf
169 into the buffer *buf, expanding the buffer if necessary.
173 (asn1buf *buf, const unsigned int len, const char *s);
174 /* requires *buf is allocated
175 modifies *buf
177 into the buffer *buf, expanding the buffer if necessary.
181 (asn1buf *buf, asn1_octet *o);
182 /* requires *buf is allocated
183 effects Returns *buf's current octet in *o and advances to
185 Returns ASN1_OVERRUN if *buf has already been exhausted. */
186 #define asn1buf_remove_octet(buf,o) \
187 (((buf)->next > (buf)->bound) \
189 : ((*(o) = (asn1_octet)(*(((buf)->next)++))),0))
192 (asn1buf *buf, const unsigned int len, asn1_octet **s);
193 /* requires *buf is allocated
194 effects Removes the next len octets of *buf and returns them in **s.
196 left in *buf.
200 (asn1buf *buf, const unsigned int len,
202 /* requires *buf is allocated
203 effects Removes the next len octets of *buf and returns them in **s.
205 left in *buf.
209 (const asn1buf *buf, char **s);
211 effects Returns a human-readable representation of *buf in *s,
212 where each octet in *buf is represented by a character in *s. */
215 (const asn1buf *buf, char **s);
217 effects Returns a human-readable representation of *buf in *s,
218 where each octet in *buf is represented by a 2-digit
222 (const asn1buf *buf, krb5_data **code);
224 effects Instantiates **code with the krb5_data representation of **buf. */
228 (asn1buf *buf, int indef);
229 /* requires *buf is a buffer containing an asn.1 structure or array
230 modifies *buf
231 effects Returns the number of unprocessed octets remaining in *buf. */