On 30/08/2025 03:10, Jon Perryman wrote:
Consider the following SNMP message as an example
  02-28-2014 09:00:14 Auth.Notice 192.168.34.31 Feb 27 23:00:24 : 2014/02/27 
23:00:24 EST,1,545702,Probe
- MAP IP To MAC Failure,0,28,,Switch,192.168.34.1,,Failed to read IP address 
mappings from device Switch.

That is not an SNMP message. It looks more like a human-readable
log entry.

An SNMP message follows the Basic Encoding Rules. "The most fundamental
rule states that each field is encoded in three parts: Type, Length,
and Data. Type specifies the data type of the field using a single
byte identifier. ... Length specifies the length in bytes of
the following Data section, and Data is the actual value communicated"

https://www.ranecommercial.com/legacy/note161.html

Where does mixed case enter into this encoding? Why would you
need regular expressions to parse this message when every field
has a specified length?

--
                        Martin

Dr Martin Ward | Email: mar...@gkc.org.uk | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

Reply via email to