Git Product home page Git Product logo

Comments (8)

AdrianSimionov avatar AdrianSimionov commented on June 24, 2024

Thanks, will take a look.

from docsis.

AdrianSimionov avatar AdrianSimionov commented on June 24, 2024

Sergey, unfortunately I cannot reproduce this.

Please see below output.

$ ./docsis -d test.cm 
Main 
{
    MtaConfigDelimiter 1;
    SnmpMibObject pktcSigDefCallSigTos.0 Integer 26;
    SnmpMibObject pktcSigDefMediaStreamTos.0 Integer 46;
    SnmpMibObject pktcSigTosFormatSelector.0 Integer 2; /* dscpCodepoint */
    SnmpMibObject pktcNcsEndPntConfigCallAgentId.9 String "[192.168.28.40]";
    SnmpMibObject pktcNcsEndPntConfigCallAgentId.10 String "[192.168.28.40]";
    SnmpMibObject pktcMtaDevEnabled.0 Integer 1; /* true */
    SnmpMibObject pktcNcsEndPntConfigCallAgentUdpPort.9 Integer 2427;
    SnmpMibObject pktcNcsEndPntConfigCallAgentUdpPort.10 Integer 2427;
    SnmpMibObject pktcNcsEndPntConfigMWD.9 Integer 2;
    SnmpMibObject pktcNcsEndPntConfigMWD.10 Integer 2;
    SnmpMibObject pktcSigDevRgCadence.0 HexString 0x003ff00000000000;
    MtaConfigDelimiter 255;
}


$ ./docsis -o -d test.cm 
Main 
{
    MtaConfigDelimiter 1;
    SnmpMibObject enterprises.4491.2.2.2.1.1.8.0 Integer 26;
    SnmpMibObject enterprises.4491.2.2.2.1.1.9.0 Integer 46;
    SnmpMibObject enterprises.4491.2.2.2.1.1.10.0 Integer 2;
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.1.9 String "[192.168.28.40]";
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.1.10 String "[192.168.28.40]";
    SnmpMibObject enterprises.4491.2.2.1.1.1.7.0 Integer 1;
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.2.9 Integer 2427;
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.2.10 Integer 2427;
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.18.9 Integer 2;
    SnmpMibObject enterprises.4491.2.2.2.1.2.1.1.18.10 Integer 2;
    SnmpMibObject enterprises.4491.2.2.2.1.1.22.0 HexString 0x003ff00000000000;
    MtaConfigDelimiter 255;
}

from docsis.

sergessn avatar sergessn commented on June 24, 2024

Adrian,

I need to see OID numbers for all SnmpMibObjects with "-o"
A few minutes ago I downloaded again the last sources from github and compiled a docsis 0.9.8-dev.
I decoded my bootfile with the last version:

