Agentuino - A lightweight SNMP Agent

Please take a look at the library's class constructor to see how to use the session struct. Based on your posted code your missing some parameters.

	// set community name set/get sizes

	session->setSize = strlen(session->setCommName);

	session->getSize = strlen(session->getCommName);

	//

	// validate get/set community name sizes

	if ( session->setSize > SNMP_MAX_NAME_LEN || session->getSize > SNMP_MAX_NAME_LEN ) {

		return SNMP_API_STAT_NAME_TOO_BIG;

	}

	//

	// set session property

	_session = session;

	//

	// validate session port number

	if ( session->port == NULL || session->port == 0 ) session->port = SNMP_DEFAULT_PORT;

	//

	// init UDP socket

	_socket.initUDP(session->port);

	//

	return SNMP_API_STAT_SUCCESS;