diff --git a/include/VPN.h b/include/VPN.h index 11cd4a7..83b20fc 100644 --- a/include/VPN.h +++ b/include/VPN.h @@ -48,9 +48,9 @@ typedef String ** STRING_INOUT; /* calls */ -INT32 VPN_close(AppServerClient * client, INT32 fd); -INT32 VPN_connect(AppServerClient * client, UINT32 protocol, STRING name); -INT32 VPN_recv(AppServerClient * client, INT32 fd, BUFFER_IN buf, UINT32 size, UINT32 flags); -INT32 VPN_send(AppServerClient * client, INT32 fd, BUFFER_OUT buf, UINT32 size, UINT32 flags); +INT32 VPN_close(App * app, AppServerClient * client, INT32 fd); +INT32 VPN_connect(App * app, AppServerClient * client, UINT32 protocol, STRING name); +INT32 VPN_recv(App * app, AppServerClient * client, INT32 fd, BUFFER_IN buf, UINT32 size, UINT32 flags); +INT32 VPN_send(App * app, AppServerClient * client, INT32 fd, BUFFER_OUT buf, UINT32 size, UINT32 flags); #endif /* !VPN_VPN_H */ diff --git a/src/vpn.c b/src/vpn.c index 92e291c..f68044d 100644 --- a/src/vpn.c +++ b/src/vpn.c @@ -70,7 +70,7 @@ static VPNClient * _client_remove_socket(VPNClient * client, int32_t fd); /* vpn */ int vpn(AppServerOptions options) { - if((_appserver = appserver_new(options, "VPN", NULL)) == NULL) + if((_appserver = appserver_new(NULL, options, "VPN", NULL)) == NULL) { error_print(PACKAGE); return 1; @@ -85,7 +85,7 @@ int vpn(AppServerOptions options) /* interface */ /* VPN_close */ -int32_t VPN_close(AppServerClient * asc, int32_t fd) +int32_t VPN_close(App * app, AppServerClient * asc, int32_t fd) { VPNClient * client; int32_t ret; @@ -103,7 +103,7 @@ int32_t VPN_close(AppServerClient * asc, int32_t fd) /* VPN_connect */ -int32_t VPN_connect(AppServerClient * asc, uint32_t protocol, +int32_t VPN_connect(App * app, AppServerClient * asc, uint32_t protocol, String const * uri) { int32_t ret; @@ -143,7 +143,7 @@ int32_t VPN_connect(AppServerClient * asc, uint32_t protocol, /* VPN_recv */ -int32_t VPN_recv(AppServerClient * asc, int32_t fd, Buffer * buffer, +int32_t VPN_recv(App * app, AppServerClient * asc, int32_t fd, Buffer * buffer, uint32_t size, uint32_t flags) { int32_t ret; @@ -172,7 +172,7 @@ int32_t VPN_recv(AppServerClient * asc, int32_t fd, Buffer * buffer, /* VPN_send */ -int32_t VPN_send(AppServerClient * asc, int32_t fd, Buffer * buffer, +int32_t VPN_send(App * app, AppServerClient * asc, int32_t fd, Buffer * buffer, uint32_t size, uint32_t flags) { if(_client_check(asc, fd) == NULL) diff --git a/tools/libvpn.c b/tools/libvpn.c index 24f6b29..d7c9e42 100644 --- a/tools/libvpn.c +++ b/tools/libvpn.c @@ -76,7 +76,7 @@ static void _libvpn_init(void) exit(1); } dlclose(hdl); - if((_appclient = appclient_new("VPN", NULL)) == NULL) + if((_appclient = appclient_new(NULL, "VPN", NULL)) == NULL) { error_print(PROGNAME); exit(1);