patchWeeChat - Patches: patch #7992, Support IPv6 xfers


patch #7992: Support IPv6 xfers

Submitted by:  Andrew Potter <talisein>
Submitted on:  Tue 02 Apr 2013 10:15:45 PM UTC  
Category: xfer pluginPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Sebastien Helleu <flashcode>Open/Closed: Closed
IRC nick: talisein

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 09 Jan 2014 12:03:53 PM UTC, comment #2:

Thank you Andrew for the patch!

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Mon 02 Dec 2013 07:17:28 PM UTC, comment #1:

Updated patch no longer breaks the 80 char rule in struct xfer_t.
Before in the patch it was storing a struct sockaddr_storage for the remote/local_address; now the xfer_t holds a struct sockaddr* instead.

A xfer_set_remote_address() setter function was added to ensure sanity when modifying remote_address.

(file #29758)

Andrew Potter <talisein>
Tue 02 Apr 2013 10:15:45 PM UTC, original submission:

This patch depends on patch #7974

This patch adds support for IPv6 xfers.

There are two primary changes to weechat_network_connect_to():

  • Because a ulong obviously can't transfer an IPv6 address, struct addrinfo* is used instead, and the port parameter is unused as it would be redundant, ignored, or confusing.
  • Because the proxy may be at an IPv4 address and the target IPv6--or vice versa--the socket() call must be made in network_connect_to() so that it is created in the correct family. So network_connect_to() now returns the socket fd.

I could use some specific feedback in two areas:

  • I've changed remote_address and local_address to (struct addrinfo_storage). It could be (struct addrinfo*) instead, but I'm unsure which most desirable with regard to style.
  • I'd like to introduce a timeout parameter to network_connect_to(), a struct timeval* that select() would use in network_connect(). I don't know if that should be in a separate patch, or if you want all the API change at once.

As the patch is a little lengthy, it might be easier to leave line-by-line comments on github:

I've tested vanilla sending/receiving via IPv4 and IPv6, but not setting own_ip and using a proxy.

Andrew Potter <talisein>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #29758:  0001-xfer-Support-IPv6-DCC.patch added by talisein (43KiB - text/x-patch - Rebased commit.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by flashcode (Posted a comment)
  • -unavailable- added by talisein (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 09 Feb 2014 09:53:47 AM UTCflashcodeOpen/ClosedOpen=>Closed
    Thu 09 Jan 2014 12:03:53 PM UTCflashcodeStatusNone=>Done
      Assigned toNone=>flashcode
    Mon 02 Dec 2013 07:17:28 PM UTCtaliseinAttached File-=>Added 0001-xfer-Support-IPv6-DCC.patch, #29758
    Tue 02 Apr 2013 10:15:45 PM UTCtaliseinAttached File-=>Added 0002-xfer-Support-IPv6-DCC.patch, #27751

    Back to the top

    Powered by Savane 3.1-cleanup1