KR20010090254A - Method for simple network management protocol communication using application programming interface - Google Patents

Method for simple network management protocol communication using application programming interface Download PDF

Info

Publication number
KR20010090254A
KR20010090254A KR1020000015028A KR20000015028A KR20010090254A KR 20010090254 A KR20010090254 A KR 20010090254A KR 1020000015028 A KR1020000015028 A KR 1020000015028A KR 20000015028 A KR20000015028 A KR 20000015028A KR 20010090254 A KR20010090254 A KR 20010090254A
Authority
KR
South Korea
Prior art keywords
snmp
api
error
value
packet
Prior art date
Application number
KR1020000015028A
Other languages
Korean (ko)
Inventor
한영애
Original Assignee
윤종용
삼성전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 윤종용, 삼성전자 주식회사 filed Critical 윤종용
Priority to KR1020000015028A priority Critical patent/KR20010090254A/en
Publication of KR20010090254A publication Critical patent/KR20010090254A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

PURPOSE: A simple network management protocol(SNMP) communication method using application programming interface(API) is provided to allow program calling to be easily carried out through SNMP API which is called by a message handler and generate SNMP packet by using the SNMP tool function. CONSTITUTION: A method comprises a first step(S10) of allowing each message handler to call SNMP API which is an API function of a control command for controlling an SNMP agent; a second step(S20) of allowing the SNMP API to call the SNMP tool and generate a packet; a third step(S30) of allowing the SNMP API to transmit the generated packet to the SNMP agent through an UDP socket; and a fourth step(S40) of checking an error of the data responding to the transmission, returning names and values of all objects contained in the responding data to the message handler if no error is found in the result of checking, and returning the predefined error code indicating reason of failure to the message handler if any error is found in the result of checking.

Description

응용프로그래밍인터페이스를 이용한 단순네트워크관리프로토콜 통신 방법{METHOD FOR SIMPLE NETWORK MANAGEMENT PROTOCOL COMMUNICATION USING APPLICATION PROGRAMMING INTERFACE}METHOD FOR SIMPLE NETWORK MANAGEMENT PROTOCOL COMMUNICATION USING APPLICATION PROGRAMMING INTERFACE}

본 발명은 단순네트워크관리프로토콜(Simple Network Management Protocol: SNMP) 인터페이스에 관한 것으로서, 특히 응용프로그래밍인터페이스(Application Programming Interface: API) 함수를 사용하여 단순네트워크관리프로토콜(SNMP) 통신을 수행하는 방법에 관한 것이다.The present invention relates to a Simple Network Management Protocol (SNMP) interface, and more particularly, to a method for performing Simple Network Management Protocol (SNMP) communication using an application programming interface (API) function. .

일반적으로 알려진 바와 같이, 단순네트워크관리프로토콜(SNMP)은 TCP/IP (Transmission Control Protocol/Internet Protocol) 환경에서의 네트워크 관리 프로토콜로서, 허브처럼 지속적인 관리가 요구되는 장비(네트워크 소자)에 SNMP 대리인(Agent) 소프트웨어를 탑재하여, 원격지의 관리자(Manager)가 포트별 작동 상황을 감시할 수 있다.As is generally known, the Simple Network Management Protocol (SNMP) is a network management protocol in a Transmission Control Protocol / Internet Protocol (TCP / IP) environment. An SNMP agent is used for devices (network elements) requiring continuous management, such as hubs. By installing the software, the remote manager can monitor the operation status of each port.

SNMP는 비접속(Connection-less) 서비스로서, 제어명령 PDU(Product Data Unit)를 사용하며, PDU는 인증(authentication) 서비스를 거쳐 전송된다. 이 전송단위를 메시지라 하며, 메시지는 UDP(User Datagram Protocol)를 이용하여 전송된다.SNMP is a connection-less service, which uses a control command PDU (Product Data Unit), which is transmitted through an authentication service. This transmission unit is called a message, and the message is transmitted using UDP (User Datagram Protocol).

SNMP는 기본적으로 5가지의 제어명령(PDU)을 사용하여 네트워크를 관리하는데, 이는 GetRequest, GetNextRequest, SetRequest, GetResponse, Trap이다.SNMP basically manages the network using five control commands (PDUs): GetRequest, GetNextRequest, SetRequest, GetResponse, and Trap.

상기 GetRequest는 관리자가 대리인에 있는 특정 관리객체(Managed Object: MO)의 값을 가져오기 위한 제어명령이고, GetNextRequest는 관리자가 지정한 객체값의 다음 객체값이나 지정한 객체가 테이블인 경우 다음 인덱스값을 가져오기 위한 제어명령이다. GetResponse는 관리자의 요구에 따라 대리인이 해당 객체값을 되돌려 주기 위한 제어명령이며, SetRequest는 관리자가 대리인에게 있는 객체의 값을 변경하기 위한 제어명령이다. Trap은 대리인이 특정한 장애상황(트랩)이 발생했음을 관리자에게 알리거나, 요구에 대한 응답시간이 오래 걸릴 경우 응답을 보내기 위한 제어명령이다.The GetRequest is a control command for the manager to get the value of a specific Managed Object (MO) in the delegate, and the GetNextRequest is the next object value of the object value specified by the manager or the next index value if the object is a table. Control command to come. GetResponse is a control command for the agent to return the object value at the request of the administrator. SetRequest is a control command for the manager to change the value of the object in the agent. Trap is a control command for the agent to inform the manager that a specific fault condition has occurred or to send a response when the response time for a request is long.

1997년 Epilogue Technology Co.는 SNMP의 구현을 위하여 에필로그 툴(Epilogue Tool)을 발표하였다. 이 에필로그 툴은 SNMP 통신을 위한 다양한 함수를 제공한다. 상기와 같이 에필로그 툴을 사용하는 종래기술에 의한 SNMP 프로토콜은 SNMP 툴(에필로그)에서 제공되는 로우 레벨(Low Level)의 함수를 직접 호출하여, 관리자와 대리인 사이의 통신 인터페이스를 구현하였다.In 1997 Epilogue Technology Co. released the Epilogue Tool to implement SNMP. This epilogue tool provides various functions for SNMP communication. As described above, the conventional SNMP protocol using the epilogue tool directly calls a low-level function provided by the SNMP tool (eplog) to implement a communication interface between an administrator and an agent.

종래기술에 의한 SNMP의 동작을 나타낸 도 1 을 참조하면, SNMP 관리자(110)내의 메시지 핸들러(Message Handler)(120)(130)는 에필로그 툴(140)을 사용하여 패킷을 생성하고, UDP 소켓(Socket)을 통해 네트워크 소자(Network Element: NE)(150) 내의 SNMP 대리인(150)으로 그 패킷을 전송한 뒤 그 응답을 받는다.Referring to FIG. 1 illustrating the operation of SNMP according to the prior art, the message handler 120 and 130 in the SNMP manager 110 may generate a packet using the epilogue tool 140 and generate a UDP socket ( The packet is transmitted to the SNMP agent 150 in the network element (NE) 150 through the socket and receives the response.

상기와 같이, SNMP를 사용하여 네트워크 소자와 통신하고자 하는 종래기술에 의한 통신 프로그램(즉 메시지 핸들러)은 정보 조회(Get) 및 값 설정(Set) 등의 목적과 종류에 따라 여러 가지의 함수(GetConf, SetConf, GetV52, SetV52 등)를 조합하여 사용하였고, 이와 같은 함수를 이용하여 생성된 패킷을 UDP 소켓을 통해 네트워크 소자와 직접 주고받았다.As described above, a communication program (ie, a message handler) according to the prior art which wants to communicate with a network element using SNMP has various functions (GetConf) according to the purpose and type of information inquiry (Get) and value set (Set). , SetConf, GetV52, SetV52, etc.) were used in combination, and the packet generated using this function was directly exchanged with the network device through the UDP socket.

따라서 종래기술은 미리 정의된 내부함수를 사용하지 않았기 때문에, SNMP 인터페이스를 사용하는 통신 프로그램을 작성하는 경우에는 다수의 메시지 핸들러들이 매번 함수의 조합 및 프로그래밍을 위한 코드 생성을 반복해야 했으며, 프로그래머가 SNMP 툴의 구조를 이해하고 있어야 했다.Therefore, since the prior art does not use predefined internal functions, when writing a communication program using an SNMP interface, many message handlers have to repeat function combinations and code generation for programming each time. You had to understand the structure of the tool.

