diff options
| author | Pat Ruddy <pat@voltanet.io> | 2020-10-01 12:09:01 +0100 |
|---|---|---|
| committer | Pat Ruddy <pat@voltanet.io> | 2021-02-02 09:37:08 +0000 |
| commit | 4f13e83dcd034d8e684a8f3a8fdd18b5368d16ff (patch) | |
| tree | d00307b32a4dd1b33f8fcc3a478196daaa056da7 /lib/smux.h | |
| parent | 0760a74d2fc29a89d1d0d252af98d674323b210a (diff) | |
lib: add utilities to encode/decode an int in SNMP oid
Add 2 functions to encode/decode intergers to/from SNMP OIDs. Make
sure oid is in network format.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'lib/smux.h')
| -rw-r--r-- | lib/smux.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/smux.h b/lib/smux.h index 0efe029d3d..66a45a0e77 100644 --- a/lib/smux.h +++ b/lib/smux.h @@ -104,8 +104,10 @@ extern int smux_trap(struct variable *, size_t, const oid *, size_t, extern int oid_compare(const oid *, int, const oid *, int); extern void oid2in_addr(oid[], int, struct in_addr *); +extern void oid2int(oid oid[], int *dest); extern void *oid_copy(void *, const void *, size_t); extern void oid_copy_addr(oid[], const struct in_addr *, int); +extern void oid_copy_int(oid oid[], int *val); extern void oid2string(oid oid[], int len, char *string); extern void oid_copy_str(oid oid[], const char *string, int len); |
