]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Merge pull request #8023 from volta-networks/feat_add_agentx_enabled_hook
authorQuentin Young <qlyoung@users.noreply.github.com>
Wed, 24 Feb 2021 18:24:33 +0000 (13:24 -0500)
committerGitHub <noreply@github.com>
Wed, 24 Feb 2021 18:24:33 +0000 (13:24 -0500)
lib: add agentx_enabled hook

1  2 
lib/agentx.c
lib/smux.h

diff --cc lib/agentx.c
Simple merge
diff --cc lib/smux.h
index 11c1becd6066799dba5eee9a87bd90f4ac192256,1f79d41ef8cd261f6c206e5e4479872ba0b43dd5..a263478a2e22abef5e18c996cefcd4d69226bc41
@@@ -100,9 -70,8 +101,10 @@@ struct index_oid 
        (*var_len = sizeof(struct in_addr), snmp_in_addr_val = V,              \
         (uint8_t *)&snmp_in_addr_val)
  
 +#define SNMP_IP6ADDRESS(V) (*var_len = sizeof(struct in6_addr), (uint8_t *)&V)
 +
  extern void smux_init(struct thread_master *tm);
+ extern void smux_agentx_enable(void);
  extern void smux_register_mib(const char *, struct variable *, size_t, int,
                              oid[], size_t);
  extern int smux_header_generic(struct variable *, oid[], size_t *, int,
@@@ -131,26 -100,17 +133,28 @@@ extern int smux_header_table(struct var
   The use of the arguments may differ depending on the implementation
   used.
  */
 -extern int smux_trap(struct variable *, size_t, const oid *, size_t,
 -                   const oid *, size_t, const oid *, size_t,
 -                   const struct trap_object *, size_t, uint8_t);
 -
 +extern void smux_trap(struct variable *, size_t, const oid *, size_t,
 +                    const oid *, size_t, const oid *, size_t,
 +                    const struct trap_object *, size_t, uint8_t);
 +
 +extern int smux_trap_multi_index(struct variable *vp, size_t vp_len,
 +                               const oid *ename, size_t enamelen,
 +                               const oid *name, size_t namelen,
 +                               struct index_oid *iname, size_t index_len,
 +                               const struct trap_object *trapobj,
 +                               size_t trapobjlen, uint8_t sptrap);
  extern int oid_compare(const oid *, int, const oid *, int);
  extern void oid2in_addr(oid[], int, struct in_addr *);
 +extern void oid2in6_addr(oid oid[], struct in6_addr *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);
  
+ DECLARE_HOOK(agentx_enabled, (), ())
  #ifdef __cplusplus
  }
  #endif