게다가 로우 레벨의 SNMP 코드를 작성하여 사용할 경우 프로그래머에 따라 함수의 작성방법이 다르므로, 다른 프로그래머가 작성한 SNMP 코드를 사용하는 경우 디버그 및 성능 측정에 많은 시간이 소요되었다는 문제점이 존재했다.In addition, when writing and using low-level SNMP code, programmers have different methods of writing functions. Therefore, when using SNMP code written by other programmers, there was a problem that it took much time to debug and measure performance.

따라서 상기한 바와 같이 동작되는 종래 기술의 문제점을 해결하기 위하여 창안된 본 발명의 목적은, 메시지 핸들러에 의하여 호출되어 SNMP 패킷을 생성하고 처리하는 SNMP API 함수를 제공하며, SNMP 인터페이스 프로그램의 코드 및 에러코드를 API로 표준화하여 코드화작업 및 디버그를 용이하게 하는, API를 이용한 SNMP 통신 방법을 제공하는 것이다.Accordingly, an object of the present invention, which was devised to solve the problems of the prior art operating as described above, provides an SNMP API function that is called by a message handler to generate and process an SNMP packet, and codes and errors of an SNMP interface program. It is to provide SNMP communication method using API that standardizes code to API and facilitates coding and debugging.

상기한 바와 같은 목적을 달성하기 위하여 창안된 본 발명에 따른 API를 이용한 SNMP 통신 방법의 실시예는, 단순네트워크관리프로토콜(SNMP) 관리자내의 다수개의 메시지 핸들러가 에필로그 툴을 사용하여 네트워크 소자의 SNMP 대리인을 관리하기 위한 방법에 있어서,An embodiment of the SNMP communication method using the API according to the present invention, which was created to achieve the object as described above, is characterized in that a plurality of message handlers in a simple network management protocol (SNMP) manager use an epilogue tool to generate an SNMP agent of a network element. In the method for managing,

상기 각 메시지 핸들러가, 상기 SNMP 대리인을 관리하기 위한 제어명령(PDU)의 응용프로그래밍인터페이스(API) 함수인 SNMP API를 호출하는 제 1 단계;A first step in which each message handler calls an SNMP API, which is an application programming interface (API) function of a control command (PDU) for managing the SNMP agent;

상기 호출된 SNMP API가 상기 에필로그 툴을 사용하여 SNMP 대리인을 관리하기 위한 제어명령을 수행하고, 그 결과를 상기 메시지 핸들러로 리턴시키는 제 2 단계를 포함하여 이루어진다.The invoked SNMP API includes a second step of performing a control command for managing an SNMP agent using the epilogue tool and returning the result to the message handler.

도 1 은 종래기술에 의한 SNMP 통신을 나타낸 소프트웨어 블럭도.1 is a software block diagram illustrating SNMP communication in the prior art.

도 2 는 본 발명에 의한 SNMP API 통신을 나타낸 소프트웨어 블럭도.2 is a software block diagram illustrating SNMP API communication in accordance with the present invention.

도 3 은 본 발명에 의한 SNMP API 통신을 나타낸 흐름도.3 is a flow diagram illustrating SNMP API communication in accordance with the present invention.

이하 첨부된 도면을 참조하여 본 발명에 의한 SNMP 통신의 동작 원리를 상세히 설명한다.Hereinafter, the operation principle of SNMP communication according to the present invention will be described in detail with reference to the accompanying drawings.

도 2 는 본 발명에 의한 SNMP 통신의 동작을 나타낸 소프트웨어 블럭도이며, 도 3 은 본 발명에 의한 SNMP 통신의 동작을 나타낸 흐름도이다.2 is a software block diagram illustrating the operation of SNMP communication according to the present invention, and FIG. 3 is a flowchart illustrating the operation of SNMP communication according to the present invention.

상기 도 2 및 도 3 에 따르면 본 발명은, 메시지 핸들러가 직접 에필로그 툴을 사용하는 대신에, SNMP 관리자(210)의 메시지 핸들러(Message Handler) (220)(230)들에 의하여 호출되어, 에필로그 툴(250)을 사용하여 SNMP 패킷을 생성하는 SNMP API(240)를 제공하는 것을 특징으로 한다. 즉, 각 메시지 핸들러(220)(230)는 SNMP API(240)를 호출함으로써 네트워크 소자(NE)(260)의 SNMP 대리인(260)과 통신을 수행한다.2 and 3 according to the present invention, the message handler is called by the message handlers 220 and 230 of the SNMP manager 210, instead of directly using the epilog tool. Characterized by providing an SNMP API 240 for generating an SNMP packet using (250). That is, each message handler 220, 230 communicates with the SNMP agent 260 of the network element (NE) 260 by calling the SNMP API 240.

상기의 API는 OS(Operating System) 서비스나 프로토콜에 쉽게 액세스할 수 있도록 해주는 추상적 개념으로서, 내부적으로 사용되는 각종 함수를 모아놓은 일종의 라이브러리이다. 응용(Application) 프로그램은 일반적으로 데이터 통신, 데이터 복구, 시스템 자원 액세스와 같은 OS의 로우 레벨(Low Level) 서비스를 요청하기 위해서 API를 사용한다. 따라서 본 발명은 네트워크 관리를 위한 제어명령의 API 함수를 SNMP API(240)로서 제공한다.The above API is an abstract concept that provides easy access to an OS (Operating System) service or protocol, and is a kind of library that collects various functions used internally. Application programs typically use APIs to request low-level services of the operating system, such as data communications, data recovery, and system resource access. Accordingly, the present invention provides the API function of the control command for network management as the SNMP API (240).

도 3 의 단계(s10)에서 SNMP 관리자(210)내의 메시지 핸들러(220)(230)가 SNMP API(240)를 호출하면, 단계(s20)에서 SNMP API(240)는 에필로그 툴(250)을 호출하여 패킷을 생성한다. 단계(s30)에서 SNMP API(240)는 UDP 소켓을 통해 SNMP 대리인(260)으로 상기 생성된 패킷을 전송하고, 단계(s40)에서 그 응답을 받아 처리 결과를 메시지 핸들러(220)(230)로 리턴시킨다.When the message handler 220 and 230 in the SNMP manager 210 calls the SNMP API 240 in step S10 of FIG. 3, the SNMP API 240 calls the epilog tool 250 in step S20. To generate the packet. In step s30, the SNMP API 240 transmits the generated packet to the SNMP agent 260 through the UDP socket, and receives the response in step s40 to return the processing result to the message handler 220 or 230. Return.

메시지 핸들러(220)(230)가 SNMP API(240)를 사용하여 네트워크 소자(NE)와 통신할 수 있도록 하기 위하여, 본 발명에 의한 SNMP API(240)는 다섯 가지 종류의 제어명령, 즉 GetRequest, GetNextRequest, SetRequest, SendTrapRequest,TrapAnalyzer API 함수를 제공한다.In order to enable the message handlers 220 and 230 to communicate with the network element NE using the SNMP API 240, the SNMP API 240 according to the present invention uses five kinds of control commands, namely, GetRequest, Provides GetNextRequest, SetRequest, SendTrapRequest, and TrapAnalyzer API functions.

상기 GetRequest는 관리자가 특정 객체의 값(Object Value)을 읽어올 수 있고, GetNextRequest는 관리자가 지정한 객체값의 다음 객체값이나 지정한 객체가 테이블인 경우 다음 인덱스값을 가져올 수 있다. SetRequest는 관리자가 대리인에게 있는 객체값을 변경할 수 있게 한다. SendTrapRequest은 특정 상황정보인 트랩을 발생시킬 수 있고, TrapAnalyzer는 SNMP 대리인으로부터 가져온 트랩을 분석할 수 있다. 여기서 TrapAnalyzer 함수는 생성된 패킷을 UDP 소켓을 통해 대리인으로 전송하지 않고 직접 분석한다.The GetRequest may read an object value of a specific object by an administrator, and the GetNextRequest may obtain a next object value of an object value specified by the manager or a next index value when the specified object is a table. SetRequest allows an administrator to change the value of an object in a delegate. SendTrapRequest can generate traps, specific contextual information, and TrapAnalyzer can analyze traps from SNMP agents. Here, the TrapAnalyzer function analyzes the generated packet directly without sending it to the agent via UDP socket.

예를 들어, 메시지 핸들러(220)(230)는 GetRequest 함수를 호출함으로써 제어명령(PDU)의 종류가 Get임을, 또는 SetRequest 함수를 호출함으로써 제어명령의 종류가 Set임을 API 함수(240)에게 알린다.For example, the message handler 220 or 230 notifies the API function 240 that the kind of control command PDU is Get by calling the GetRequest function or that the kind of control command is Set by calling the SetRequest function.

이하 SNMP API 함수(240)의 종류별 동작에 대하여 상세히 설명할 것이지만, 본 발명의 주된 특징은, 메시지 핸들러와 대리인의 사이에서 에필로그 툴의 함수를 사용하여 SNMP 패킷을 처리하는 SNMP API를 제공함으로써, 메시지 핸들러에서 사용자에 의하여 처리되어야 했던 동작들을 API 함수 내부에서 자동으로 처리할 수 있도록 한다는 점으로 이해되어야 한다. 따라서 이후에 언급되는 각 API 함수들의 동작에 대한 설명은 단지 본 발명의 이해를 돕기 위한 것으로서, 다른 응용이 가능하다.Although the operation by type of the SNMP API function 240 will be described in detail below, the main feature of the present invention is to provide an SNMP API for processing SNMP packets using a function of the epilogue tool between a message handler and an agent, thereby providing a message. It should be understood that handlers can automatically handle actions that had to be handled by the user inside an API function. Therefore, the description of the operation of each API function to be described later is merely to help the understanding of the present invention, other applications are possible.

1. GetRequest1. GetRequest

본 발명에 의한 GetRequest 명령의 입력 포맷은 다음과 같다.The input format of the GetRequest command according to the present invention is as follows.

GetRequest(char* ip_addr, char* community, int str_count, VALUE_LIST* in_value_list, VALUE_LIST* out_value_list, char* err_msg)GetRequest (char * ip_addr, char * community, int str_count, VALUE_LIST * in_value_list, VALUE_LIST * out_value_list, char * err_msg)

여기서 상기 변수(argument) ip_addr은 대리인의 IP 주소가 저장된 위치를 나타내는 문자열 포인터(string pointer)이다. 상기 community는 대리인과 통신하기 위한 공유 문자열(community string)이 저장된 위치를 나타내는 포인터(community string pointer)로서, 최소한의 인증을 위한 암호기능을 수행한다. 상기 str_count는 그 값을 Get하고자 하는 관리객체(Manager Object: MO)의 개수이다. 상기 in_value_list는 그 값을 Get하고자 하는 객체(MO) 값의 리스트가 저장된 위치를 나타내는 VALUE_LIST 포인터이다. 상기 out_value_list는 GetResponse로 응답된 객체 값들의 리스트가 저장된 위치를 나타내는 VALUE_LIST 포인터이다. 상기 err_msg는 에러의 발생시 리턴된 에러메시지가 저장된 위치를 나타내는 문자열 포인터이다.Here, the argument ip_addr is a string pointer indicating a location where the agent's IP address is stored. The community is a community string pointer indicating a location where a community string for communicating with an agent is stored, and performs a cryptographic function for minimal authentication. The str_count is the number of Manager Objects (MOs) for which the value is to be obtained. The in_value_list is a VALUE_LIST pointer indicating a location where a list of object (MO) values for which the value is to be obtained is stored. The out_value_list is a VALUE_LIST pointer indicating a location where a list of object values answered with GetResponse is stored. The err_msg is a string pointer indicating a location where an error message returned when an error occurs.

메시지 핸들러는 사용자로부터 입력된 상기와 같은 변수들은 API 함수를 호출할 수 있는 형태로 가공한 후, GetRequest API 함수로 입력된다.The message handler processes such variables input from the user into a form that can call an API function, and then enters the GetRequest API function.

상기 GetRequest에 의하여 관리객체로부터 가져온 객체의 값은 미리 생성되어 있는 VALUE_LIST 구조(structure)에 저장되는데, VALUE_LIST 구조의 일 예를 나타내면 하기의 표 1 과 같다.The value of an object obtained from the management object by the GetRequest is stored in a previously created VALUE_LIST structure, and an example of the VALUE_LIST structure is shown in Table 1 below.

<표 1>TABLE 1

typedef struct _VALUE_LIST {typedef struct _VALUE_LIST {

char name[256];char name [256];

OCTET_T value_type;OCTET_T value_type;

union {union {

INT_32_T v_number;INT_32_T v_number;

UNIT_32_T v_counter;UNIT_32_T v_counter;

EBUFFER_T v_string;EBUFFER_T v_string;

OBJ_ID_T v_object;OBJ_ID_T v_object;

unsigned char v_network_address[4];unsigned char v_network_address [4];

UNIT_64_T v_counter64;UNIT_64_T v_counter64;

} value_u;} value_u;

} VALUE_LIST;} VALUE_LIST;

이하, 상기와 같이 구성되는 GetRequest 명령의 동작에 대하여 설명한다.Hereinafter, the operation of the GetRequest command configured as described above will be described.

도 2 에 나타낸 메시지 핸들러(220)(230)에 의하여 GetRequest API 제어명령이 호출되면, GetRequest API 함수는 VALUE_LIST 구조의 배열(array)에 그 값을 Get하고자 하는 객체의 이름(MO name)을 입력받는다. 객체 이름은 VALUE_LIST 구조의 이름 문자열(name string)에 테이블의 인덱스 값이 포함된 객체 ID(Object ID: OID) 문자열(예를 들어 1.3.6.1.4.1.236.36.3.4.1.4.1.2) 또는 인덱스 값이 포함된 객체 이름 문자열(예를 들어 slotCardAdminStatus.1.2)의 형식으로 입력받는다.When the GetRequest API control command is called by the message handlers 220 and 230 shown in FIG. 2, the GetRequest API function receives an MO name of an object to get its value into an array of the VALUE_LIST structure. . The object name is an object ID (OID) string (for example, 1.3.6.1.4.1.236.36.3.4.1.4.1.2) or an index value whose name string in the VALUE_LIST structure contains the index value of the table. It is entered in the form of the included object name string (for example, slotCardAdminStatus.1.2).

GetRequest 함수는 숫자 또는 객체 이름 형식으로 입력된 문자열을 객체ID(OID) 형태로 변환한다. GetRequest 함수는 str_count만큼 입력된 관리객체들의 객체 ID를 바인드한 후 SNMP 엔코드하여, 입력된 IP 주소로 UDP 소켓을 통해 전송한다. 전송시에는 상기 입력된 community를 사용하여 인증절차를 수행한다. 이후 GetRequest 함수는, UDP 소켓을 통해 상기 GetRequest에 대한 응답, 즉 GetResponse 데이터를 수신하여 SNMP 디코드한 후 에러 상태를 체크한다.The GetRequest function converts a string entered in the form of a number or object name into an object ID (OID). The GetRequest function binds the object IDs of the management objects input by str_count and SNMP encodes them, and sends them through the UDP socket to the input IP address. In transmission, authentication process is performed using the input community. After that, the GetRequest function receives the response to the GetRequest, that is, the GetResponse data through the UDP socket, decodes the SNMP, and checks an error state.

체크결과 에러가 없는 경우, GetResponse에 바인드된 VALUE_LIST를 분석하여 객체 ID와 객체의 값(Value)으로 나눈 다음, 나뉘어진 객체 ID는 인덱스가 포함된 객체 이름 문자열로 변환한다. 변환된 모든 객체 이름과 상기 객체의 값은 VALUE_LIST 구조에 out_value_list로서 저장되어 메시지 핸들러로 리턴된다.If there is no error as a result of the check, the VALUE_LIST bound to GetResponse is analyzed and divided into the object ID and the object value, and the divided object ID is converted into the object name string including the index. All converted object names and their values are stored in the VALUE_LIST structure as out_value_list and returned to the message handler.

