Advertisement
Guest User

libsmi.py

a guest
Dec 10th, 2010
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. from ctypes import *
  2. from constants import *
  3.  
  4. clibsmi=CDLL("libsmi.so.2.0.25")
  5. clibsmi.smiInit()
  6. smiNode = POINTER(SmiNode)
  7. oid = c_char_p("1")
  8.  
  9. clibsmi.smiGetNode.restype = smiNode
  10. sn=clibsmi.smiGetNode(None,oid)
  11. sno=sn.contents
  12.  
  13. clibsmi.smiGetNextNode.restype = smiNode
  14. sn=clibsmi.smiGetNextNode(pointer(sno),SMI_NODEKIND_ANY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement