snmpsession(3)

snmpsession3

Snmpkit functions dealing with a particular snmpsession.

Usage

#include <snmpkit.h>
SNMPSESSION *sk_new_session(char *host, void *(start_routine)(SNMPSESSION*), const char *community);

Overview

A snmpsession is an opaque data structure which specifies a

The new_snmpsession() creates a new session. The SNMPSOCK should have previously created by the application using, new_snmpsock(). The host should will be looked up using gethostbyname() and the community string is something like a password in SNMP lingo but it doesn't have a username associated with it and it is transmitted in clear text within the packets. In most cases, there are a couple of community strings. One is only allowed to read and the other is allowed to both read and write. The default read-only community name is "public". If set the community name to NULL, the community name will default to public.

The new_snmpsession_quick() function is very similar to the new_snmpsession() function except the community name always defaults to "public".

The delete_snmpsock() function is the opposite of the new_snmpsession() function. It frees all memory and resources currently being used by the SNMPSESSION structure.

Return value

The new_snmpsock() and the new_snmpsock_quick() both return a pointer to the newly created snmpsock or NULL if there was an error.

Releases

7 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0–5.0
  2. 6.0–8

Author

Ben Woodard <[email protected]>

Bugs

The library can possibly throw different kinds of C++ exceptions that won't be caught by the glue code and therefore it can cause your program to crash inexplicably.

From libsnmpkit-dev 0.9-16 in Debian 8 (Jessie). Parsed by carta from the page's man source.