Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

switched to modbus_new_tcp_pi#50

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
v-zhuravlev wants to merge4 commits intomaster
base:master
Choose a base branch
Loading
fromdns
Open

switched to modbus_new_tcp_pi#50

v-zhuravlev wants to merge4 commits intomasterfromdns

Conversation

@v-zhuravlev
Copy link
Owner

would implement#48 when done

@v-zhuravlevv-zhuravlevforce-pushed thedns branch 14 times, most recently from48274bc toec48accCompareSeptember 24, 2018 09:53
@v-zhuravlev
Copy link
OwnerAuthor

v-zhuravlev commentedSep 24, 2018
edited
Loading

DNS is now supported in both TCP and RTU over TCP modes. Latter is supported thanks to@myssta version of the patch I merged into v-zhuravlev/libmodbus.
Here are the tests that checks that DNS resolution is working:

https://github.com/v-zhuravlev/libzbxmodbus/blob/dns/tests/test_00modbus_connection_string.py#L23-L31

TCP port may also be redefined (from Modbus default 502) if needed:`enc://192.168.1.1:5000`

Note: DNS names are not supported for TCP and RTU over TCP
TCP port may also be redefined (from Modbus default 502) if needed:`enc://192.168.1.1:5000`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Trailing spaces. :)


charhost[100];
intport=MODBUS_TCP_DEFAULT_PORT;
charport_str[10];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

sprintf()ingMAX_INT can overflow this buffer.

{
*lock_required_out=1;
con_string+=strlen("enc://");
sscanf(con_string,"%99[^:]:%99d[^\n]",host,&port);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why don't we just readport as%s?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@i-kyi-kyi-ky requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@v-zhuravlev@i-ky

[8]ページ先頭

©2009-2025 Movatter.jp