Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
CURLOPT_INTERFACE(3) | curl_easy_setopt options | CURLOPT_INTERFACE(3) |
NAME
CURLOPT_INTERFACE - source interface for outgoing trafficSYNOPSIS
#include <curl/curl.h>DESCRIPTION
Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name.DEFAULT
NULL, use whatever the TCP stack finds suitablePROTOCOLS
AllEXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); curl_easy_setopt(curl, CURLOPT_INTERFACE, "eth0"); ret = curl_easy_perform(curl); curl_easy_cleanup(curl); }
AVAILABILITY
The "if!" and "host!" syntax was added in 7.24.0.RETURN VALUE
Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_SOCKOPTFUNCTION(3), CURLOPT_TCP_NODELAY(3),June 18, 2018 | libcurl 7.69.0 |