0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 16:45:51 +08:00

90 Commits

Author SHA1 Message Date
Simon Giesecke
af7df64ae7 Problem: mask and to_string member functions of tcp_address_mask_t are not referenced
Solution: remove them
2020-09-04 15:51:43 +02:00
Simon Giesecke
41e3f14d6a Problem: ptr/ref parameters and local variables are non-const but never modified
Solution: add const
2020-01-27 10:38:00 +01:00
Simon Giesecke
a83c57d0bb Problem: identifiers not conformant with naming convention
Solution: fix identifier names
2019-12-08 15:24:48 +01:00
Simon Giesecke
2759f459df Problem: C4267 warnings due to implicit conversion from size_t to int
Solution: change variable type to size_t
2019-02-12 03:47:26 -05:00
Simon Giesecke
74d62bb908 Problem: tcp address strings are dependent on locale
Solution: use sprintf instead of std::stringstream
Fixes #3385
2019-02-05 05:45:35 -05:00
Simon Giesecke
bbae67df89 Code style improvements 2018-08-10 15:36:31 +02:00
Simon Giesecke
a96a87f343 Problem: problematic atoi function is used (CERT ERR-34C)
Solution: use strtol instead
2018-05-30 10:35:01 +02:00
Simon Giesecke
273137741a Problem: protected data members in ip_address_t, ip_address_mask_t violates LSP
Solution: make ip_address_mask_t independent of ip_address_t, they do not share that much, remove some code duplication between ip_address_t and ip_addr_t
2018-05-30 10:28:14 +02:00
Simon Giesecke
a6060674b4 Problem: Magic numbers "32" and "128" in tcp_address.cpp
Solution: introduced constants
2018-05-28 17:53:43 +02:00
Simon Giesecke
e3c73d9881 Problem: inconsistent naming style for private data members, conflicts with naming of local variables and member functions
Solution: apply and check _lower_case naming style for private data members
2018-05-27 13:24:07 +02:00
Simon Giesecke
12a97bb769 Problem: redundant else after return
Solution: remove else
2018-05-26 09:34:45 +02:00
Simon Giesecke
c581f43c97 Problem: parameter naming style inconsistent
Solution: define and apply parameter naming style: lower_case_
2018-05-26 09:34:44 +02:00
Simon Giesecke
4e616f30dd Problem: C-style casts used
Solution: replace by C++-style casts
2018-05-18 17:04:01 +02:00
Lionel Flandrin
524affc4c3 Problem: UDP address parser uses ad hoc code to detect multicast address
Solution: factor the code into ip_resolver, add IPv6 support and unit tests.
2018-05-04 10:44:01 +02:00
Lionel Flandrin
4cd2c2ebf8 Problem: address parsing code is tied to the TCP code
Solution: Factor the code into a different file with a well defined API and add
unit tests.
2018-05-02 18:06:01 +02:00
Manuel Segura
4726f7262d Pull request to merge porting to WindRiver VxWorks 6.x (#2966)
* Problem: Still need to port over more files to VxWorks 6.x

Solution: Port more files to VxWorks 6.x

* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)

Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks

* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.

Solution:  Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
2018-03-10 11:03:02 +00:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
6853e3f935 Merge pull request #2514 from lytboris/freebsd-enable-ai_v4mapped
re-enable AI_V4MAPPED on FreeBSD & DragonFlyBSD
2017-04-09 10:24:50 +01:00
Boris Lytochkin
ef8b0c60fc re-enable AI_V4MAPPED on FreeBSD & DragonFlyBSD
Detect AI_V4MAPPED is not supported in getaddrinfo() on the fly
and retry query. This issue was seen on ancient FreeBSD releases
and current implementation does support this flag correctly.
2017-04-09 11:49:21 +03:00
Boris Lytochkin
2b1bbf1673 fix a typo - assigment was used instead of comparison 2017-04-09 11:37:22 +03:00
Boris Lytochkin
8bc92bde34 choose IP(v6) address based on ipv6_ flag in a correct way 2017-04-08 23:00:23 +03:00
bbdb68
1d58a00992 Problem: no windows UWP support
* add define for windows/UWP

* prevent issue with COM references

* gettickcount not available on uwp

* add compiler definitions

* add convenitnece cmake file

* brute force uwp compilation

* fix compiler version

* cosmetics
2017-04-04 09:50:33 +01:00
pavel.pimenov
4d6fbe17e0 "%" -> '%' 2016-12-10 17:27:42 +03:00
Caleb Epstein
10181d7641 Untabify 2016-11-15 14:33:47 -05:00
Dmitriy-GH
e7b12b3c2a Add WinXP compatibility
#define ZMQ_HAVE_WINDOWS_TARGET_XP  disable uncompatible WinAPI

1. Disable call if_indextoname()
2. Emulate windows Condition Variable API in class condition_variable_t with std::condition_variable
 	
This code can be compiled in MSVC 2015 with option "Platform toolset: Visual Studio 2015 - Windows XP (v140_xp)"
2016-11-02 15:44:27 +05:00
Phillip Mienk
28fbee74c8 Suppress warning on uninitialized variable use by initializing variable. 2016-10-31 12:25:30 -07:00
Juha Reunanen
bb7421dda2 Problem: Does not build in Visual Studio 2013 / Win32
Solution: #include <netioapi.h> and change some IP_ADAPTER_UNICAST_ADDRESS data types
2016-10-21 21:18:45 +03:00
Mário Kašuba
f6962903a7 Implemented network interface name resolution on Windows platform
Added fallback mechanism for specific socket binding on Windows platform with IPv6 enabled
2016-10-10 17:29:53 +02:00
yasirs
36af3edee2 Update tcp_address.cpp 2016-10-09 00:48:35 -04:00
Jim Garlick
d090a871bc Problem: getifaddrs can fail with ECONNREFUSED
getifaddrs() can fail transiently with ECONNREFUSED on Linux.
This has been observed with Linux 3.10 when multiple processes
call zmq::tcp_address_t::resolve_nic_name() simultaneously.

Before asserting in this case, make 10 attempts, with exponential
backoff, given by (1 msec * 2^i), where i is the attempt number.

Fixes #2051
2016-07-20 09:33:33 -07:00
Adam Seering
b1e2b87f0f On systems where getifaddrs() exists but isn't implemented, behave as if 'resolve_nic_name()' were entirely unsupported 2016-05-27 00:02:37 -04:00
Matt Powley
f2018ab317 Fixes for Windows XP compatibility
A Visual Studio build from master (commit id: dac5b45dfb224ff184a7aed39c5859ae5bac3803) using the v140_xp toolset yields a binary that is not XP compatible.

Two libraries contain exports that cannot be found:
 -  IPHLPAPI.DLL : if_nametoindex
 - KERNEL32.DLL : InitializeConditionVariable

The latter export is already dealt with in the file './src/condition_variable.hpp'; however this requires setting the _WIN32_WINNT pre-processor definition.
I am not experienced enough to figure a work around for the 'if_nametoindex' method, so I have created a new pre-processor definition 'ZMQ_HAVE_WINDOWS_TARGET_XP' and removed the calling of the function with the limitation that these builds cannot handle a IPv6 address with an adapter name.

To make it easier for people targeting XP with an MSVC build I have modified the MSBuild property file to add/modify the pre-processor definitions if they are building using a XP targeting tool set; such as v140_xp.
2016-03-31 15:45:00 +01:00
Jim Klimov
e9c8557e92 zeromq-4.1.4/src/tcp_address.cpp : fix relaxed use of sizeof() without parenthesis 2016-03-29 18:43:26 +02:00
Osiris
4a5af9d58b Problem: Precompiled headers not being used
Solution: Phase I - make precompiled.hpp be first file included in every source file
2016-02-18 10:56:52 -06:00
Pieter Hintjens
25ce52e449 Problem: tcp_address.cpp has messy include usage
It's all over the place.

Solution: remove duplicates and try to move main includes to start
of source. Also, include net/if.h always, so that the code will
compile if ZMQ_HAVE_IFADDRS isn't defined.
2016-02-12 11:01:52 +01:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Ilya Kulakov
6c9974770b Family is not set when resolving NIC on android.
Make it ready to enable ipv6 for AIX or HP/UX
2016-01-21 19:53:35 +06:00
Ilya Kulakov
e5894d5197 Fix missing headers which makes compilation fail on Android. 2016-01-21 13:44:01 +06:00
Laszlo Boszormenyi (GCS)
be5ab6d5c9 GNU/Hurd support 2016-01-16 02:26:20 +01:00
Sathish Yenna
7cfa93352e Add missing support for IPv6 link local addresses (which include % followed by the interface name) 2015-12-09 16:26:34 -06:00
Boris Lytochkin
a4baa36ba4 acutally allow specifying interfaces as source address 2015-10-27 00:37:53 +03:00
Joe Eli McIlvain
fb57110b94 Merge pull request #1577 from hintjens/master
Various cleanups for CLIENT-SERVER sockets
2015-09-11 14:24:51 -07:00
Pieter Hintjens
7be6ad0504 Replaced tabs in some files, with spaces 2015-09-11 13:03:31 -04:00
Constantin Rack
bd923f0fbb Problem: some comments contain typos 2015-09-06 18:46:32 +02:00
Markus Pfeiffer
ee984b1fe6 Make DragonFly a first class citizen in terms of compilation 2015-09-03 09:00:12 +01:00
Joe Eli McIlvain
33419425eb Problem: Private/internal macros defined in public header.
Solution: Move the macros to a private header.
2015-08-21 16:12:22 -07:00
reza.ebrahimi
63260d8701 rename ZMQ_UNUSED macro to LIBZMQ_UNUSED 2015-08-22 00:31:25 +04:30
reza.ebrahimi
bff2284a50 place a ZMQ_UNUSED macro and replace all unused variables with ZMQ_UNUSED macro 2015-08-14 15:40:39 +04:30
Kapp Arnaud
8ffd723271 Probably fix build issue on Solaris.
See #1220 recent comments. This change is untested yet seems
safe.
2015-06-13 22:08:14 +02:00
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00