+#ifdef USE_WIN32API
+ /* Do nothing; the TCP serial operations will be initialized in
+ ser-mingw.c. */
+#else
+ struct serial_ops *ops;
+
+ ops = XMALLOC (struct serial_ops);
+ memset (ops, 0, sizeof (struct serial_ops));
+ ops->name = "tcp";
+ ops->next = 0;
+ ops->open = net_open;
+ ops->close = net_close;
+ ops->readchar = ser_base_readchar;
+ ops->write = ser_base_write;
+ ops->flush_output = ser_base_flush_output;
+ ops->flush_input = ser_base_flush_input;
+ ops->send_break = ser_tcp_send_break;
+ ops->go_raw = ser_base_raw;
+ ops->get_tty_state = ser_base_get_tty_state;
+ ops->copy_tty_state = ser_base_copy_tty_state;
+ ops->set_tty_state = ser_base_set_tty_state;
+ ops->print_tty_state = ser_base_print_tty_state;
+ ops->noflush_set_tty_state = ser_base_noflush_set_tty_state;
+ ops->setbaudrate = ser_base_setbaudrate;
+ ops->setstopbits = ser_base_setstopbits;
+ ops->drain_output = ser_base_drain_output;
+ ops->async = ser_base_async;
+ ops->read_prim = net_read_prim;
+ ops->write_prim = net_write_prim;
+ serial_add_interface (ops);
+#endif /* USE_WIN32API */
+
+ add_prefix_cmd ("tcp", class_maintenance, set_tcp_cmd, _("\
+TCP protocol specific variables\n\
+Configure variables specific to remote TCP connections"),
+ &tcp_set_cmdlist, "set tcp ",
+ 0 /* allow-unknown */, &setlist);
+ add_prefix_cmd ("tcp", class_maintenance, show_tcp_cmd, _("\
+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 for socket connection"), _("\
+Show timeout limit for socket connection"),
+ NULL, NULL, NULL,
+ &tcp_set_cmdlist, &tcp_show_cmdlist);