./docsis -d cm.bin
Main
{
NetworkAccess 1;
SnmpMibObject docsDevEvControl.0 Integer 1; /* resetLog /
SnmpMibObject ifAdminStatus.1 Integer 1; /
up */
SnmpMibObject enterprises.4413.2.2.2.1.6.1.5.0 Integer 122;
SnmpMibObject docsDevNmAccessIp.16 IPAddress 0.0.0.0;
SnmpMibObject docsDevNmAccessIpMask.16 IPAddress 0.0.0.0;

./docsis -o -d cm.bin
Main
{
NetworkAccess 1;
SnmpMibObject docsDevEvControl.0 Integer 1; /* resetLog /
SnmpMibObject ifAdminStatus.1 Integer 1; /
up */
SnmpMibObject enterprises.4413.2.2.2.1.6.1.5.0 Integer 122;
SnmpMibObject docsDevNmAccessIp.16 IPAddress 0.0.0.0;

As you can see I don't have any changes and differences in output with “-o” and without “-o”

I compile and use docsis 0.9.8-dev on Centos 5.11 server.
Will you help my compile logs or something else?

from docsis.

AdrianSimionov avatar AdrianSimionov commented on June 24, 2024

Please add a complete decoded config file. I will use that file for more tests.
The decoding is handled by libsnmp-dev libraries and I hope to be just a setting somewhere.

from docsis.

sergessn avatar sergessn commented on June 24, 2024

This is my test bootfile decoded with 0.9.8-dev.

Main
{
NetworkAccess 1;
MaxCPE 8;
SnmpMibObject docsDevEvControl.0 Integer 1;
SnmpMibObject ifAdminStatus.1 Integer 1;
SnmpMibObject enterprises.4413.2.2.2.1.6.1.5.0 Integer 122;
SnmpMibObject docsDevNmAccessIp.16 IPAddress 0.0.0.0;
SnmpMibObject docsDevNmAccessIpMask.16 IPAddress 0.0.0.0;
SnmpMibObject docsDevNmAccessCommunity.16 String "public";
SnmpMibObject docsDevNmAccessControl.16 Integer 2; /* read /
SnmpMibObject docsDevNmAccessInterfaces.16 HexString 0xffff;
SnmpMibObject docsDevNmAccessStatus.16 Integer 4; /
createAndGo /
SnmpMibObject docsDevNmAccessIp.18 IPAddress 0.0.0.0;
SnmpMibObject docsDevNmAccessIpMask.18 IPAddress 0.0.0.0;
SnmpMibObject docsDevNmAccessCommunity.18 String "private";
SnmpMibObject docsDevNmAccessControl.18 Integer 3; /
readWrite /
SnmpMibObject docsDevNmAccessInterfaces.18 HexString 0xffff;
SnmpMibObject docsDevNmAccessStatus.18 Integer 4; /
createAndGo /
ClassOfService
{
ClassID 1;
MaxRateDown 8000000;
MaxRateUp 2000000;
PriorityUp 7;
}
SNMPCPEAccessControl 1;
/
CmMic 386a71b997450a196ddd1a59119d58ea; /
/
CmtsMic 3650e65e1892903a7ebe4b13d5b59b75; _/
/_EndOfDataMkr*/
}

from docsis.

AdrianSimionov avatar AdrianSimionov commented on June 24, 2024

I checked the source code and -o option does not do what we expected it to do. I think it was a misunderstanding into the description of that option. What it will do is that it will not load the MIB files which are loaded by default.

By not loading the MIBs, some of the OIDs will look more numerical, but it was never supposed to be a complete numerical option.

I will convert this into a feature request as we need another option together with -o to specifically make it look like:

$ snmptranslate -On SNMPv2-MIB::sysUpTime.0
.1.3.6.1.2.1.1.3.0

Is this what you are looking for?

I understand the real need for -o option especially when you are working with PacketCable / EuroPacketCable configuration files.

from docsis.

sergessn avatar sergessn commented on June 24, 2024

Thanks for researching.
Yes, it is that I'm looking (complete numerical option).
It will be perfect to have this new feature in docsis.

from docsis.

AdrianSimionov avatar AdrianSimionov commented on June 24, 2024

Sergey, I think I finally have this fixed. Sorry that it took me so long but I had to learn A LOT about net-snmp libraries first.

Please download and compile the following code:

https://github.com/AdrianSimionov/docsis/archive/num_oid.zip

Here is how the output will look now:

$ ./docsis -d test.cm
Main 
{
    MtaConfigDelimiter 1;
    SnmpMibObject pktcSigDefCallSigTos.0 Integer 26;
    SnmpMibObject pktcSigDefMediaStreamTos.0 Integer 46;
    SnmpMibObject pktcSigTosFormatSelector.0 Integer 2; /* dscpCodepoint */
    SnmpMibObject pktcNcsEndPntConfigCallAgentId.9 String "[192.168.28.40]";
    SnmpMibObject pktcNcsEndPntConfigCallAgentId.10 String "[192.168.28.40]";
    SnmpMibObject pktcMtaDevEnabled.0 Integer 1; /* true */
    SnmpMibObject pktcNcsEndPntConfigCallAgentUdpPort.9 Integer 2427;
    SnmpMibObject pktcNcsEndPntConfigCallAgentUdpPort.10 Integer 2427;
    SnmpMibObject pktcNcsEndPntConfigMWD.9 Integer 2;
    SnmpMibObject pktcNcsEndPntConfigMWD.10 Integer 2;
    SnmpMibObject pktcSigDevRgCadence.0 HexString 0x003ff00000000000;
    MtaConfigDelimiter 255;
}

$ ./docsis -o -d test.cm
Main 
{
    MtaConfigDelimiter 1;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.1.8.0 Integer 26;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.1.9.0 Integer 46;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.1.10.0 Integer 2;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.1.9 String "[192.168.28.40]";
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.1.10 String "[192.168.28.40]";
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.1.1.1.7.0 Integer 1;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.2.9 Integer 2427;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.2.10 Integer 2427;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.18.9 Integer 2;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.2.1.1.18.10 Integer 2;
    SnmpMibObject .1.3.6.1.4.1.4491.2.2.2.1.1.22.0 HexString 0x003ff00000000000;
    MtaConfigDelimiter 255;
}

Give it a try, let me know if other changes are needed (maybe add this with a new argument?) and if everything is OK me or Richard will accept the changes.

This is a really nice feature in my opinion, especially when working with PacketCable configuration files.

from docsis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.