목차
6.3.4       ExampleTable_access.h" >6.3.4       ExampleTable_access.h
6.3.5       ExampleTable_checkfns.c" >6.3.5       ExampleTable_checkfns.c
6.3.6       ExampleTable_checkfns.h" >6.3.6       ExampleTable_checkfns.h
6.3.8       ExampleTable_checkfns_local.h" >6.3.8       ExampleTable_checkfns_local.h
6.3.9       ExampleTable_columns.h" >6.3.9       ExampleTable_columns.h
6.3.10   ExampleTable_enums.h" >6.3.10   ExampleTable_enums.h
데이터 베이스 MySQL 튜토리얼 用NET-SNMP软件包开发简单客户端代理(6)

用NET-SNMP软件包开发简单客户端代理(6)

Jun 07, 2016 pm 03:30 PM
연기 고객 개발하다 단순한 소프트웨어 패키지

6.3.4 ExampleTable_access.h /*ExampleTable_access.h*/ /* * Note: this file originally auto-generated by mib2c using * :mib2c.access_functions.conf,v 1.9 2004/10/14 12:57:33 dts12 Exp $ */ #ifndef EXAMPLETABLE_ACCESS_H #define EXAMPLETABLE_

6.3.4       ExampleTable_access.h

/*ExampleTable_access.h*/

/*

 * Note: this file originally auto-generated by mib2c using

 *        : mib2c.access_functions.conf,v 1.9 2004/10/14 12:57:33 dts12 Exp $

 */

#ifndef EXAMPLETABLE_ACCESS_H

#define EXAMPLETABLE_ACCESS_H

 

/** User-defined data access functions for data in table ExampleTable */

/** row level accessors */

Netsnmp_First_Data_Point  ExampleTable_get_first_data_point;

Netsnmp_Next_Data_Point   ExampleTable_get_next_data_point;

int ExampleTable_commit_row(void **my_data_context, int new_or_del);

void * ExampleTable_create_data_context(netsnmp_variable_list *index_data, int column);

 

/** column accessors */

      long *get_MachineNumber(void *data_context, size_t *ret_len);

      char *get_MachineStatus(void *data_context, size_t *ret_len);

      u_long *get_CheckTime(void *data_context, size_t *ret_len);

      long *get_MonSet(void *data_context, size_t *ret_len);

      int set_MonSet(void *data_context, long *val, size_t val_len);

 

#endif /* EXAMPLETABLE_ACCESS_H */

 

6.3.5       ExampleTable_checkfns.c

/*ExampleTable_checkfns.c*/

/*

 * Note: this file originally auto-generated by mib2c using

 *        : mib2c.check_values.conf,v 1.8 2004/01/12 00:43:45 rstory Exp $

 */

 

/********************************************************************

 *                       NOTE   NOTE   NOTE

 *   This file is auto-generated and SHOULD NOT BE EDITED by hand.

 *   Modify the ExampleTable_checkfns_local.[ch] files insead so that you

 *   can regenerate this one as mib2c improvements are made.

 ********************************************************************/

 

/* standard headers */

#include

#include

#include "ExampleTable_checkfns.h"

#include "ExampleTable_checkfns_local.h"

#include "ExampleTable_enums.h"

 

/** Decides if an incoming value for the MonSet mib node is legal.

 *  @param type    The incoming data type.

 *  @param val     The value to be checked.

 *  @param val_len The length of data stored in val (in bytes).

 *  @return 0 if the incoming value is legal, an SNMP error code otherwise.

 */

    int

    check_MonSet(int type, long *val, size_t val_len,

             long *old_val, size_t old_val_len) {

 

    int ret;

 

    /** Check to see that we were called legally */

      if (!val)

        return SNMP_ERR_GENERR;

 

    /** Check the incoming type for correctness */

      if (type != ASN_INTEGER)

        return SNMP_ERR_WRONGTYPE;

 

       ret = SNMP_ERR_NOERROR;

 

 

    /** looks ok, call the local version of the same function. */

      return check_MonSet_local(type, val, val_len, old_val, old_val_len);

    }

6.3.6       ExampleTable_checkfns.h

/*ExampleTable_checkfns.h*/

