aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index a4bd0f509..f17213f79 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1222,13 +1222,26 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.crlf = va_arg(param, long)?TRUE:FALSE;
break;
+
case CURLOPT_INTERFACE:
/*
- * Set what interface to bind to when performing an operation and thus
- * what from-IP your connection will use.
+ * Set what interface or address/hostname to bind the socket to when
+ * performing an operation and thus what from-IP your connection will use.
*/
data->set.device = va_arg(param, char *);
break;
+ case CURLOPT_LOCALPORT:
+ /*
+ * Set what local port to bind the socket to when performing an operation.
+ */
+ data->set.localport = (unsigned short) va_arg(param, long);
+ break;
+ case CURLOPT_LOCALPORTRANGE:
+ /*
+ * Set number of local ports to try, starting with CURLOPT_LOCALPORT.
+ */
+ data->set.localportrange = (int) va_arg(param, long);
+ break;
case CURLOPT_KRB4LEVEL:
/*
* A string that defines the krb4 security level.