Skip to content
LuaJIT binding for Open vSwitch
Lua Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
classes
core
lib
openflow
openvswitch
ovsdb
testy
utils
README.md
loopit.lua
runonce.lua
testit.lua

README.md

LJIT2ovs

LuaJIT binding for Open vSwitch

The general idea is to provide the capability to interact as deeply as possible with Open vSwitch utilizing nothing more than the lua language.

Initially, there are largely straight forward ffi.cdef[[]] bindings for relevant parts of libopenvswitch.so, and libovsdb.so. The amount of ffi binding will only grow to the size necessary to use functions that are only implemented in 'C'. Over time, some of these bindings will turn into pur lua code, where it makes better sense.

Running things

Prerequisites You must have luajit (preferably 2.1) already installed on the machine. the testit.lua script is a convenient wrapper to execute your test code.

Running a simple test $ ./testit.lua testy/test_json.lua

The testit.lua script ensures the proper package.path is set, and otherwise just loads up the specified file using a loadstring(), and executes it.

To create an instance of an ovsdb database, for example:

```$ ./testit.lua testy/ovsdb_create.lua filename.db
```
You can’t perform that action at this time.