/*

 * Note: this file originally auto-generated by mib2c using

 *        : mib2c.iterate.conf,v 5.6 2003/02/20 00:52:07 hardaker Exp $

 */

 

/***********************************************************************

 *   This file is auto-generated and SHOULD NOT BE EDITED by hand.

 *   Modify the ExampleTable_checkfns_local.[ch] files insead.

 *   (so that you can regenerate this one as mib2c improvements are made)

 ***********************************************************************/

#ifndef EXAMPLETABLE_CHECKFNS_H

#define EXAMPLETABLE_CHECKFNS_H

 

/** make sure we load the functions that you can modify */

config_require(ExampleTable_checkfns_local)

 

/* these functions are designed to check incoming values for

columns in the ExampleTable table for legality with respect to

datatype and value.

 */

 

      int check_MonSet(int type, long *val, size_t val_len, long *old_val, size_t old_val_len);

 

#endif /* EXAMPLETABLE_CHECKFNS_H */

 

6.3.7       ExampleTable_checkfns_local.c

/*ExampleTable_checkfns_local.c*/

/*

 * Note: this file originally auto-generated by mib2c using

 *        : mib2c.check_values_local.conf,v 5.2 2004/05/04 23:34:56 hardaker Exp $

 */

 

/* standard headers */

#include

#include

#include "ExampleTable_checkfns.h"

#include "ExampleTable_enums.h"

 

/** Decides if an incoming value for the MonSet mib node is legal, from a local implementation specific viewpoint.

 *  @param type    The incoming data type.

 *  @param val     The value to be checked.

 *  @param val_len The length of data stored in val (in bytes).

 *  @return 0 if the incoming value is legal, an SNMP error code otherwise.

 */

    int

    check_MonSet_local(int type, long *val, size_t val_len, long *old_val, size_t old_val_len) {

 

    /** XXX: you may want to check aspects of the new value that

       were not covered by the automatic checks by the parent function. */

 

    /** XXX: you make want to check that the requested change from

        the old value to the new value is legal (ie, the transistion

        from one value to another is legal */

     

    /** if everything looks ok, return SNMP_ERR_NOERROR */

      return SNMP_ERR_NOERROR;

    }

6.3.8       ExampleTable_checkfns_local.h

/*ExampleTable_checkfns_local.h*/

/*

 * Note: this file originally auto-generated by mib2c using

 *        : : mib2c.check_values_local.conf,v 5.2 2004/05/04 23:34:56 hardaker Exp $

 *

 */

#ifndef EXAMPLETABLE_CHECKFNS_H

#define EXAMPLETABLE_CHECKFNS_H

 

/* these functions are designed to check incoming values for

columns in the ExampleTable table for legality with respect to

datatype and value according to local conventions.  You should modify

them as appropriate.  They will be called from parent check_value

functions that are auto-generated using mib2c and the parent functions

should NOT be modified.

 */

 

    int check_MonSet_local(int type, long *val, size_t val_len, long *old_val, size_t old_val_len);

 

#endif /* EXAMPLETABLE_CHECKFNS_H */

 

6.3.9       ExampleTable_columns.h

/* ExampleTable_columns.h*/

/*

 * Note: this file originally auto-generated by mib2c using

 *  : mib2c.column_defines.conf,v 5.1 2002/05/08 05:42:47 hardaker Exp $

 */

#ifndef EXAMPLETABLE_COLUMNS_H

#define EXAMPLETABLE_COLUMNS_H

 

/* column number definitions for table ExampleTable */

       #define COLUMN_MACHINENUMBER        1

       #define COLUMN_MACHINESTATUS          2

       #define COLUMN_CHECKTIME           3

       #define COLUMN_MONSET         4

#endif /* EXAMPLETABLE_COLUMNS_H */

6.3.10   ExampleTable_enums.h

/* ExampleTable_enums.h*/

/*

 * Note: this file originally auto-generated by mib2c using

 *  : mib2c.column_enums.conf,v 5.2 2003/02/22 04:09:25 hardaker Exp $

 */

#ifndef EXAMPLETABLE_ENUMS_H

#define EXAMPLETABLE_ENUMS_H

 

#endif /* EXAMPLETABLE_ENUMS_H */