체크결과 에러가 있는 경우, err_msg에 SNMP 패킷의 실패 사유(에러코드)를 출력하고, err_msg를 메시지 핸들러로 리턴시킨다.If the check results in an error, the reason for the failure (error code) of the SNMP packet is output in err_msg, and err_msg is returned to the message handler.

2. GetNextRequest2. GetNextRequest

본 발명에 의한 GetNextRequest 명령의 입력 포맷은 다음과 같다.The input format of the GetNextRequest command according to the present invention is as follows.

GetNextRequest(char* ip_addr, char* community, int str_count, VALUE_LIST* in_value_list, VALUE_LIST* out_value_list, char* err_msg)GetNextRequest (char * ip_addr, char * community, int str_count, VALUE_LIST * in_value_list, VALUE_LIST * out_value_list, char * err_msg)

상기 변수들의 의미 및 VALUE_LIST의 구조는 GetRequest의 경우와 같다.The meanings of the variables and the structure of VALUE_LIST are the same as in the case of GetRequest.

이하, 상기와 같이 구성되는 GetNextRequest 명령의 동작에 대하여 설명한다.Hereinafter, the operation of the GetNextRequest command configured as described above will be described.

도 2 에 나타낸 메시지 핸들러(220)(230)에 의하여 GetNextRequest API 제어명령이 호출되면, GetNextRequest API 함수는 VALUE_LIST 구조의 배열에 GetNext하고자 하는 객체(MO)의 이름을 입력받는다. 객체 이름은, VALUE_LIST 구조의 이름 문자열에 객체 ID 문자열(예를 들어 1.3.6.1.4.1.236.36.3.4.1.4.1) 또는 객체 이름 문자열(예를 들어 slotCardAdminStatus.1)의 형식으로 입력받는다.When the GetNextRequest API control command is called by the message handlers 220 and 230 shown in FIG. 2, the GetNextRequest API function receives the name of the object MO to be GetNext in an array of the VALUE_LIST structure. The object name is entered in the name string of the VALUE_LIST structure in the form of an object ID string (eg 1.3.6.1.4.1.236.36.3.4.1.4.1) or an object name string (eg slotCardAdminStatus.1).

GetNextRequest 함수는 숫자 또는 객체 이름 형식으로 입력된 문자열을 객체 ID 형태로 변환한다. GetNextRequest 함수는 str_count만큼 입력된 객체들의 객체 ID를 바인드한 후 SNMP 엔코드하여, 입력된 IP 주소로 UDP 소켓을 통해 전송한다. 이후 GetNextRequest 함수는, UDP 소켓을 통해 상기 GetNextRequest에 대한 응답, 즉 GetResponse 데이터를 수신하여 SNMP 디코드한 후 에러 상태를 체크한다.The GetNextRequest function converts a string entered in the form of a number or object name into an object ID. The GetNextRequest function binds the object IDs of the objects input by str_count and then encodes them in SNMP and sends them through the UDP socket to the input IP address. Thereafter, the GetNextRequest function receives the response to the GetNextRequest, that is, the GetResponse data through the UDP socket, decodes the SNMP, and checks an error state.

체크결과 에러가 없는 경우, GetResponse에 바인드된 VALUE_LIST를 분석하여 객체 ID와 객체 값으로 나눈 다음, 나뉘어진 객체 ID는 인덱스가 포함된 객체 이름 문자열로 변환한다. 변환된 모든 객체 이름과 객체 값은 VALUE_LIST 구조에 out_value_list로서 저장되어 메시지 핸들러로 리턴된다.If there is no error as a result of the check, the VALUE_LIST bound to GetResponse is analyzed and divided into an object ID and an object value, and the divided object ID is converted into an object name string including an index. All converted object names and object values are stored in the VALUE_LIST structure as out_value_list and returned to the message handler.

체크결과 에러가 있는 경우, err_msg에 SNMP 패킷의 실패 사유(에러코드)를 출력하고, err_msg를 메시지 핸들러로 리턴시킨다.If the check results in an error, the reason for the failure (error code) of the SNMP packet is output in err_msg, and err_msg is returned to the message handler.

3. SetRequest3. SetRequest

본 발명에 의한 SetRequest 명령의 입력 포맷은 다음과 같다.The input format of the SetRequest command according to the present invention is as follows.

SetRequest(char* ip_addr, char* community, int str_count, VALUE_LIST* in_value_list, VALUE_LIST* out_value_list, char* err_msg)SetRequest (char * ip_addr, char * community, int str_count, VALUE_LIST * in_value_list, VALUE_LIST * out_value_list, char * err_msg)

상기 변수들의 의미 및 VALUE_LIST의 구조는 GetRequest의 경우와 같다.The meanings of the variables and the structure of VALUE_LIST are the same as in the case of GetRequest.

이하, 상기와 같이 구성되는 SetRequest 명령의 동작에 대하여 설명한다.Hereinafter, the operation of the SetRequest command configured as described above will be described.

도 2 에 나타낸 메시지 핸들러(220)(230)에 의하여 SetRequest API 제어명령이 호출되면, SetRequest API 함수는 VALUE_LIST 구조의 배열에 Set하고자 하는 객체(MO) 이름과 객체 값의 종류 및 객체 값을 입력받는다. 객체 이름은 VALUE_LIST 구조의 이름 문자열에 인덱스 값이 포함된 객체 ID 문자열(1.3.6.1.4.1.236.36.3.4.1.8.1.3) 또는 인덱스 값이 포함된 객체 이름 문자열(예를 들어 slotCardReset.3.1)의 형식으로 입력받는다.When the SetRequest API control command is called by the message handlers 220 and 230 shown in FIG. 2, the SetRequest API function receives an object (MO) name, an object value type, and an object value to be set in an array of a VALUE_LIST structure. . The object name can be either the object ID string (1.3.6.1.4.1.236.36.3.4.1.8.1.3) containing the index value in the name string of the VALUE_LIST structure or the object name string (for example, slotCardReset.3.1) containing the index value. It is input in the form.

상기 객체 값의 종류는 VALUE_LIST 구조의 객체 종류에 정의된 정수(Integer) 값으로 저장되는데, 이때 객체 종류의 일 예로는, VT_NUMBER, VT-STRING, VT-BITS, VT_OBJECT, VT_EMPTY, VT_IPADDRESS, VT_COUNTER, VT_GAUGE, VT_TIMETICKS, VT_OPAQUE, VT_COUNTER64가 있다.The type of the object value is stored as an integer value defined in the object type of the VALUE_LIST structure, wherein an example of the object type is VT_NUMBER, VT-STRING, VT-BITS, VT_OBJECT, VT_EMPTY, VT_IPADDRESS, VT_COUNTER, VT_GAUGE , VT_TIMETICKS, VT_OPAQUE, and VT_COUNTER64.

또한 상기 객체 값은 객체 종류에 따라 VALUE_LIST 구조의 value_u 유니온(union)에 저장된다.In addition, the object value is stored in the value_u union of the VALUE_LIST structure according to the object type.

SetRequest 함수는 상기 숫자 또는 객체 이름 형식으로 입력된 문자열을 객체 ID 형태로 변환한다. SetRequest 함수는 str_count만큼 입력된 객체들의 객체 ID와 객체 값을 객체 값 종류에 따라 각각 바인드한 후 SNMP 엔코드하여, 입력된 IP 주소로 UDP 소켓을 통해 전송한다. 이후 SetRequest 함수는, UDP 소켓을 통해 상기 SetRequest에 대한 응답, 즉 GetResponse 데이터를 수신하여 SNMP 디코드한 후 에러 상태를 체크한다.The SetRequest function converts a string input in the number or object name format into an object ID format. The SetRequest function binds the object ID and the object value of the objects input by str_count according to the object value type and then SNMP encodes them and sends them through the UDP socket to the input IP address. Thereafter, the SetRequest function receives an answer to the SetRequest, that is, GetResponse data through the UDP socket, decodes the SNMP, and checks an error state.

체크결과 에러가 없는 경우, GetResponse에 바인드된 VALUE_LIST를 분석하여 객체 ID와 객체 값으로 나눈 다음, 나뉘어진 객체 ID는 인덱스가 포함된 객체 이름 문자열로 변환한다. 변환된 모든 객체 이름과 객체 값은 VALUE_LIST 구조에 out_value_list로서 저장되어 메시지 핸들러로 리턴된다.If there is no error as a result of the check, the VALUE_LIST bound to GetResponse is analyzed and divided into an object ID and an object value, and the divided object ID is converted into an object name string including an index. All converted object names and object values are stored in the VALUE_LIST structure as out_value_list and returned to the message handler.

