Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Is there a way to define a subtree as a type in snmp?

Is there a way to define a subtree as a type in snmp?

Is there a way to define a subtree as a type in snmp?

I would like to create an ASN1 definition of a tree, as a type. So I can assign this type to more than one node. If I could do that, I could create multiple, complex tree-shaped definitions (including tables), while only having to define them once. I need this, because I have a set number of complex-functions performing network interfaces, and I imagine it to look something like this (pseudo ASN1):

-- This is where I'm going to hang multiple trees under, defined once
fooInterfaces ::= oid { enterprises.foo 1 }

-- Type definition of the tree; I don't know how this step works
MyTreeType ::= oid

-- The contents of the tree (partly)

mtu ::= Unsigned32 { MyTreeType 1 }

macAddress ::= OCTET STRING { MyTreeType 2 }

ipaddressTable ::= sequence of etc. { MyTreeType 3 }

arpTable ::= sequence of etc. { MyTreeType 4 }

-- Hanging the above trees under the endpoint

interface1 ::= MyTreeType { fooInterfaces 1 }

interface2 ::= MyTreeType { fooInterfaces 2 }

Addressing the mtu for interface1 would then be as simple as enterprises.foo.; MAC address for interface2 would be enterprises.foo., etc.

I don't see any way that ASN1 now allows for this kind of definition, but I'm a relative noob, so if you have some advice (other than 'you shouldn't want to do that') I'd really appreciate it.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close