Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The problem with the interprocess communication

The problem with the interprocess communication

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 759 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt programmer
    wrote on last edited by
    #1

    Hello! I am really sorry for my bad English.

    I'm trying to create a program that will make connection with network device (switch) via TELNET protocol and execute some device configuration.

    To establish TELNET connection, my program uses another program, - "Netcat". I want to use switch output (Netcat's output stream) to control configuration process (check switch answers to my commands) and Netcat's input stream, to control switch.

    Here is my simple test program to explore this possibility:

    @#include <QCoreApplication>
    #include <QProcess>
    #include <QTimer>

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);
    QProcess *telnet = new QProcess;
    telnet->setProcessChannelMode(QProcess::MergedChannels);
    telnet->setProcessChannelMode(QProcess::ForwardedChannels);

    QString location = "C:/Users/Konstantin/Desktop/nc111nt/nc";
    QStringList arguments;
    arguments << "-t" << "10.50.15.254" << "23";
    
    telnet->start(location, arguments);
    if(!telnet->waitForStarted())
    {
        return 1;
    }
    
    return a.exec&#40;&#41;;
    

    }@

    So, in Wireshark program I see, that Netcat establish TELNET connection with 10.50.15.254, but my program doesn't show switch command promt at runtime.

    When I stop debugging process in Qt Creator, I see, that my program show switch command promt.

    Please, help me establish a process of exchange of information between Netcat program and my program at runtime.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved