You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Patrick J Cherry
||5 years ago|
|debian||5 years ago|
|examples||11 years ago|
|lib/linux||5 years ago|
|test||7 years ago|
|.gitignore||11 years ago|
|.hgignore||8 years ago|
|README||11 years ago|
|Rakefile||10 years ago|
|netlinkrb.gemspec||5 years ago|
This library provides an API for using a Linux Netlink socket, for doing
things like manipulating IP interfaces and routes programmatically, and
capturing packets from ULOG.
ip = Linux::Netlink::Route::Socket.new
# Info about eth0 interface
# Addresses on eth0 interface
ip.addr.list(:index=>"eth0") do |addr|
See the examples/ and test/ directories for more examples.
ruby 1.9 (tested with ruby 1.9.2), OR ruby 1.8.7 with the ffi library.
There are separate classes for each Netlink protocol providing a high-level
API. These all in turn use the NLSocket class, which has methods for adding
the headers to messages and sending them over a socket. The messages
themselves are built using class Message or RtattrMessage, which in turn are
subclasses of CStruct, which performs the low-level packing and unpa