6.4 自定义mib文件MyMib.txt

MyMIB DEFINITIONS::=BEGIN

       IMPORTS     

              enterprises,OBJECT-TYPE,Integer32,TimeTicks

                     FROM SNMPv2-SMI

       TEXTUAL-CONVENTION,  DisplayString FROM SNMPv2-TC;

       foxmail OBJECT IDENTIFIER::={enterprises 310}

       SecondCounter OBJECT-TYPE

              SYNTAX Integer32

              ACCESS read-write

              STATUS mandatory

                DESCRIPTION "This is a one minute counter from year 1970.1.1.0:0 to now"

              ::={foxmail 1}

 

       WeekTime OBJECT-TYPE

              SYNTAX TimeTicks

              ACCESS read-only

              STATUS mandatory

                DESCRIPTION "Recording taday's time and the day sorts in the week"

              ::={foxmail 2}

 

       ExampleTable        OBJECT-TYPE

              SYNTAX SEQUENCE OF ExampleEntry

              MAX-ACCESS  not-accessible

              STATUS current

              DESCRIPTION

            "A list of interface entries.  The number of entries is

            given by the value of ExampleNumber."

                  ::= { foxmail 3 }

 

       ExampleEntry OBJECT-TYPE

                  SYNTAX      ExampleEntry

                  MAX-ACCESS  not-accessible

                  STATUS      current

                  DESCRIPTION

            "An entry containing management information applicable to a

            particular interface."

                  INDEX   { UserIndex }

                  ::= { ExampleTable 1 }

 

       ExampleEntry ::=

                  SEQUENCE {

                             UserIndex           InterfaceIndex,

                             UserStatus           DisplayString,

                             CheckTime               TimeTicks,

                            MonSet                  Integer32

                            }     

 

  InterfaceIndex ::= TEXTUAL-CONVENTION

    DISPLAY-HINT "d"

    STATUS       current

    DESCRIPTION

            "A unique value, greater than zero, for each interface or

            interface sub-layer in the managed system.  It is

            recommended that values are assigned contiguously starting

            from 1.  The value for each interface sub-layer must remain

            constant at least from one re-initialization of the entity's

            network management system to the next re-initialization."

    SYNTAX       Integer32 (1..2147483647)

 

 

       UserIndex OBJECT-TYPE

                  SYNTAX      InterfaceIndex

              MAX-ACCESS  read-only

              STATUS      current

                  DESCRIPTION

            "A unique value, greater than zero, for each interface.  It

            is recommended that values are assigned contiguously

            starting from 1.  The value for each interface sub-layer

            must remain constant at least from one re-initialization of

            the entity's network management system to the next re-

            initialization."

                ::= { ExampleEntry 1 }

 

       UserStatus OBJECT-TYPE

                  SYNTAX      DisplayString

                  MAX-ACCESS  read-only

                  STATUS      current

                  DESCRIPTION

            "machine status ."

                  ::= { ExampleEntry 2 }

 

       CheckTime OBJECT-TYPE

                  SYNTAX      TimeTicks

                  MAX-ACCESS  read-only

                  STATUS      current

                  DESCRIPTION

            "machine status checking time."

                  ::= { ExampleEntry 3 }

 

       MonSet OBJECT-TYPE

              SYNTAX Integer32

              MAX-ACCESS read-write

              STATUS current

              DESCRIPTION

             "An example to use set function."

              ::={ ExampleEntry 4}

END

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25 : Myrise에서 모든 것을 잠금 해제하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

하드 드라이브 일련 번호를 쿼리하는 가장 쉬운 방법 하드 드라이브 일련 번호를 쿼리하는 가장 쉬운 방법 Feb 26, 2024 pm 02:24 PM

하드디스크 일련번호는 하드디스크의 중요한 식별자로 일반적으로 하드디스크를 고유하게 식별하고 하드웨어를 식별하는 데 사용됩니다. 운영 체제를 설치하거나, ​​올바른 장치 드라이버를 찾거나, 하드 드라이브를 수리할 때와 같이 하드 드라이브 일련 번호를 쿼리해야 하는 경우도 있습니다. 이 문서에서는 하드 드라이브 일련 번호를 확인하는 데 도움이 되는 몇 가지 간단한 방법을 소개합니다. 방법 1: Windows 명령 프롬프트를 사용하여 명령 프롬프트를 엽니다. Windows 시스템에서는 Win+R 키를 누르고 "cmd"를 입력한 후 Enter 키를 눌러 명령을 엽니다.

