?? snmp-faq-1.1.ascii
字號:
18. TITLE: Missing documentation for snmpNextIndex in SNMPv1/v2c 1.0. SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: SNMPv1/v2c 1.0 SNMPv1/v2c 1.0 beta ------------------- -------------------DESCRIPTION OF PROBLEM: No manpage for snmpNextIndex() function.RESEARCH: snmpNextIndex function is for internal use. This was notintended for user. Nevertheless the user could use this function orwrite one similar to it.RESOLUTION:/******************************************************************************** snmpNextIndex** Function to compute the next feasible OID for some given* table index type.*** <compc> - component count of input oid sequence* <compl> - input oid sequence* <pOutOid> - output OID sequence. This buffer must be provided by the caller,* and be big enough for an oid sequence of length oidLen.* <pMaxOid> - The max possible table index of this kind.* e.g. for the udpTable the index can be max ff.ff.ff.ff.ffff* <oidLen> - length of index oid sequence** RETURNS:* 0 if valid next index generated in OutOid.* 1 if no next index value possible.** NOMANUAL*/int snmpNextIndex ( int compc, /* Component count */ const OIDC_T * compl, /* Oid for which lexicographic next is reqd */ OIDC_T * pOutOid, /* Output oid i.e. the next feasible oid */ const OIDC_T * pMaxOid, /* max possible value for the index oid */ int oidLen /* length of index oid */ )SPR / PATCH: 7664KEYWORDS: snmp snmpdLib.c snmpIf next--------------------------------------------------------------------------19. TITLE: Why is snmpIoCommunityValidate() not returning a response PDU to the SNMP manager ? SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: snmpv1/v2c 1.0 ------------------- -------------------DESCRIPTION OF PROBLEM:According to the documentation the function snmpIoCommunityValidate()should return 1 if the passed-in community string is invalid.I did this and what's happening is the agent will not respond tothe manager. That is, the agent simply drops the PDU and causesa timeout condition to occur at the manager.My question is: what do I need to do to make the agent respondto the manager with the error condition AUTHORIZATION_ERROR?That is, instead of allowing the manager to timeout, it wouldbe better to explicitly notify the manager the community stringis set incorrectly in the PDU.RESOLUTION:The snmp manager must keep track of the valid community names becausecommunity names are defined local to the agent, and the manager should knowwhich ones are valid names for each SNMP agent. This behavior could vary from one vendor to another. In the WindNet SNMP agent snmpIoCommunityValidate is distributed in source form in snmpIoLIb.c.You should be able to send a trap to the manager, because if a bad community is received, the following is executed ... /* Got a bad community if were here, so increment the * snmpInBadCommunityNames counter */ ++ snmp_stats.snmpInBadCommunityNames; /* An auth fail trap may be sent here */ return (1);SPR / PATCH:KEYWORDS:--------------------------------------------------------------------------20. TITLE: Compiling custom and standard MIBs gives errors. SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: SNMPv1/v2c 1.0 ------------------- -------------------DESCRIPTION OF PROBLEM:When using the SNMP mib compiler to compile the std. and custom MIBsthe following error is produced: >mibcomp -o ..\Control\SNMP\Agent\snmpMib2.c Control\SNMP\Mibs\rfc1155.smi>..\Control\SNMP\Mibs\snmpMib2.mib ..\Control\SNMP\Mibs\rfc1213.mib>..\Control\SNMP\Mibs\cmn.mib ..\Control\SNMP\Mibs\frs.mib>Wind River Systems WindNet MIB compiler , version 1.0.>Copyright (c) 1989-1996, Wind River Systems Inc.>processing object RFC1213-MIB:ifTable> >..\Control\SNMP\Mibs\rfc1213.mib:200: "ifTable" cannot have both>synchronous and asynchronous method routines.The custom MIBs are - cmn.mib frs.mibThe standard ones - rfc1213.mib snmpMib2.mib rfc1155.smiRESOLUTION: Some of the MIB definition files maybe dependent on other MIBs, and thismeans order of the MIB files to the MIB compiler is important.snmpMib2.mib - Since this MIB definition file depends on the files - rfc1213.mib and rfc1155.smiMibs will compile without errors if compiled as follows :% (tor101/target/src/snmpv1) 18> mibcomp -l $WIND_BASE/target/src/snmpv1/mibs \ rfc1155.smi rfc1213.mib snmpMib2.mib cmn.mib frs.mib SPR / PATCH:KEYWORDS: snmpv1 snmpv2c description make check snmp--------------------------------------------------------------------------21. TITLE: mibleaf.h file is missing in the /snmpv1/agent/ directory. SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: SNMPv1/v2c 1.0 ------------------- -------------------DESCRIPTION OF PROBLEM:A file necessary for the SNMP agent, "mibleaf.h", is missing from the Tornado 1.0.1 distribution. RESOLUTION:The mibleaf.h is generated when the Makefile in the src/snmpv1/agent directory is run. The mibcomp utility creates snmpMib2.c , mibhand.h and mibleaf.c files in the "agent" directory.SPR / PATCH:KEYWORDS:--------------------------------------------------------------------------22. TITLE: How to use non-ip interfaces in the MIB ifTable. SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: SNMPv1/v2c 1.0 Tornado 1.0.1 ------------------- -------------------DESCRIPTION OF PROBLEM:How to add non-IP interfaces to the MIB-2 ifTable such as T1, E1, DS0.WindNet SNMP provides support to MIB2 interface table using m2Lib.In the current implementation the interfaces appearing in the table are allIP interfaces (which are the VxWorks attached network interfaces).What needs to be done so that all the interfaces (NOT just the IP ones) must appear in the IfTable, for example T1 carrying voice).Standard MIBs for RS-232 MIB, T1/E1 MIB, require that those interfaces be included in the ifTable of MIB-II even if they do not carry IP traffic.RESOLUTION:There is a new snmpIf.c which has comments on how to use nonip interfaces in the SNMP agent. Check with Technical support for the patch.snmpIf.c - snmp v1 interface group method routinesmodification history--------------------01b,21aug97,an Updated comments to include non ip interfacesSPR / PATCH: 9060 / snmpIf.cKEYWORDS: MIB-II MIB II non ip snmpv1 snmpv2c snmp snmpv1v2c--------------------------------------------------------------------------23. TITLE: Problem using ipAddrTable in snmpIp.c. SCOPE DISCOVERED ON HOST: All ------------------- ------------------- ARCHITECTURE: All ------------------- ------------------- BSP: All ------------------- -------------------PRODUCT / REVISION: SNMP v1/v2c 1.0 ------------------- -------------------DESCRIPTION OF PROBLEM:There are two problems with the ipAddrEntryInfoGet() in snmpIp.c 1) ipAdEntBcastAddr is of type INTEGER not IpAddress.2) Looping for varbinds should be called using vbp->vb_ml.ml_last_match not lastmatch. This error will cause multiple get-next to respond with all the same values.Running into a problem when I issue an SNMP query on the"ipAddrTable" (MIB2 path: mib-2 / ip / ipAddrTable).When I query the SNMP agent for the contents of its ipAddrTable,I get the following results: ipAdEntAddr: 127.0.0.1 ipAdEntIfIndex: 127.0.0.1 ipAdEntNetMask: 127.0.0.1 ipAdEntBcastAddr: 127.0.0.1 ipAdEntReasmMaxSize: 127.0.0.1 However, when I make an individual query for each fieldof the ipAddrTable, I get the following results: ipAdEntAddr: 127.0.0.1 ipAdEntIfIndex: 2 ipAdEntNetMask: 255.0.0.0 ipAdEntBcastAddr: 0,0,0,1 ipAdEntReasmMaxSize: 65535 A "multiple" query for the ipAddrTable doesn't appear tobe working correctly. In the ipAddrEntryInfoGet routine. It seems like the lastmatch variable is not being incremented properly. Also, for some unknown reason, ipAddrRouteEntryNext is called afterthe "lastmatch" variable has been incremented to "2".-> Received packet...in snmpIoCommunityValidate: 7b9f18pkt comm: public - 6comm: public - 6ipAddrEntryNext >>> 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1 Received packet...in snmpIoCommunityValidate: 7b9f18pkt comm: public - 6comm: public - 6ipAddrEntryNext >>> 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1ipAddrEntryInfoGet >>> lastmatch 1 Received packet...in snmpIoCommunityValidate: 7b9f18pkt comm: public - 6comm: public - 6ipAddrEntryNext >>> 1ipAddrEntryNext >>> 2ipAddrEntryInfoGet >>> lastmatch 2ipAddrEntryInfoGet >>> lastmatch 2ipAddrEntryInfoGet >>> lastmatch 2ipAddrEntryInfoGet >>> lastmatch 2ipRouteEntryNext >>> 1ipRouteEntryInfoGet >>> lastmatch 1 I also ran a "multiple" query test on the ipRouteTable. Thelastmatch flag looks like it's incremented properly. Here'swhat was printed out when I ran the test:-> Received packet...in snmpIoCommunityValidate: 7b9ef8pkt comm: public - 6comm: public - 6ipRouteEntryNext >>> 1ipRouteEntryInfoGet >>> lastmatch 1ipRouteEntryInfoGet >>> lastmatch 2ipRouteEntryInfoGet >>> lastmatch 3ipRouteEntryInfoGet >>> lastmatch 4ipRouteEntryInfoGet >>> lastmatch 5ipRouteEntryInfoGet >>> lastmatch 6ipRouteEntryInfoGet >>> lastmatch 7ipRouteEntryInfoGet >>> lastmatch 8ipRouteEntryInfoGet >>> lastmatch 9ipRouteEntryInfoGet >>> lastmatch 10 Received packet...in snmpIoCommunityValidate: 7b9ef8pkt comm: public - 6comm: public - 6ipRouteEntryNext >>> 11ipRouteEntryInfoGet >>> lastmatch 11ipRouteEntryInfoGet >>> lastmatch 12ipRouteEntryInfoGet >>> lastmatch 13Received packet...in snmpIoCommunityValidate: 7b9ef8pkt comm: public - 6comm: public - 6ipRouteEntryNext >>> 1ipRouteEntryInfoGet >>> lastmatch 1ipRouteEntryInfoGet >>> lastmatch 2ipRouteEntryInfoGet >>> lastmatch 3ipRouteEntryInfoGet >>> lastmatch 4ipRouteEntryInfoGet >>> lastmatch 5ipRouteEntryInfoGet >>> lastmatch 6ipRouteEntryInfoGet >>> lastmatch 7ipRouteEntryInfoGet >>> lastmatch 8ipRouteEntryInfoGet >>> lastmatch 9ipRouteEntryInfoGet >>> lastmatch 10
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -