- struct serial_ops *ops = XMALLOC (struct serial_ops);
- memset (ops, sizeof (struct serial_ops), 0);
- ops->name = "tcp";
- ops->next = 0;
- ops->open = tcp_open;
- ops->close = tcp_close;
- ops->readchar = ser_unix_readchar;
- ops->write = ser_unix_write;
- ops->flush_output = ser_unix_nop_flush_output;
- ops->flush_input = ser_unix_flush_input;
- ops->send_break = ser_unix_nop_send_break;
- ops->go_raw = ser_unix_nop_raw;
- ops->get_tty_state = ser_unix_nop_get_tty_state;
- ops->set_tty_state = ser_unix_nop_set_tty_state;
- ops->print_tty_state = ser_unix_nop_print_tty_state;
- ops->noflush_set_tty_state = ser_unix_nop_noflush_set_tty_state;
- ops->setbaudrate = ser_unix_nop_setbaudrate;
- ops->setstopbits = ser_unix_nop_setstopbits;
- ops->drain_output = ser_unix_nop_drain_output;
- ops->async = ser_unix_async;
- serial_add_interface (ops);
+#ifdef USE_WIN32API
+ /* Do nothing; the TCP serial operations will be initialized in
+ ser-mingw.c. */
+#else
+ serial_add_interface (&tcp_ops);
+#endif /* USE_WIN32API */
+
+ add_basic_prefix_cmd ("tcp", class_maintenance, _("\
+TCP protocol specific variables.\n\
+Configure variables specific to remote TCP connections."),
+ &tcp_set_cmdlist, "set tcp ",
+ 0 /* allow-unknown */, &setlist);
+ add_show_prefix_cmd ("tcp", class_maintenance, _("\
+TCP protocol specific variables.\n\
+Configure variables specific to remote TCP connections."),
+ &tcp_show_cmdlist, "show tcp ",
+ 0 /* allow-unknown */, &showlist);
+
+ add_setshow_boolean_cmd ("auto-retry", class_obscure,
+ &tcp_auto_retry, _("\
+Set auto-retry on socket connect."), _("\
+Show auto-retry on socket connect."),
+ NULL, NULL, NULL,
+ &tcp_set_cmdlist, &tcp_show_cmdlist);
+
+ add_setshow_uinteger_cmd ("connect-timeout", class_obscure,
+ &tcp_retry_limit, _("\
+Set timeout limit in seconds for socket connection."), _("\
+Show timeout limit in seconds for socket connection."), _("\
+If set to \"unlimited\", GDB will keep attempting to establish a\n\
+connection forever, unless interrupted with Ctrl-c.\n\
+The default is 15 seconds."),
+ NULL, NULL,
+ &tcp_set_cmdlist, &tcp_show_cmdlist);