연결하는 동안 VMware Horizon 클라이언트가 정지되거나 정지됨 [수정] 연결하는 동안 VMware Horizon 클라이언트가 정지되거나 정지됨 [수정] Mar 03, 2024 am 09:37 AM

VMWareHorizon 클라이언트를 사용하여 VDI에 연결할 때 인증 중에 애플리케이션이 정지되거나 연결이 차단되는 상황이 발생할 수 있습니다. 이 문서에서는 이 문제를 살펴보고 이 상황을 해결하는 방법을 제공합니다. VMWareHorizon 클라이언트에 정지 또는 연결 문제가 발생하는 경우 문제를 해결하기 위해 수행할 수 있는 몇 가지 작업이 있습니다. 연결하는 동안 VMWareHorizon 클라이언트가 멈추거나 멈추는 문제 해결 VMWareHorizon 클라이언트가 Windows 11/10에서 멈추거나 연결에 실패하는 경우 아래 언급된 해결 방법을 수행하십시오. 네트워크 연결 확인 Horizon 클라이언트 다시 시작 Horizon 서버 상태 확인 클라이언트 캐시 지우기 Ho 수정

권장되는 AI 지원 프로그래밍 도구 4가지 권장되는 AI 지원 프로그래밍 도구 4가지 Apr 22, 2024 pm 05:34 PM

