1REMCTL_SET_SOURCE_IP(3) remctl Library Reference REMCTL_SET_SOURCE_IP(3)
2
3
4
6 remctl_set_source_ip - Set source IP for remctl client connections
7
9 #include <remctl.h>
10
11 int remctl_set_source_ip(struct remctl *r, const char *source);
12
14 remctl_set_source_ip() sets the source IP address for subsequent calls
15 to remctl_open() on the same struct remctl object. Call this function
16 before remctl_open() if remctl client connections need to come from a
17 specific source IP.
18
19 The source parameter may be an IPv4 or IPv6 address (assuming the host
20 supports IPv6).
21
22 Be aware that if you set an IPv4 source address and then attempt to
23 connect to an IPv6 address or IPv6-only host, or if you set an IPv6
24 address and then attempt to connect to an IPv4 address or IPv4-only
25 host, you will get a connection failure error from remctl_open().
26
28 remctl_set_source_ip() returns true on success and false on failure.
29 On failure, the caller should call remctl_error() to retrieve the error
30 message.
31
33 This interface was added in version 3.0.
34
36 Russ Allbery <eagle@eyrie.org>
37
39 Copyright 2011, 2014 The Board of Trustees of the Leland Stanford
40 Junior University
41
42 Copying and distribution of this file, with or without modification,
43 are permitted in any medium without royalty provided the copyright
44 notice and this notice are preserved. This file is offered as-is,
45 without any warranty.
46
47 SPDX-License-Identifier: FSFAP
48
50 remctl_new(3), remctl_open(3), remctl_error(3)
51
52 The current version of the remctl library and complete details of the
53 remctl protocol are available from its web page at
54 <https://www.eyrie.org/~eagle/software/remctl/>.
55
56
57
583.18 2022-05-09 REMCTL_SET_SOURCE_IP(3)