Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
include openconnect_get_protocol method for completeness
  • Loading branch information
dlenski committed Aug 5, 2018
1 parent 65de037 commit 760beff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions libopenconnect.map.in
Expand Up @@ -94,6 +94,7 @@ OPENCONNECT_5_4 {

OPENCONNECT_5_5 {
global:
openconnect_get_protocol;
openconnect_get_supported_protocols;
openconnect_free_supported_protocols;
} OPENCONNECT_5_4;
Expand Down
5 changes: 5 additions & 0 deletions library.c
Expand Up @@ -189,6 +189,11 @@ void openconnect_free_supported_protocols(struct oc_vpn_proto *protos)
free((void *)protos);
}

const char *openconnect_get_protocol(struct openconnect_info *vpninfo)
{
return vpninfo->proto->name;
}

int openconnect_set_protocol(struct openconnect_info *vpninfo, const char *protocol)
{
const struct vpn_proto *p;
Expand Down
2 changes: 2 additions & 0 deletions openconnect.h
Expand Up @@ -39,6 +39,7 @@ extern "C" {
* API version 5.5:
* - Add openconnect_get_supported_protocols()
* - Add openconnect_free_supported_protocols()
* - Add openconnect_get_protocol()
*
* API version 5.4 (v7.08; 2016-12-13):
* - Add openconnect_set_pass_tos()
Expand Down Expand Up @@ -664,6 +665,7 @@ int openconnect_has_system_key_support(void);
/* Query and select from among supported protocols */
int openconnect_get_supported_protocols(struct oc_vpn_proto **protos);
void openconnect_free_supported_protocols(struct oc_vpn_proto *protos);
const char *openconnect_get_protocol(struct openconnect_info *vpninfo);
int openconnect_set_protocol(struct openconnect_info *vpninfo, const char *protocol);

struct addrinfo;
Expand Down

0 comments on commit 760beff

Please sign in to comment.