이 AI 지원 프로그래밍 도구는 급속한 AI 개발 단계에서 유용한 AI 지원 프로그래밍 도구를 많이 발굴했습니다. AI 지원 프로그래밍 도구는 개발 효율성을 높이고, 코드 품질을 향상시키며, 버그 발생률을 줄일 수 있습니다. 이는 현대 소프트웨어 개발 프로세스에서 중요한 보조자입니다. 오늘 Dayao는 4가지 AI 지원 프로그래밍 도구(모두 C# 언어 지원)를 공유하겠습니다. 이 도구가 모든 사람에게 도움이 되기를 바랍니다. https://github.com/YSGStudyHards/DotNetGuide1.GitHubCopilotGitHubCopilot은 더 빠르고 적은 노력으로 코드를 작성하는 데 도움이 되는 AI 코딩 도우미이므로 문제 해결과 협업에 더 집중할 수 있습니다. 힘내

PHP MQTT 클라이언트 개발 가이드 PHP MQTT 클라이언트 개발 가이드 Mar 27, 2024 am 09:21 AM

MQTT(MessageQueuingTelemetryTransport)는 IoT 장치 간 통신에 일반적으로 사용되는 경량 메시지 전송 프로토콜입니다. PHP는 MQTT 클라이언트를 개발하는 데 사용할 수 있는 일반적으로 사용되는 서버측 프로그래밍 언어입니다. 이 기사에서는 PHP를 사용하여 MQTT 클라이언트를 개발하는 방법을 소개하고 다음 내용을 포함합니다. MQTT 프로토콜의 기본 개념 PHPMQTT 클라이언트 라이브러리의 선택 및 사용 예: PHPMQTT 클라이언트를 사용하여 게시 및

최고의 AI 프로그래머는 누구일까요? Devin, Tongyi Lingma 및 SWE 에이전트의 잠재력을 살펴보세요. 최고의 AI 프로그래머는 누구일까요? Devin, Tongyi Lingma 및 SWE 에이전트의 잠재력을 살펴보세요. Apr 07, 2024 am 09:10 AM

세계 최초의 AI 프로그래머 데빈(Devin)이 태어난 지 한 달도 채 안 된 2022년 3월 3일, 프린스턴 대학의 NLP팀은 오픈소스 AI 프로그래머 SWE-에이전트를 개발했습니다. GPT-4 모델을 활용하여 GitHub 리포지토리의 문제를 자동으로 해결합니다. SWE-bench 테스트 세트에서 SWE-agent의 성능은 Devin과 유사하며 평균 93초가 걸리고 문제의 12.29%를 해결합니다. SWE-agent는 전용 터미널과 상호 작용하여 파일 내용을 열고 검색하고, 자동 구문 검사를 사용하고, 특정 줄을 편집하고, 테스트를 작성 및 실행할 수 있습니다. (참고: 위 내용은 원문 내용을 약간 조정한 것이지만 원문의 핵심 정보는 그대로 유지되며 지정된 단어 수 제한을 초과하지 않습니다.) SWE-A

Go 언어를 사용하여 모바일 애플리케이션을 개발하는 방법을 알아보세요. Go 언어를 사용하여 모바일 애플리케이션을 개발하는 방법을 알아보세요. Mar 28, 2024 pm 10:00 PM

Go 언어 개발 모바일 애플리케이션 튜토리얼 모바일 애플리케이션 시장이 지속적으로 성장함에 따라 점점 더 많은 개발자가 Go 언어를 사용하여 모바일 애플리케이션을 개발하는 방법을 모색하기 시작했습니다. 간단하고 효율적인 프로그래밍 언어인 Go 언어는 모바일 애플리케이션 개발에서도 강력한 잠재력을 보여주었습니다. 이 기사에서는 Go 언어를 사용하여 모바일 애플리케이션을 개발하는 방법을 자세히 소개하고 독자가 빠르게 시작하고 자신의 모바일 애플리케이션 개발을 시작할 수 있도록 특정 코드 예제를 첨부합니다. 1. 준비 시작하기 전에 개발 환경과 도구를 준비해야 합니다. 머리

가장 인기 있는 다섯 가지 Go 언어 라이브러리 요약: 개발을 위한 필수 도구 가장 인기 있는 다섯 가지 Go 언어 라이브러리 요약: 개발을 위한 필수 도구 Feb 22, 2024 pm 02:33 PM

가장 인기 있는 다섯 가지 Go 언어 라이브러리 요약: Go 언어는 탄생 이후 광범위한 관심과 적용을 받아왔습니다. 새롭게 떠오르는 효율적이고 간결한 프로그래밍 언어인 Go의 급속한 발전은 풍부한 오픈 소스 라이브러리의 지원과 불가분의 관계입니다. 이 기사에서는 인기 있는 Go 언어 라이브러리 5개를 소개합니다. 이러한 라이브러리는 Go 개발에서 중요한 역할을 하며 개발자에게 강력한 기능과 편리한 개발 경험을 제공합니다. 동시에 이러한 라이브러리의 용도와 기능을 더 잘 이해하기 위해 구체적인 코드 예제를 통해 설명하겠습니다.

Baidu Netdisk 웹페이지에서 클라이언트를 시작할 수 없는 문제를 해결하는 방법은 무엇입니까? Baidu Netdisk 웹페이지에서 클라이언트를 시작할 수 없는 문제를 해결하는 방법은 무엇입니까? Mar 13, 2024 pm 05:00 PM

많은 친구들이 파일을 다운로드할 때 먼저 웹페이지를 탐색한 다음 클라이언트로 전송하여 다운로드합니다. 그러나 때때로 사용자는 Baidu Netdisk 웹 페이지에서 클라이언트를 시작할 수 없는 문제에 직면할 수 있습니다. 이 문제에 대해 편집자는 Baidu Netdisk 웹페이지에서 클라이언트를 시작할 수 없는 문제를 해결하기 위해 솔루션을 준비했습니다. 해결 방법 1. Baidu Netdisk가 최신 버전이 아닐 수 있습니다. Baidu Netdisk 클라이언트를 수동으로 열고 오른쪽 상단에 있는 설정 버튼을 클릭한 다음 버전 업그레이드를 클릭하세요. 업데이트가 없으면 다음 메시지가 나타납니다. 업데이트가 있으면 메시지에 따라 업데이트하세요. 2. Baidu Cloud Disk의 탐지 서비스 프로그램은 비활성화될 수 있습니다. 당사가 수동으로 또는 보안 소프트웨어를 사용하여 Baidu Cloud Disk의 탐지 서비스 프로그램을 자동으로 비활성화할 수 있습니다. 그것을 확인하시기 바랍니다

See all articles