.TH snmpsession 3 "November 2000" "GNU snmpkit 0.4" .SH NAME snmpsession \- snmpkit functions dealing with a particular snmpsession. .SH SYNOPSIS .nf .B #include .BI "SNMPSESSION *sk_new_session(char *" host ", void *(" start_routine ")(SNMPSESSION*), const char *" community ");" .sp .SH DESCRIPTION A snmpsession is an opaque data structure which specifies a .sp The .B new_snmpsession() creates a new session. The SNMPSOCK should have previously created by the application using, .B new_snmpsock(). The host should will be looked up using .B 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. .sp The .B new_snmpsession_quick() function is very similar to the .B new_snmpsession() function except the community name always defaults to "public". .sp The .B delete_snmpsock() function is the opposite of the .B new_snmpsession() function. It frees all memory and resources currently being used by the SNMPSESSION structure. .SH "RETURN VALUE" The .B new_snmpsock() and the .B new_snmpsock_quick() both return a pointer to the newly created snmpsock or .B NULL if there was an error. .SH AUTHOR Ben Woodard .SH 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. .SH "SEE ALSO" .BR libsnmpkit "(3), " snmpsock "(3), " snmpstructfiller "(3), " snmptable "(3), " gethostbyname "(3)"