체크결과 에러가 있는 경우, err_msg에 SNMP 패킷의 실패 사유(에러코드)를 출력하고, err_msg를 메시지 핸들러로 리턴시킨다.If the check results in an error, the reason for the failure (error code) of the SNMP packet is output in err_msg, and err_msg is returned to the message handler.

4. SendTrapRequest4. SendTrapRequest

본 발명에 의한 SendTrapRequest 명령의 입력 포맷은 다음과 같다.The input format of the SendTrapRequest command according to the present invention is as follows.

SendTrapRequest(char* ip_addr, char* community, char* enterprise, int trap_type, int str_count, VALUE_LIST* trap_list, char* err_msg)SendTrapRequest (char * ip_addr, char * community, char * enterprise, int trap_type, int str_count, VALUE_LIST * trap_list, char * err_msg)

상기 변수들의 의미 및 VALUE_LIST의 구조는 GetRequest의 경우와 같으며, 상기 enterprise는 SNMP 버전 1이 사용되는 경우 주체인 관리객체 이름(Enterprise MO name)을 나타내는 문자열 포인터이고, 상기 trap_type는 SNMP 버전 1이 사용되는 경우 특정 트랩의 종류(Specific trap type)를 나타내고, str_count는 트랩 생성시 바인드(bind)할 관리객체의 개수이고, trap_list는 바인드할 관리객체의 리스트를 나타내는 VALUE_LIST 포인터이다.The meanings of the variables and the structure of VALUE_LIST are the same as in the case of GetRequest. The enterprise is a string pointer indicating a management object name (Enterprise MO name) that is a subject when SNMP version 1 is used, and the trap_type is used by SNMP version 1 If it is specified, it indicates a specific trap type, str_count is the number of managed objects to bind when the trap is created, and trap_list is a VALUE_LIST pointer indicating a list of managed objects to be bound.

메시지 핸들러는 자신의 상태와 관련하여 다른 장비나 모듈에게 트랩을 발생시키기 위하여 SendTrapRequest API 함수를 호출한다.The message handler calls the SendTrapRequest API function to generate a trap to another device or module with respect to its state.

이하, 상기와 같이 구성되는 SendTrapRequest 명령의 동작에 대하여 설명한다.Hereinafter, the operation of the SendTrapRequest command configured as described above will be described.

도 2 에 나타낸 메시지 핸들러(220)(230)에 의하여 SendTrapRequest API 제어명령이 호출되면, SendTrapRequest API 함수는 SNMP의 버전에 따라 트랩 또는 트랩2를 생성한다. 트랩과 트랩2는 그 포맷이 서로 다르므로, 같은 버전을 사용하는 관리자와 대리인 사이에서만 인식될 수 있다. SendTrapRequest 함수는, enterprise 문자열이 입력되었으면 버전 1에 따른 트랩을 생성하고, 입력되지 않았으면 버전 2에 따른 트랩2를 생성한다. 상기 enterprise 문자열은 SNMP 버전1에서 트랩을 발생시키는 주체(enterprise)를 알리기 위한 값으로서, 보통 각 회사 또는 장비에서 사용하는 특정한 관리객체를 의미한다.When the SendTrapRequest API control command is called by the message handlers 220 and 230 shown in Fig. 2, the SendTrapRequest API function generates a trap or trap 2 according to the version of SNMP. Because traps and traps2 have different formats, they can only be recognized by managers and agents using the same version. The SendTrapRequest function generates a trap according to version 1 if the enterprise string is entered and a trap 2 according to version 2 if not entered. The enterprise string is a value for notifying an entity generating a trap in SNMP version 1, and usually means a specific management object used by each company or equipment.

버전 1의 경우, SendTrapRequest 함수는 입력된 주체 관리객체의 값을 객체 ID 형태로 변환한 다음, 입력된 트랩의 종류를 사용하여 SNMP 트랩 패킷을 생성한다. SendTrapRequest 함수는 입력된 str_count만큼의 객체와 객체 값 리스트를 각각 객체 ID와 객체 값으로 변환하여, 상기 생성된 SNMP 트랩 패킷에 바인드한다.In version 1, the SendTrapRequest function converts the value of the entered subject management object into the object ID form, and then generates an SNMP trap packet using the type of trap entered. The SendTrapRequest function converts the input str_count objects and object value lists into object IDs and object values, respectively, and binds them to the generated SNMP trap packets.

버전 2의 경우, SendTrapRequest 함수는 Standard sysUpTime과 snmpTrapOID를 사용하여 SNMP 트랩2 패킷을 생성한다. 상기 Standard sysUpTime은 표준 RFC1213에 정의된 관리객체로서 시스템이 시동(up)된 때로부터 현재까지의 시간을 의미하며 그 객체 ID 값은 1.3.6.1.2.1.3.0이고, 상기 snmpTrapOID는 표준 RFC1907에 정의된 관리객체로서 SNMP 버전2에서 트랩을 보낼 때 사용하는 인증 객체 ID로서 그 값은 1.3.6.1.6.3.1.1.4.1.0이다.In version 2, the SendTrapRequest function generates an SNMP Trap2 packet using the standard sysUpTime and snmpTrapOID. The Standard sysUpTime is a management object defined in the standard RFC1213, and means a time from when the system is started up to the present. The object ID value is 1.3.6.1.2.1.3.0, and the snmpTrapOID is defined in the standard RFC1907. Authentication object ID used when sending traps in SNMP version 2 as a management object. The value is 1.3.6.1.6.3.1.1.4.1.0.

SendTrapRequest 함수는 입력된 str_count만큼의 객체와 객체 값 리스트를객체 ID와 객체 값으로 변환하여, 상기 생성된 SNMP 트랩2 패킷에 바인드한다.The SendTrapRequest function converts the input str_count object and the object value list into the object ID and the object value, and binds the generated SNMP trap 2 packet.

상기 생성된 SNMP 트랩 패킷 또는 SNMP 트랩2 패킷은, SendTrapRequest 함수에 의하여 SNMP 엔코드되어, 입력된 IP 주소로 UDP 소켓을 통해 전송된다. SendTrapRequest 함수가 생성한 SNMP 트랩 패킷 또는 SNMP 트랩2 패킷은 관리자의 상위에 있는 다른 응용 프로그램이나 사용자 인터페이스로 전송된다.The generated SNMP trap packet or SNMP trap 2 packet is SNMP encoded by the SendTrapRequest function and transmitted through a UDP socket to an input IP address. SNMP trap packets or SNMP trap2 packets generated by the SendTrapRequest function are sent to other applications or user interfaces above the manager.

상기 트랩 또는 트랩2 패킷을 전송하는 도중에 에러가 발생된 경우, SendTrapRequest는 err_msg에 실패 사유(에러코드)를 출력하고 err_msg를 메시지 핸들러로 리턴시킨다.If an error occurs during the transmission of the trap or trap 2 packet, SendTrapRequest outputs a reason (error code) to err_msg and returns err_msg to the message handler.

상기와 같이 동작하는 SendTrapRequest 함수는 필요시 대리인이 관리자에게 트랩을 전송하기 위해서 사용될 수도 있다.The SendTrapRequest function, which works as described above, can be used to send a trap to a manager if necessary.

5. TrapAnalyzer5. TrapAnalyzer

본 발명에 의한 TrapAnalyzer 명령의 입력 포맷은 다음과 같다.The input format of the TrapAnalyzer command according to the present invention is as follows.

TrapAnalyzer(unsigned char* rcvbuff, int bufcnt, SNMPADDR_T* psrc, SNMPADDR_T* pdst, int* version, TRAP_HEAD* trap_head, int vb_count, VALUE_LIST* trap_list, char* err_msg)TrapAnalyzer (unsigned char * rcvbuff, int bufcnt, SNMPADDR_T * psrc, SNMPADDR_T * pdst, int * version, TRAP_HEAD * trap_head, int vb_count, VALUE_LIST * trap_list, char * err_msg)

