0
  "   l=J4 @p bѿ     }q (Uzone_formatsq}qUdatetime_formatsq}qUquartersq}qUperiodsq}qUscientific_formatsq	}q
Upercent_formatsq}qU	week_dataq}q(Umin_daysqKUweekend_startqKU	first_dayqK Uweekend_endqKuUtime_formatsq}qUfullqcbabel.dates
DateTimePattern
q)q}q(UpatternqX   HH.mm:ss 'h' vqUformatqX   %(HH)s.%(mm)s:%(ss)s h %(v)squbsU	languagesq}qUterritoriesq}q Udecimal_formatsq!}q"Udate_formatsq#}q$(Ufullq%h)q&}q'(hX   EEEE, d MMMM yyyyq(hX!   %(EEEE)s, %(d)s %(MMMM)s %(yyyy)sq)ubUshortq*h)q+}q,(hX   dd.MM.yyq-hX   %(dd)s.%(MM)s.%(yy)sq.ubuUcurrency_symbolsq/}q0U
time_zonesq1}q2Uscriptsq3}q4Uvariantsq5}q6Unumber_symbolsq7}q8(Udecimalq9X   .q:Ugroupq;X   'q<uUcurrency_namesq=}q>Umonthsq?}q@Ucurrency_formatsqA}qBNcbabel.numbers
NumberPattern
qC)qD}qE(Uexp_precqFNUscaleqGKU	frac_precqHKKqIUsuffixqJX    qKhKqLUint_precqMKKqNhX   ¤ #,##0.00qOUprefixqPX   ¤ qQX   ¤-qRqSUexp_plusqTNUgroupingqUKKqVubsUdaysqW}qXU
meta_zonesqY}qZUerasq[}q\u.  $   lY>eJ}@?q1hx-2 ?     /*
   +----------------------------------------------------------------------+
   | PHP Version 5                                                        |
   +----------------------------------------------------------------------+
   | Copyright (c) 1997-2016 The PHP Group                                |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | http://www.php.net/license/3_01.txt                                  |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | license@php.net so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
   | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
   |          Mike Jackson <mhjack@tscnet.com>                            |
   |          Steven Lawrance <slawrance@technologist.com>                |
   |          Harrie Hazewinkel <harrie@lisanza.net>                      |
   |          Johann Hanne <jonny@nurfuerspam.de>                         |
   |          Boris Lytockin <lytboris@gmail.com>                         |
   +----------------------------------------------------------------------+
 */

/* $Id$ */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "main/php_network.h"
#include "ext/standard/info.h"
#include "php_snmp.h"

#include "zend_exceptions.h"

#if HAVE_SPL
#include "ext/spl/spl_exceptions.h"
#endif

#if HAVE_SNMP

#include <sys/types.h>
#ifdef PHP_WIN32
#include <winsock2.h>
#include <errno.h>
#include <process.h>
#include "win32/time.h"
#elif defined(NETWARE)
#ifdef USE_WINSOCK
#include <novsock2.h>
#else
#include <sys/socket.h>
#endif
#include <errno.h>
#include <sys/timeval.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifndef _OSD_POSIX
#include <sys/errno.h>
#else
#include <errno.h>  /* BS2000/OSD uses <errno.h>, not <sys/errno.h> */
#endif
#include <netdb.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifndef __P
#ifdef __GNUC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>

/* For net-snmp prior to 5.4 */
#ifndef HAVE_SHUTDOWN_SNMP_LOGGING
extern netsnmp_log_handler *logh_head;
#define shutdown_snmp_logging() \
	{ \
		snmp_disable_log(); \
		while(NULL != logh_head) \
			netsnmp_remove_loghandler( logh_head ); \
	}
#endif

#define SNMP_VALUE_LIBRARY	(0 << 0)
#define SNMP_VALUE_PLAIN	(1 << 0)
#define SNMP_VALUE_OBJECT	(1 << 1)

typedef struct snmp_session php_snmp_session;
#define PHP_SNMP_SESSION_RES_NAME "SNMP ses