diff options
author | rob <rob@cvs.openbsd.org> | 2018-07-03 18:49:11 +0000 |
---|---|---|
committer | rob <rob@cvs.openbsd.org> | 2018-07-03 18:49:11 +0000 |
commit | 279159d5975f61840d0d3cca5b790edd6f9e145e (patch) | |
tree | 23ebe4f08474d8407151729e2d702ed983ffa905 /usr.sbin/ypldap/ber.h | |
parent | f1e56339a425270bd2f8c5ab55a70d903416d413 (diff) |
Synchronize ber changes from the snmpd instance to ldap, ldapd, and ypldap.
See usr.sbin/snmpd/ber.c revision 1.24 commit log for a summary of these
changes (e.g. SNMPv2 traps, User-based Security Model, callback for USM HMAC
calculations).
There is one final ber piece to copy from the snmpd instance related to
ber_getc() which will be done in a separate diff.
"looks good to me" deraadt@
Diffstat (limited to 'usr.sbin/ypldap/ber.h')
-rw-r--r-- | usr.sbin/ypldap/ber.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/ypldap/ber.h b/usr.sbin/ypldap/ber.h index b599add0e1b..95932649f1e 100644 --- a/usr.sbin/ypldap/ber.h +++ b/usr.sbin/ypldap/ber.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ber.h,v 1.5 2018/06/29 18:28:42 rob Exp $ */ +/* $OpenBSD: ber.h,v 1.6 2018/07/03 18:49:10 rob Exp $ */ /* * Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org> @@ -17,13 +17,19 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef _BER_H +#define _BER_H + struct ber_element { struct ber_element *be_next; unsigned long be_type; unsigned long be_encoding; size_t be_len; + off_t be_offs; int be_free; u_int8_t be_class; + void (*be_cb)(void *, size_t); + void *be_cbarg; union { struct ber_element *bv_sub; void *bv_val; @@ -35,6 +41,7 @@ struct ber_element { }; struct ber { + off_t br_offs; u_char *br_wbuf; u_char *br_wptr; u_char *br_wend; @@ -119,10 +126,17 @@ ssize_t ber_get_writebuf(struct ber *, void **); int ber_write_elements(struct ber *, struct ber_element *); void ber_set_readbuf(struct ber *, void *, size_t); struct ber_element *ber_read_elements(struct ber *, struct ber_element *); +off_t ber_getpos(struct ber_element *); void ber_free_element(struct ber_element *); void ber_free_elements(struct ber_element *); size_t ber_calc_len(struct ber_element *); void ber_set_application(struct ber *, unsigned long (*)(struct ber_element *)); +void ber_set_writecallback(struct ber_element *, + void (*)(void *, size_t), void *); void ber_free(struct ber *); +int ber_oid_cmp(struct ber_oid *, struct ber_oid *); + __END_DECLS + +#endif /* _BER_H */ |