[zeromq-dev] zmq based vpn

Benjamin Henrion zoobab at gmail.com
Thu Apr 16 14:43:54 CEST 2015


On Wed, Apr 1, 2015 at 10:54 AM, Benjamin Henrion <zoobab at gmail.com> wrote:
> Hi,
>
> Just found this github project written in lua which seems to
> encapsulate IP packets over ZMQ:
>
> https://github.com/Vger/simpletunnel
>
> I did not managed to make it work, maybe someone else can try it out?

I hit an error while trying to run it, and I have a hard time to
understand what this test does, in particular what "bit operation"
means in zmq:

==========================
local test_pollin
do
    local s, bit = pcall(require, "bit32")
    local POLLIN = zmq.POLLIN
    local EVENTS = zmq.EVENTS
    if s then
        function test_pollin(zmqskt)
            return bit.btest(zmqskt:getopt(EVENTS), POLLIN)
        end
    else
        s, bit = pcall(require, "bit")
        if s then
            function test_pollin(zmqskt)
                return bit.band(zmqskt:getopt(EVENTS), POLLIN) ~= 0
            end
        else
            error("No bit operations available")
        end
    end
end
==========================

When I run I have this error:

# lua tunendpoint.lua
lua: /usr/lib64/lua/luarocks/share/lua/5.1/zmq/copas.lua:28: No bit
operations available
stack traceback:
        [C]: in function 'error'
        /usr/lib64/lua/luarocks/share/lua/5.1/zmq/copas.lua:28: in main chunk
        [C]: in function 'require'
        tunendpoint.lua:17: in main chunk
        [C]: ?

-- 
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."



More information about the zeromq-dev mailing list