Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: SNMP Trap

by Sewi (Friar)
on Oct 25, 2011 at 10:31 UTC ( [id://933591]=note: print w/replies, xml ) Need Help??


in reply to SNMP Trap

Try to cut down the message key in parts:

  • Cut off the prefix: s/^\Qiso.3.6.1.2.1.17.7.1.2.2.1.2.\E$//
  • Get the vlan: s/^(\d+)\.//
  • Get the MAC and convert it: join("-",map { unpack("H*",chr($_)) } split(/\./))
  • Remember: TIMTOWTDT

    Replies are listed 'Best First'.
    Re^2: SNMP Trap
    by Leeon (Initiate) on Oct 25, 2011 at 15:30 UTC
      thanks Sewi i try this code
      s/^\Qiso.3.6.1.2.1.17.7.1.2.2.1.2.\E$//
      but cannot get work . maybe i make wrong something. can you write an example in "foreach" ?

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://933591]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others examining the Monastery: (4)
    As of 2024-04-19 23:48 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found