Looking For API To Start VPN Connection With Java
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 05:26 AM - edited 02-21-2020 02:31 PM
I am looking for a Cisco API that will allow me to programatically initiate a VPN connection through the Cisco software. I have the software and am able to use the Cisco user interface to create a VPN. Now, I want to be able to write a Java program that will do the same.
I am looking to have my Java program create the VPN connection - through the Cisco software. Then another program will be able to transfer it's data to the main data center. I need my own program to initiate the VPN connection because this will be done unmanned on a regular, scheduled, basis.
Thoughts?
- Labels:
-
Other VPN Topics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2006 05:46 AM
This URL should help you:
http://www.cisco.com/en/US/products/sw/netmgtsw/ps2327/prod_release_note09186a0080080604.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 10:38 AM
I have the API and have been working on building a Java JNI process. I have the Java parts working but I seem to be having a problem with the C++ program that will call the Cisco API. I am getting the following link errors when I do the following code. This has to be something simple. If I comment the setProfile statement the program compiles and links fine. I am assuming I need some link setting that I am just missing.
Ed
============source code==========================
const char *pProfile = env->GetStringUTFChars(strProfile, &iscopy);
connect.setProfile(pProfile);
===============Link errors =========================
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string
already defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string
y defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall std::basic_string
DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: class std::basic_string
td::basic_string
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: class std::basic_string
nst *,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z) already defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string
lready defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: bool __thiscall std::basic_string
_NI_N@Z) already defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: class std::basic_string
int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in NativeVPNChannel.obj
msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string
y defined in NativeVPNChannel.obj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 11:45 AM
After further research it seems this is something to do with linking a static library with a dynamic library. I am trying to create a DLL that can be used more than one time with the parameters passed in. I assume this is not compatible with the API? The only example is an executable that calls the API. Surely there must be a way to have my DLL call the Cisco API without getting link errors? As mentioned before, if I remove the setprofile statement and only have a connect it works fine - no link errors. So what is unique about the setProfile method?
This is very frustrating since it feels I am so close.
