---
name: "netsnmp_old_api"
section: "3snmp"
platform: "linux"
package: "libsnmp-dev"
version: "5.4.3~dfsg-2.8+deb7u1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/netsnmp_old_api"
---

# netsnmp\_old\_api(3snmp)

Calls mib module code written in the old style of code.

## NAME

old\_api -

Calls mib **module** code written in the old style of code.

### Functions

**netsnmp\_mib\_handler** \* **get\_old\_api\_handler** (void)\
 *returns a old\_api handler that should be the final calling handler.*  int **netsnmp\_register\_old\_api** (const char \*moduleName, struct **variable** \*var, size\_t varsize, size\_t numvars, oid \*mibloc, size\_t mibloclen, int priority, int range\_subid, oid range\_ubound, **netsnmp\_session** \*ss, const char \*context, int timeout, int flags)\
 *Registers an old API set into the mib* **tree***.*  int **netsnmp\_register\_mib\_table\_row** (const char \*moduleName, struct **variable** \*var, size\_t varsize, size\_t numvars, oid \*mibloc, size\_t mibloclen, int priority, int var\_subid, **netsnmp\_session** \*ss, const char \*context, int timeout, int flags)\
 *registers a row within a mib table*  int **netsnmp\_old\_api\_helper** (**netsnmp\_mib\_handler** \*handler, **netsnmp\_handler\_registration** \*reginfo, **netsnmp\_agent\_request\_info** \*reqinfo, **netsnmp\_request\_info** \*requests)\
 *implements the old\_api handler*

## Detailed Description

Calls mib **module** code written in the old style of code.

This is a backwards compatilibity **module** that allows code written in the old API to be run under the new handler based architecture. Use it by calling **netsnmp\_register\_old\_api()**.

## Function Documentation

### netsnmp\_mib\_handler\* get\_old\_api\_handler (void)

returns a old\_api handler that should be the final calling handler. Don't use this function. Use the **netsnmp\_register\_old\_api()** function instead.

Definition at line 37 of file old\_api.c.

### int netsnmp\_old\_api\_helper (netsnmp\_mib\_handler \* handler, netsnmp\_handler\_registration \* reginfo, netsnmp\_agent\_request\_info \* reqinfo, netsnmp\_request\_info \* requests)

implements the old\_api handler

Definition at line 226 of file old\_api.c.

### int netsnmp\_register\_mib\_table\_row (const char \* moduleName, struct variable \* var, size\_t varsize, size\_t numvars, oid \* mibloc, size\_t mibloclen, int priority, int var\_subid, netsnmp\_session \* ss, const char \* context, int timeout, int flags)

registers a row within a mib table

Definition at line 107 of file old\_api.c.

### int netsnmp\_register\_old\_api (const char \* moduleName, struct variable \* var, size\_t varsize, size\_t numvars, oid \* mibloc, size\_t mibloclen, int priority, int range\_subid, oid range\_ubound, netsnmp\_session \* ss, const char \* context, int timeout, int flags)

Registers an old API set into the mib **tree**. Functionally this mimics the old register\_mib\_context() function (and in fact the new register\_mib\_context() function merely calls this new old\_api one).

netsnmp\_handler\_registration\_free(reginfo); already freed

Definition at line 48 of file old\_api.c.

## Author

Generated automatically by Doxygen for net-snmp from the source code.
