rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
217 stars 137 forks source link

Support IPv6 #213

Closed petrkr closed 3 months ago

petrkr commented 3 months ago

Redone TCP connect function. Get rid of deprecated gethostbyname function and replaced it by getaddrinfo, which makes also work IPv6 out-of-box.

Tested

All working.

petrkr commented 3 months ago

Rebased to latest master, added port range check, put max size to definition, use snprintf instead of sprintf. Updated code style to match rest of code