상기 rcvbuff는 UDP 소켓을 통해 트랩 데이터가 수신된 버퍼의 포인터이고, 상기 bufcnt는 상기 rcvbuff의 데이터 길이이고, 상기 psrc는 상기 UDP 데이터를 보낸 소스(Source), 즉 대리인의 소켓 어드레스(sockaddr) 구조 포인터이고, 상기 pdst는 상기 UDP 데이터를 수신한 목적지(Destination), 즉 관리자의 소켓 어드레스 구조 포인터이고, 상기 version은 수신된 SNMP 패킷의 버전이고, 상기 trap_head는 수신된 SNMP 트랩 또는 트랩2의 헤더 구조 포인터이고, 상기 vb_count는 수신된 SNMP 트랩 또는 트랩2의 바인드된 객체의 개수이고, 상기 trap_list는 수신된 SNMP 트랩 또는 트랩2의 객체 리스트를 나타내는 VALUE_LIST 포인터이다.The rcvbuff is a pointer of a buffer in which trap data is received through a UDP socket, the bufcnt is a data length of the rcvbuff, and the psrc is a socket address (sockaddr) structure pointer of a source, ie, an agent, that sent the UDP data. Where pdst is a destination that received the UDP data, that is, a socket address structure pointer of an administrator, version is a version of a received SNMP packet, and trap_head is a header structure pointer of a received SNMP trap or trap 2. Vb_count is the number of bound objects of the received SNMP trap or trap 2, and the trap_list is a VALUE_LIST pointer indicating the object list of the received SNMP trap or trap 2.

상기 TrapAnalyzer에 의하여 분석된 결과는 미리 생성되어 있는 TRAP_HEAD 구조에 저장되는데, TRAP_HEAD 구조의 일 예를 나타내면 하기의 표 2 와 같다.The result analyzed by the TrapAnalyzer is stored in a previously generated TRAP_HEAD structure, which is shown in Table 2 below.

<표 2>TABLE 2

typedef struct TRAP_HEAD {typedef struct TRAP_HEAD {

OBJ_ID_T enterprise_obj;OBJ_ID_T enterprise_obj;

unsigned char agent_addr[4];unsigned char agent_addr [4];

INT_32_T generic_trap;INT_32_T generic_trap;

INT_32_T specific_trap;INT_32_T specific_trap;

UNIT_32_T trap_timeticks;UNIT_32_T trap_timeticks;

} TRAP_HEAD;} TRAP_HEAD;

또한 상기 VALUE_LIST의 구조는 GetRequest의 경우(표 1)와 같다.In addition, the structure of the VALUE_LIST is as in the case of GetRequest (Table 1).

이하, 상기와 같이 구성되는 TrapAnalyzer 명령의 동작에 대하여 설명한다.The operation of the TrapAnalyzer command configured as described above will be described below.

TrapAnalyzer 함수는 버퍼에 저장된 데이터의 종류를 확인한다. 이때 버퍼에 저장된 데이터는 SNMP 데이터 전송을 위한 최종형태의 데이터이므로, TrapAnalyzer 함수가 판독하기 어렵다. 따라서 TrapAnalyzer 함수는, UDP 소켓을 통해 데이터가 입력된 버퍼의 주소와 데이터 길이, 소스 주소 및 목적지 주소에 따라 상기 버퍼의데이터를 SNMP 디코드하여 API 함수가 판독할 수 있는 형태의 SNMP 패킷을 생성한 다음, 그 제어명령의 종류(PDU Type)가 트랩인지를 확인한다.The TrapAnalyzer function checks the type of data stored in the buffer. At this time, since the data stored in the buffer is the final data for SNMP data transmission, the TrapAnalyzer function is difficult to read. Therefore, the TrapAnalyzer function generates SNMP packets that can be read by the API function by SNMP decoding the data of the buffer according to the address, data length, source address, and destination address of the buffer into which data is input through the UDP socket. Check whether the PDU Type of the control command is a trap.

생성된 SNMP 패킷이 트랩인 경우, TrapAnalyzer 함수는 주체 객체 ID와 대리인 주소 및 일반 트랩 종류(Generic trap type), 특정 트랩 종류(Specific trap type) 및 트랩 타임틱스(Trap timeticks)를 구하여 TRAP_HEAD 구조에 저장한다.If the generated SNMP packet is a trap, the TrapAnalyzer function obtains the subject object ID and delegate address, generic trap type, specific trap type, and trap timeticks and stores them in the TRAP_HEAD structure. do.

여기서 상기 일반 트랩 종류로는 coldStart(0), warmStart(1), linkDown(2), linkUp(3), authenticationFailure(4), egpNeighborLoss(5), enterprise Specific(6)이 있을 수 있다. 상기 특정 트랩 종류는 일반 트랩 종류의 값이 enterpriseSpecific(6)인 경우에만 의미가 있는 것으로, acctLogFileFull(1), faultLogFileFull(2), loopbackResultTrap(3) 등이 있을 수 있다. 또한 트랩 타임틱스는 트랩을 발생시킨 대리인에서 입력한 sysUpTime의 값, 즉 대리인 시스템이 시동된 이후 현재까지의 시간이다.The general trap types may include coldStart (0), warmStart (1), linkDown (2), linkUp (3), authenticationFailure (4), egpNeighborLoss (5), and enterprise specific (6). The specific trap type is meaningful only when the value of the general trap type is enterpriseSpecific (6), and may include acctLogFileFull (1), faultLogFileFull (2), and loopbackResultTrap (3). Also, the trap timetics is the value of sysUpTime entered by the agent that generated the trap, that is, the time since the agent system started up.

TrapAnalyzer는 바인드된 객체 값 리스트를 분석하여 객체 ID와 객체 값으로 나눈 다음, 나뉘어진 객체 ID는 인덱스가 포함된 객체 이름 문자열로 변환한다. 변환된 모든 객체 이름과 상기 객체 값은 VALUE_LIST 구조에 저장되어 메시지 핸들러로 리턴된다. 이때 메시지 핸들러로 리턴되는 값은 수신된 SNMP 패킷의 버전(version)과, SNMP 트랩의 헤더 구조 포인터(trap_head), SNMP 트랩의 바인드된 객체 개수(vb_count) 및 SNMP 트랩의 객체 리스트를 가리키는 VALUE_LIST 포인터(trap_list)이다.TrapAnalyzer analyzes the bound list of object values, breaks them up into object IDs and object values, and then converts the divided object IDs to object name strings containing indices. All converted object names and the object values are stored in the VALUE_LIST structure and returned to the message handler. The value returned to the message handler is a version of the received SNMP packet (version), a header structure pointer (trap_head) of the SNMP trap, the number of bound objects (vb_count) of the SNMP trap, and a VALUE_LIST pointer indicating the object list of the SNMP trap ( trap_list).

상기 변환된 SNMP 패킷에 에러가 발생된 경우, TrapAnalyzer는 err_msg에 실패 사유(에러코드)를 출력하고, err_msg를 리턴시킨다.When an error occurs in the converted SNMP packet, the TrapAnalyzer outputs a reason (error code) to err_msg and returns err_msg.

상기된 바와 같이, 본 발명에 의한 SNMP API 함수의 동작에 있어서, SNMP API 함수가 리턴시키는 err_msg의 정수 값이 '0'이면 에러가 발생되지 않은 경우이지만, '0'이 아니면 에러가 발생된 경우이다. 리턴되는 '0'이 아닌 정수 값들은 실패 사유를 나타내도록 미리 정의된 에러코드로서, 그 의미의 일 예는 하기의 표 3 과 같다.As described above, in the operation of the SNMP API function according to the present invention, if the integer value of err_msg returned by the SNMP API function is '0', no error occurs. If not, the error occurs. to be. The non-zero integer values returned are predefined error codes to indicate the reason for failure. An example of the meaning is shown in Table 3 below.

<표 3>TABLE 3

0x11 : too big(SNMP response error)0x11: too big (SNMP response error)

0x12 : no such name(SNMP response error)0x12: no such name (SNMP response error)

0x13 : bad value(SNMP response error)0x13: bad value (SNMP response error)

0x14 : read only(SNMP response error)0x14: read only (SNMP response error)

0x15 : general error(SNMP response error)0x15: general error (SNMP response error)

