Logo white

Peter M. Groen / libmodbus

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Commits 855
  • Compare
  • Branches 1
  • Tags 0
  • libmodbus
  • src
  • modbus-tcp.c
04 Oct, 2022
1 commit
  • New quirks handler (closes #38 #533) ...
    f0db03dd
    Useful functions when you are confronted with equipment which does
    not respect the protocol, which behaves strangely or when you wish
    to move away from the standard.
    
    Thank you @mhei for the great initial version.
    Stéphane Raimbault authored
    2022-10-04 01:39:41 +0200  
    Browse File »

03 Oct, 2022
1 commit
  • test the protocol id for 0 ...
    014a9fcd
    previous test would fail if one byte was non zero.
    Alexander Polleti authored
    2022-10-03 22:59:57 +0200  
    Browse File »

18 Aug, 2022
2 commits
  • Test socket against positive value instead of -1
    6914cf96
    Stéphane Raimbault authored
    2022-08-18 13:39:00 +0200  
    Browse File »
  • Remove year range in Copyright
    5ce6b8a9
    Stéphane Raimbault authored
    2022-08-18 00:27:50 +0200  
    Browse File »

17 Aug, 2022
1 commit
  • Reduce memory use of TCP PI backend (closes #621) ...
    ef3c4bc9
    - allocate exact memory required to store node and service strings
      instead of around 1kb of static memory.
    - accept NULL value of service to use default Modbus port number (502)
    - unit test updated
    
    The new documentation will be updated in another commit.
    Stéphane Raimbault authored
    2022-08-17 16:31:30 +0200  
    Browse File »

11 May, 2021
1 commit
  • Fix many typos ...
    d25150ac
    Thanks to @peternewman
    Stéphane Raimbault authored
    2021-05-11 00:55:51 +0200  
    Browse File »

02 Aug, 2019
1 commit
  • SPDX: change LGPL-2.1+ to LGPL-2.1-or-later ...
    820e15fa
    Since SPDX release 3.0 LGPL-2.1+ became LGPL-2.1-or-later. Hence
    replace the deprecated identifiers.
    Yegor Yefremov authored
    2019-08-02 12:07:53 +0100  
    Browse File »

05 Jun, 2018
1 commit
  • Rename type as flags for consistency between functions
    6c14b7fc
    Stéphane Raimbault authored
    2018-06-05 23:40:50 +0200  
    Browse File »

31 May, 2018
1 commit
  • Add missing SOCK_CLOEXEC flag on socket creation ...
    bba1b812
    Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
    Richard Genoud authored
    2018-05-31 11:27:43 +0200  
    Browse File »

07 Jun, 2017
1 commit
  • typo fix ...
    161d306f
    fixed small typo
    Vitaly Zhuravlev authored
    2017-06-07 09:34:24 +0200  
    Browse File »

22 Mar, 2017
1 commit
  • Handle out-of-memory conditions more gracefully ...
    c258137a
    Current code could dereference NULL pointer in case an inner
    malloc fails. Check for this and exit gracefully.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
    2017-03-22 22:27:35 +0100  
    Browse File »

12 Sep, 2016
1 commit
  • Move WINVER definition before other includes (#350)
    7acb7eaa
    Stéphane Raimbault authored
    2016-09-12 15:48:56 +0200  
    Browse File »

19 Jul, 2016
1 commit
  • tcp_modbus_accept mustn't close socket on error (closes #333) ...
    00e068eb
    The socket management belongs to the application.
    
    The return code was missing in modbus_tcp_pi_accept().
    Stéphane Raimbault authored
    2016-07-19 12:15:30 +0200  
    Browse File »

11 May, 2016
2 commits
  • Move setting of option inside the relevant conditional group
    10f92e2f
    Stéphane Raimbault authored
    2016-05-11 16:41:42 +0200  
    Browse File »
  • Fix "wildcard address" in TCP IPv6
    70b7c5d2
    Shoichi Sakane authored
    2016-05-11 11:43:38 +0200  
    Browse File »

16 Nov, 2015
1 commit
  • Define MSG_DONTWAIT to MSG_NONBLOCK on AIX (#294)
    988c9151
    Stéphane Raimbault authored
    2015-11-16 21:44:26 +0100  
    Browse File »

16 Sep, 2015
1 commit
  • Minor - Rename yes variable to enable
    1782fcc0
    Stéphane Raimbault authored
    2015-09-16 19:53:11 +0200  
    Browse File »

13 Feb, 2015
2 commits
  • Fix some coding style nitpicks ...
    9e612005
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
    2015-02-13 17:34:28 +0100  
    Browse File »
  • Introduce SPDX license identifiers ...
    09807f14
    This replaces the lengthy license text headers with a short
    and standardized license tag. See http://spdx.org for details.
    
    This is useful e.g. for license compliance tools which scan
    through files and generate a report of the licenses used
    in a project.
    
    Signed-off-by: Michael Heimpold <mhei@heimpold.de>
    Michael Heimpold authored
    2015-02-13 17:33:08 +0100  
    Browse File »

30 Jan, 2014
1 commit
  • Avoid twice connect() in source code (closes #194)
    29851c2f
    Stéphane Raimbault authored
    2014-01-30 00:52:40 +0100  
    Browse File »

28 Jan, 2014
3 commits
  • Fix TCP IPv4 modbus_connect() on win32 (closes #100 and #165) ...
    706fa6b2
    Thank you Petr Gladkiy and MarjanTomas.
    Sorry for the delay...
    Stéphane Raimbault authored
    2014-01-28 22:46:11 +0100  
    Browse File »
  • Fix 24a05ebd3c0 - win32: init of modbus_tcp_pi_listen (#187)
    7272fb09
    Stéphane Raimbault authored
    2014-01-28 22:39:25 +0100  
    Browse File »
  • INADDR_* macros are defined in host byte order ...
    270f02c8
    From Michael Heimpold:
    Just a nitpick: the INADDR_* macros are defined in host byte order,
    compare INADDR_LOOPBACK. So it would be reasonable to wrap this with
    htonl(INADDR_ANY). However, every experienced socket programmer should
    know that INADDR_ANY equals 0.0.0.0, passing it through htonl does not
    have any effect.
    Stéphane Raimbault authored
    2014-01-28 22:14:07 +0100  
    Browse File »

15 Jan, 2014
2 commits
  • Filter of IP addresses in IPv4 server (closes #190) ...
    c1665d40
    - protect against NULL IP address BTW
    - update documentation
    Stéphane Raimbault authored
    2014-01-15 23:33:20 +0100  
    Browse File »
  • Allow to listen any hosts in IPv6 (closes #32) ...
    8f1cc7b3
    - allow an empty string or NULL for node argument
    - protect against NULL in service argument
    - new test for NULL service
    - update documentation
    Stéphane Raimbault authored
    2014-01-15 23:33:20 +0100  
    Browse File »

09 Jan, 2014
1 commit
  • win32: init of modbus_tcp_pi_listen (#187)
    24a05ebd
    Stéphane Raimbault authored
    2014-01-09 10:40:18 +0100  
    Browse File »

20 Nov, 2013
1 commit
  • Fix response timeout modification on connect (closes #80) ...
    56653068
    Thanks to Perry Kundert for bug report and initial patches.
    Stéphane Raimbault authored
    2013-11-20 09:57:45 +0100  
    Browse File »

19 Nov, 2013
1 commit
  • Add check for protocol identifer in TCP mode
    6bc39ad9
    Stéphane Raimbault authored
    2013-11-19 18:04:51 +0100  
    Browse File »

10 Oct, 2013
2 commits
  • Use accept4 in TCP PI if available
    5c9598fb
    Stéphane Raimbault authored
    2013-10-10 19:44:52 +0200  
    Browse File »
  • Add documentation for tcp[_pi]_accept (closes #31)
    2076d11f
    Stéphane Raimbault authored
    2013-10-10 19:44:41 +0200  
    Browse File »

22 May, 2013
2 commits
  • Rename 'socket' variables to 's' to avoid warning on Windows
    f7799a4f
    Stéphane Raimbault authored
    2013-05-22 23:45:30 +0200  
    Browse File »
  • Use a unsigned long for ioctlsocket on Windows
    f720851a
    Stéphane Raimbault authored
    2013-05-22 23:25:42 +0200  
    Browse File »

10 May, 2013
2 commits
  • Always set socket to -1 on close()
    d8aa5a42
    Stéphane Raimbault authored
    2013-05-10 01:07:02 +0200  
    Browse File »
  • Protect all public functions against invalid context ...
    55d9a371
    - change return argument from void to int
    - update documentation
    Stéphane Raimbault authored
    2013-05-10 00:53:48 +0200  
    Browse File »

01 May, 2013
1 commit
  • Safer modbus_close
    e6b64888
    Stéphane Raimbault authored
    2013-05-01 15:57:51 +0200  
    Browse File »

25 Mar, 2013
1 commit
  • Include winsock2.h before ws2tcpip.h for VS 2005 ...
    3b4d8126
    Thanks to Petr Gladkiy
    Stéphane Raimbault authored
    2013-03-25 11:35:38 +0100  
    Browse File »

25 Feb, 2013
1 commit
  • Avoid C99 declaration in win32 section code (closes #92) ...
    c4290368
    Thanks to oldfaber and endrelovas.
    Stéphane Raimbault authored
    2013-02-25 02:15:22 +0100  
    Browse File »

22 Jan, 2013
1 commit
  • Another quick workaround for deficient OS (closes #63) ...
    34ec939a
    It will better to code something such as:
    https://github.com/crossroads-io/libxs/blob/master/src/err.cpp
    
    I don't intend to rewrite glib neither :(
    Stéphane Raimbault authored
    2013-01-22 23:55:41 +0100  
    Browse File »

07 Jan, 2013
2 commits
  • Remove blank line from previous commit
    1b0f4420
    Stéphane Raimbault authored
    2013-01-07 14:19:06 +0100  
    Browse File »
  • Use nonblocking sockets on Win32 and OS X/iOS too
    ad362fc1
    Julian Raschke authored
    2013-01-07 14:17:06 +0100  
    Browse File »