Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An FFI wrapper for libpci (because you always wanted to touch PCI devices with ruby)
tree: 602b8368d0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
ruby-pci.rb
sample.rb

README

ruby-pci    by Joe Damato   http://timetobleed.com
==================================================

Haven't you always wanted to touch your PCI BUS and it's devices from Ruby?

Well now you CAN!

What is it?
===========
ruby-pci is an FFI wrapper for libpci

What do I need?
===============
You need ffi and libpci.

% sudo apt-get install libpci-dev
% sudo gem install ffi

How do I use it?
================
There is a sample ruby script included which:
  - scans the PCI bus
  - checks each device's vendor ID
  - if its an Intel device, the script reads a byte from the PCI config space
  - script then checks the byte to determine if the device is a PCI bridge
  - if so, a print out is displayed!

The only functionality which has been tested is the functionality in the sample
script, but in theory everything you can do with libpci you can do with
ruby-pci.

TODO
====
  - Make it a ruby gem
  - Include more sample scripts
  - Unit tests or something ?
Something went wrong with that request. Please try again.