0x16 : no access(SNMP response error)0x16: no access (SNMP response error)

0x17 : wrong type(SNMP response error)0x17: wrong type (SNMP response error)

0x18 : wrong length(SNMP response error)0x18: wrong length (SNMP response error)

0x19 : wrong encoding(SNMP response error)0x19: wrong encoding (SNMP response error)

0x1A : wrong value(SNMP response error)0x1A: wrong value (SNMP response error)

0x1B : no creation(SNMP response error)0x1B: no creation (SNMP response error)

0x1C : inconsistent value(SNMP response error)0x1C: inconsistent value (SNMP response error)

0x1D : resource unavailable(SNMP response error)0x1D: resource unavailable (SNMP response error)

0x1E : commit failed(SNMP response error)0x1E: commit failed (SNMP response error)

0x1F : undo failed(SNMP response error)0x1F: undo failed (SNMP response error)

0x20 : authorization error(SNMP response error)0x20: authorization error (SNMP response error)

0x21 : not writable(SNMP response error)0x21: not writable (SNMP response error)

0x22 : inconsistent name(SNMP response error)0x22: inconsistent name (SNMP response error)

0x23 : can't find MO in the MIB table0x23: can't find MO in the MIB table

0x24 : can't make MIB table0x24: can't make MIB table

0x25 : can't find response MO in the MIB table0x25: can't find response MO in the MIB table

0x26 : need to specify destination first0x26: need to specify destination first

0x27 : error creating SNMP request0x27: error creating SNMP request

0x28 : no oid entry0x28: no oid entry

0x29 : internal buffer exceeded, OID to long0x29: internal buffer exceeded, OID to long

0x2A : can't get socket0x2A: can't get socket

0x2B : sendto failed0x2B: sendto failed

0x2C : recv timeout failed0x2C: recv timeout failed

0x2D : recvfrom failed0x2D: recvfrom failed

0x2F : error in SNMP decode of received packet0x2F: error in SNMP decode of received packet

0x30 : can't find Enterprise MO in the MIB0x30: can't find Enterprise MO in the MIB

0x31 : can't Decode received data0x31: can't Decode received data

0x32 : Decode error0x32: Decode error

0x33 : Don't know the variable type for set, try to set instead0x33: Don't know the variable type for set, try to set instead

0x34 : V2 type request but V2 type code isn't installed0x34: V2 type request but V2 type code isn't installed

0x35 : unknown value type0x35: unknown value type

0x36 : No memory0x36: No memory

0x37 : Error creating trap packet0x37: Error creating trap packet

0x38 : Error creating trap2 packet0x38: Error creating trap2 packet

0x39 : SNMP bind integer error0x39: SNMP bind integer error

0x3A : SNMP bind object error0x3A: SNMP bind object error

상기와 같이 본 발명의 상세한 설명에서는 구체적인 실시예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 안되며 후술하는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다.As described above, in the detailed description of the present invention, specific embodiments have been described, but various modifications are possible without departing from the scope of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be defined not only by the scope of the following claims, but also by the equivalents of the claims.

이상에서 상세히 설명한 바와 같이 동작하는 본 발명에 있어서, 개시되는 발명중 대표적인 것에 의하여 얻어지는 효과를 간단히 설명하면 다음과 같다.In the present invention operating as described in detail above, the effects obtained by the representative ones of the disclosed inventions will be briefly described as follows.

본 발명은, 메시지 핸들러에 의하여 호출되어 에필로그 툴의 함수를 사용하여 SNMP 패킷을 생성하는 SNMP API를 제공함으로써 누구나 쉽게 프로그램의 호출이가능하도록 하며, 메시지 핸들러가 API 함수로 직접 접근할 필요가 없으므로 프로그래머가 API 내부의 개별적인 동작을 이해할 필요가 없어서 SNMP 통신을 위한 인간의 작업을 최소화한다.The present invention provides an SNMP API that is called by a message handler to generate an SNMP packet using a function of the epilogue tool, so that anyone can easily call the program. There is no need to understand the individual operations inside the API, minimizing human tasks for SNMP communication.

또한 본 발명은 SNMP 인터페이스 프로그램의 코드를 최적화하여 프로그램의 작성시 중복된 코드화 작업을 제거하며, SNMP API의 에러코드를 제공하여 디버그를 용이화할 수 있는 효과가 있다.In addition, the present invention has the effect of optimizing the code of the SNMP interface program to eliminate the redundant coding at the time of program creation, and to facilitate the debug by providing an error code of the SNMP API.

Claims (11)

단순네트워크관리프로토콜(SNMP) 관리자내의 다수개의 메시지 핸들러가 에필로그 툴을 사용하여 네트워크 소자의 SNMP 대리인을 관리하기 위한 방법에 있어서,In a method for multiple message handlers in a simple network management protocol (SNMP) manager to manage an SNMP agent of a network element using an epilogue tool, 상기 각 메시지 핸들러가, 상기 SNMP 대리인을 관리하기 위한 제어명령(PDU)의 응용프로그래밍인터페이스(API) 함수인 SNMP API를 호출하는 제 1 단계;A first step in which each message handler calls an SNMP API, which is an application programming interface (API) function of a control command (PDU) for managing the SNMP agent; 상기 호출된 SNMP API가 상기 에필로그 툴을 사용하여 SNMP 대리인을 관리하기 위한 제어명령을 수행하고, 그 결과를 상기 메시지 핸들러로 리턴시키는 제 2 단계를 포함하는, API를 이용한 SNMP 통신 방법.And a second step in which the called SNMP API executes a control command for managing an SNMP agent using the epilogue tool, and returns a result to the message handler. 제 1 항에 있어서, 상기 호출된 SNMP API는,The method of claim 1, wherein the called SNMP API, 관리자가 지정한 특정 관리객체(MO)의 값을 가져오기 위한 GetRequest API 함수인, API를 이용한 SNMP 통신 방법.An SNMP communication method using the API, which is a GetRequest API function for obtaining a value of a specific management object (MO) designated by an administrator. 제 2 항에 있어서, 상기 제 2 단계는,The method of claim 2, wherein the second step, 상기 GetRequest API 함수가 특정 관리객체의 값을 가져오기 위한 SNMP 패킷을 생성하는 단계;Generating an SNMP packet by the GetRequest API function to obtain a value of a specific management object; 상기 생성된 SNMP 패킷을 UDP 소켓을 통해 상기 SNMP 대리인으로 전송하는단계;Transmitting the generated SNMP packet to the SNMP agent through a UDP socket; 상기 전송에 대하여 응답된 데이터의 에러 상태를 체크하는 단계;Checking the error status of the data replied to the transmission; 상기 체크결과 에러가 없는 경우, 상기 응답된 데이터에 포함된 모든 객체 이름과 객체의 값을 상기 메시지 핸들러로 리턴시키는 단계; 및If there is no error as a result of the check, returning all object names and object values included in the answered data to the message handler; And 상기 체크결과 에러가 있는 경우, 실패사유를 나타내는 미리 정의된 에러코드를 상기 메시지 핸들러로 리턴시키는 단계를 포함하는, API를 이용한 SNMP 통신 방법.If there is an error as a result of the check, returning a predefined error code indicating a failure reason to the message handler. 제 1 항에 있어서, 상기 SNMP API는,The method of claim 1, wherein the SNMP API, 관리자가 지정한 특정 객체의 다음 객체값이나 지정한 객체가 테이블인 경우 다음 인덱스값을 가져오기 위한 GetNextRequest API 함수인, API를 이용한 SNMP 통신 방법.An SNMP communication method using the API, which is a GetNextRequest API function for retrieving the next index value of a specific object designated by an administrator or the specified index is a table. 제 4 항에 있어서, 상기 제 2 단계는,The method of claim 4, wherein the second step, 상기 GetRequest API 함수가 특정 객체의 다음 객체값이나 다음 인덱스값을 가져오기 위한 SNMP 패킷을 생성하는 단계;Generating, by the GetRequest API function, an SNMP packet for retrieving a next object value or a next index value of a specific object; 상기 생성된 SNMP 패킷을 UDP 소켓을 통해, 상기 SNMP 대리인으로 전송하는 단계;Transmitting the generated SNMP packet to the SNMP agent through a UDP socket; 상기 전송에 대하여 응답된 데이터의 에러 상태를 체크하는 단계;Checking the error status of the data replied to the transmission; 상기 체크결과 에러가 없는 경우, 상기 응답된 데이터에 포함된 모든 객체 이름과 객체의 값을 상기 메시지 핸들러로 리턴시키는 단계; 및If there is no error as a result of the check, returning all object names and object values included in the answered data to the message handler; And 상기 체크결과 에러가 있는 경우, 실패사유를 나타내는 미리 정의된 에러코드를 상기 메시지 핸들러로 리턴시키는 단계를 포함하는, API를 이용한 SNMP 통신 방법.If there is an error as a result of the check, returning a predefined error code indicating a failure reason to the message handler. 제 1 항에 있어서, 상기 SNMP API는,The method of claim 1, wherein the SNMP API, 대리인에게 있는 특정 객체값을 변경하기 위한 SetRequest API 함수인, API를 이용한 SNMP 통신 방법.An SNMP communication method using the API, which is a SetRequest API function for changing a specific object value of a delegate. 제 6 항에 있어서, 상기 제 2 단계는,The method of claim 6, wherein the second step, 상기 SetRequest API 함수가 지정된 특정 객체의 값을 변경하기 위한 SNMP 패킷을 생성하는 단계;Generating an SNMP packet by the SetRequest API function to change a value of a specified specific object; 상기 생성된 SNMP 패킷을 UDP 소켓을 통해, 상기 SNMP 대리인으로 전송하는 단계;Transmitting the generated SNMP packet to the SNMP agent through a UDP socket; 상기 전송에 대하여 응답된 데이터의 에러 상태를 체크하는 단계;Checking the error status of the data replied to the transmission; 상기 체크결과 에러가 없는 경우, 상기 응답된 데이터에 포함된 모든 객체이름과 객체 값을 상기 메시지 핸들러로 리턴시키는 단계; 및If there is no error as a result of the check, returning all object names and object values included in the answered data to the message handler; And 상기 체크결과 에러가 있는 경우, 실패사유를 나타내는 미리 정의된 에러코드를 상기 메시지 핸들러로 리턴시키는 단계를 포함하는, API를 이용한 SNMP 통신 방법.If there is an error as a result of the check, returning a predefined error code indicating a failure reason to the message handler. 제 1 항에 있어서, 상기 SNMP API는,The method of claim 1, wherein the SNMP API, SNMP 관리자에게서 발생된 특정 상황정보인 트랩을 발생시키기 위한 SendTrapRequest API 함수인, API를 이용한 SNMP 통신 방법.SNMP communication method using API, which is a SendTrapRequest API function for generating a trap, which is specific situation information generated from an SNMP manager. 제 8 항에 있어서, 상기 제 2 단계는,The method of claim 8, wherein the second step, 상기 SendTrapRequest API 함수가 SNMP 버전에 따라 SNMP 트랩 패킷을 생성하는 단계;Generating, by the SendTrapRequest API function, an SNMP trap packet according to an SNMP version; 상기 생성된 SNMP 트랩 패킷을 UDP 소켓을 통해, 지정된 목적지로 전송하는 단계; 및Transmitting the generated SNMP trap packet to a designated destination through a UDP socket; And 상기 전송 도중 에러가 발생된 경우, 실패사유를 나타내는 미리 정의된 에러코드를 상기 메시지 핸들러로 리턴시키는 단계를 포함하는, API를 이용한 SNMP 통신 방법.If an error occurs during the transmission, returning a predefined error code indicating a failure reason to the message handler. 제 1 항에 있어서, 상기 SNMP API는,The method of claim 1, wherein the SNMP API, 상기 SNMP 대리인으로부터 가져온 트랩을 분석하기 위한 TrapAnalyzer API 함수인, API를 이용한 SNMP 통신 방법.SNMP communication method using an API, which is a TrapAnalyzer API function for analyzing a trap obtained from the SNMP agent. 제 10 항에 있어서, 상기 제 2 단계는,The method of claim 10, wherein the second step, 상기 TrapAnalyzer API 함수가 상기 SNMP 대리인으로부터 수신된 버퍼의 데이터를 SNMP 디코드하여 SNMP 패킷을 생성하는 단계;Generating, by the TrapAnalyzer API function, SNMP decoding the data in the buffer received from the SNMP agent to generate an SNMP packet; 상기 생성된 SNMP 패킷이 트랩인지를 확인하는 단계;Checking whether the generated SNMP packet is a trap; 상기 생성된 SNMP 패킷이 트랩인 경우, 상기 SNMP 패킷으로부터 구한 모든 객체 이름과 객체 값 및 트랩을 메시지 핸들러로 리턴시키는 단계; 및If the generated SNMP packet is a trap, returning all object names, object values, and traps obtained from the SNMP packet to a message handler; And 상기 생성된 SNMP 패킷에 에러가 발생된 경우, 실패사유를 나타내는 미리 정의된 에러코드를 상기 메시지 핸들러로 리턴시키는 단계를 추가로 포함하는, API를 이용한 SNMP 통신 방법.If an error occurs in the generated SNMP packet, further comprising returning a predefined error code indicating a failure reason to the message handler.
KR1020000015028A 2000-03-24 2000-03-24 Method for simple network management protocol communication using application programming interface KR20010090254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000015028A KR20010090254A (en) 2000-03-24 2000-03-24 Method for simple network management protocol communication using application programming interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000015028A KR20010090254A (en) 2000-03-24 2000-03-24 Method for simple network management protocol communication using application programming interface

Publications (1)

Publication Number Publication Date
KR20010090254A true KR20010090254A (en) 2001-10-18

Family

ID=19658179

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000015028A KR20010090254A (en) 2000-03-24 2000-03-24 Method for simple network management protocol communication using application programming interface

Country Status (1)

Country Link
KR (1) KR20010090254A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006054877A1 (en) * 2004-11-18 2006-05-26 Samsung Electronics Co., Ltd. Network management apparatus and method based on simple network management protocol

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006054877A1 (en) * 2004-11-18 2006-05-26 Samsung Electronics Co., Ltd. Network management apparatus and method based on simple network management protocol
AU2005307171B2 (en) * 2004-11-18 2009-07-09 Samsung Electronics Co., Ltd. Network management apparatus and method based on simple network management protocol
US8812636B2 (en) 2004-11-18 2014-08-19 Samsung Electronics Co., Ltd. Network management apparatus and method based on simple network management protocol

Similar Documents

Publication Publication Date Title
EP0963076B1 (en) Method for computer internet remote management of a telecommunication network element
US7181743B2 (en) Resource allocation decision function for resource management architecture and corresponding programs therefor
US8812636B2 (en) Network management apparatus and method based on simple network management protocol
US6687735B1 (en) Method and apparatus for balancing distributed applications
KR101826368B1 (en) Cloud computing monitoring and management system
US6085243A (en) Distributed remote management (dRMON) for networks
EP0831617B1 (en) Flexible SNMP trap mechanism
US20050286435A1 (en) Remote management system
Basu et al. Toward web service dependency discovery for SOA management
JP2000172600A (en) Network constitution investigation method, network equipment control method and device therefor
US20060071684A1 (en) Active storage area network discovery system and method
WO2000054460A1 (en) Method and apparatus for accessing network information on a network device
KR20010090254A (en) Method for simple network management protocol communication using application programming interface
WO2004017199A1 (en) Method for monitoring and managing an information system
Hauck et al. Monitoring quality of service across organizational boundaries
KR100840085B1 (en) Device for managing fault of customer network management service in multi-domain data networks and method thereof
KR100298208B1 (en) Method for remote program execution interfacting in switching system
Hillman et al. Meta-adaptation in autonomic systems
KR100438898B1 (en) Method for interfacing SNMP network management agent and message structure therefor
Bartl et al. Data exchange between real network component and OPNET modeler simulation environment
KR20030043398A (en) Interfacing system in element management system and managing method using the system
KR20090044110A (en) Simulator and simulation method for testing network element and medium for storing for program for carrying out the method
Bohdanowicz et al. The problematic of distributed systems supervision-an example: Genesys
Gavalas et al. A Progressive Network Management Architecture Enabled By Java Technology
Chen Monitoring Network Quality of Service in a Dynamic Real-Time System

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination