Skip to content

Commit

Permalink
send TCP data also to UDP, which makes loco updates from M*rklin Soft…
Browse files Browse the repository at this point in the history
…ware to Rocrail working
  • Loading branch information
GBert committed Dec 1, 2015
1 parent 5d76e9d commit 2f1f03b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion can2udp/README.md
Expand Up @@ -23,7 +23,7 @@ Usage: can2udp -l \<port\> -d \<port\> -i \<can interface\>
</pre></code>
<pre><code>
Usage: can2lan -c \<config_dir\> -u \<udp_port\> -t \<tcp_port\> -d \<udp_dest_port\> -i \<can interface\>
Version 1.03
Version 1.04
-c \<config_dir\> set the config directory
-u \<port\> listening UDP port for the server - default 15731
-t \<port\> listening TCP port for the server - default 15731
Expand Down
4 changes: 3 additions & 1 deletion can2udp/src/can2lan.c
Expand Up @@ -31,7 +31,7 @@ int verbose, ms1_workaround;

void print_usage(char *prg) {
fprintf(stderr, "\nUsage: %s -c <config_dir> -u <udp_port> -t <tcp_port> -d <udp_dest_port> -i <can interface>\n", prg);
fprintf(stderr, " Version 1.03\n\n");
fprintf(stderr, " Version 1.04\n\n");
fprintf(stderr, " -c <config_dir> set the config directory\n");
fprintf(stderr, " -u <port> listening UDP port for the server - default 15731\n");
fprintf(stderr, " -t <port> listening TCP port for the server - default 15731\n");
Expand Down Expand Up @@ -540,6 +540,8 @@ int main(int argc, char **argv) {
else
print_can_frame(TCP_FORMAT_STRG, &netframe[i], verbose & !background);
}
net_to_net(sb, (struct sockaddr *)&baddr, netframe, 13);
print_can_frame(UDP_FORMAT_STRG, netframe, verbose & !background);
}
}
}
Expand Down

0 comments on commit 2f1f03b

Please sign in to comment.