From c915f11eb4922e154e29cf62d3b549d65c06a170 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 3 Feb 2016 04:09:14 +0000 Subject: connect & http: support -4 and -6 switches for remote operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes it is necessary to force IPv4-only or IPv6-only operation on networks where name lookups may return a non-routable address and stall remote operations. The ssh(1) command has an equivalent switches which we may pass when we run them. There may be old ssh(1) implementations out there which do not support these switches; they should report the appropriate error in that case. rsync support is untouched for now since it is deprecated and scheduled to be removed. Signed-off-by: Eric Wong Reviewed-by: Torsten Bögershausen Signed-off-by: Junio C Hamano --- transport.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'transport.h') diff --git a/transport.h b/transport.h index 8ebaaf2ca..c68140892 100644 --- a/transport.h +++ b/transport.h @@ -18,6 +18,12 @@ struct git_transport_options { struct push_cas_option *cas; }; +enum transport_family { + TRANSPORT_FAMILY_ALL = 0, + TRANSPORT_FAMILY_IPV4, + TRANSPORT_FAMILY_IPV6 +}; + struct transport { struct remote *remote; const char *url; @@ -110,6 +116,8 @@ struct transport { * actually turns out to be smart. */ struct git_transport_options *smart_options; + + enum transport_family family; }; #define TRANSPORT_PUSH_ALL 1 -- cgit v1.2.1