[PATCH 0/5] transport: unify ipv4 and ipv6 code paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

These patches eliminate some ifdef-ery concerning NO_IPV6.  I used
them when writing the SRV patch, which applies on top, but it's
probably best to think of it as an independent topic.

Patch 4 is the heart of the series.  It provides an interface similar
to getaddrinfo that can be implemented on top of either gethostbyname
or getaddrinfo and puts each implementation in a separate file.  This
way, callers can just use the common API and they do not need to have
two copies of their code, one for each host resolution API.

Patches 1-3 move code around until all the code that patch 4 touches
is in one place.

Patches 5 is a potential error handling improvement noticed while
writing patches 1-4.  It's probably not actually needed but it was a
comfort to me.

These patches have been in use in Debian since June of last year.  I'd
like to see this in mainline early in the 1.7.11 cycle to make coding
that touches this area during that cycle more pleasant.  Thoughts of
all kinds welcome.

Jonathan Nieder (5):
  transport: expose git_tcp_connect and friends in new tcp.h
  daemon: make host resolution into a separate function
  daemon: move locate_host() to tcp.c
  tcp: unify ipv4 and ipv6 code paths
  daemon: check for errors retrieving IP address

 Makefile   |    7 ++
 connect.c  |  277 +-----------------------------------------------------------
 daemon.c   |   58 ++-----------
 dns-ipv4.c |   33 ++++++++
 dns-ipv4.h |   68 +++++++++++++++
 dns-ipv6.c |   49 +++++++++++
 dns-ipv6.h |   31 +++++++
 tcp.c      |  217 +++++++++++++++++++++++++++++++++++++++++++++++
 tcp.h      |   11 +++
 9 files changed, 422 insertions(+), 329 deletions(-)
 create mode 100644 dns-ipv4.c
 create mode 100644 dns-ipv4.h
 create mode 100644 dns-ipv6.c
 create mode 100644 dns-ipv6.h
 create mode 100644 tcp.c
 create mode 100644 tcp.h
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]