-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for SNMPv2C Packet Header (Data Plane Only) #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review.
Can't we accept object identifier as string ? The reason being, if we were to accept array of uint64 as input, it would complicate how multiple values will be provided. e.g. This would also be consistent with how we accept IP or MAC address today. Going forward, in models, |
flow/packet-headers/snmpv2c.yaml
Outdated
default: 0.0.0.0 | ||
features: [count] | ||
x-field-uid: 2 | ||
ipv6: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to SNMPv2-RFC3416 supported ApplicationSyntax
are
ApplicationSyntax ::= CHOICE {
ipAddress-value IpAddress,
counter-value Counter32,
timeticks-value TimeTicks,
arbitrary-value Opaque,
big-counter-value Counter64,
unsigned-integer-value Unsigned32 }
SNMP Data Type is supporting single IP type (IpAddress
) with SIZE (4)
IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4))
So, I am suspecting RFC talked about for IPv4 address NOT IPv6 address. Because if this is IPv6 then what is the length of it.
Could you please double check it otherwise we have to remove IPv6.
x-field-uid: 9 | ||
unsigned_integer_value: | ||
x-field-uid: 10 | ||
integer_value: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are proving OTG data type (e,g, <int32>
, <uint32>
, <string>
etc) within all SNMP property. But those data types are not one-to-one mapping with ASN.1 type. say
community
anderror_status
arestring
but those are different ASN.1 type (which are0x04
and0x02
)- Same also true for
request_id
andinteger_value
, both areint32
with different ASN.1 type (0x02
and0x41
)
Yes, I agree this is not a goal for OTG model perspective. So, I am thinking it will better to mentioned what is the ANS.1 type for each field within description. It will reduced ramp-up and anomality at the time to developing SNMP protocol.
The |
Yes its suggested by rfc |
Redocly View:
ReDoc Interactive Demo (redocly.github.io)
( New object at : set_config/flows/packet/snmpv2c )
SNMPv2-RFC3416
SNMPv2C-RFC1901
SNMP-TCP-Guide
SNMP-OID-Encoding-Example
Requirement:
The user able to define SNMPv2C data plane packet headers. Purpose is to flood DUT with SNMPv2C request and responses. The user should be able to configure different fields in PDU with ability to specify Increment/Decrement operations on certain applicable fields in the specified PDU.
Example usage: