martin-ger / esp-open-lwip

ESP8266 lwIP library with NAT, SLIP, ENC28j60 Ethernet, and routing support
67 stars 25 forks source link

How to call TUNIF interface's functions? #5

Closed TridentTD closed 6 years ago

TridentTD commented 6 years ago

When I include #include "netif/tunif.h"
and try to call some funtions such as

tunif_add_dns(134744072); // ip 8.8.8.8

It occurs some errors like

 tunif.c:(.text+0x70): undefined reference to `event_add'
 tunif.c:(.text+0x94): undefined reference to `event_add'
 tunif.c:(.text+0xc4): undefined reference to `event_del'
 tunif.c:(.text+0xc8): undefined reference to `event_free'
 tunif.c:(.text+0xdb): undefined reference to `event_del'
 tunif.c:(.text+0xe4): undefined reference to `event_free'
martin-ger commented 6 years ago

As said in the docs: The tunif device his skeleton driver needs at least some additional load/unload functions to be useful for anything. It is intended as starting point for a tunnel device, e.g. for some kind of VPN tunnel.

These missing functions are needed to do anything (e.g. put the packets in a TCP stream)

TridentTD commented 6 years ago

Thank you.