Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ZMQ_TOS work with IPv6 sockets #2209

Merged
merged 1 commit into from
Nov 14, 2016
Merged

Make ZMQ_TOS work with IPv6 sockets #2209

merged 1 commit into from
Nov 14, 2016

Commits on Nov 14, 2016

  1. Make ZMQ_TOS work with IPv6 sockets

    Summary:
    To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket
    option. However this only works for v4 sockets. Considering things are moving to
    IPv6 heavily (especially within enterprise networks), ZMQ should support setting
    `traffic class` for v6 based on `ZMQ_TOS`.
    
    There is a subtle difference between v4 and v6 in terms of the positioning of
    field but TOS has same meaning in both v4 and v6. Linux provides following APIs
    for v4/v6 to set TOS field value.
    ```
    // For v4
    setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos));
    
    // For v6
    setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos));
    ```
    
    Test Plan:
    Make sure Cmake works fine and all tests passes.
    Imported this change to `OpenR` project and tested on our local testbed.
    Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets
    pairs. Verify that `TCLASS` value is set as per expectation.
    
    Tasks: zeromq#2208
    saifhhasan committed Nov 14, 2016
    Configuration menu
    Copy the full SHA
    fc8007e View commit details
    Browse the repository at this point in the history