};
/* isisd options */
+#define OPTION_VTYSOCK 1000
struct option longopts[] = {
{"daemon", no_argument, NULL, 'd'},
{"config_file", required_argument, NULL, 'f'},
{"socket", required_argument, NULL, 'z'},
{"vty_addr", required_argument, NULL, 'A'},
{"vty_port", required_argument, NULL, 'P'},
+ {"vty_socket", required_argument, NULL, OPTION_VTYSOCK},
{"user", required_argument, NULL, 'u'},
{"group", required_argument, NULL, 'g'},
{"version", no_argument, NULL, 'v'},
/* isisd program name. */
char *progname;
+/* VTY Socket prefix */
+char vty_sock_path[MAXPATHLEN] = ISIS_VTYSH_PATH;
+
int daemon_mode = 0;
/* Master of threads. */
-z, --socket Set path of zebra socket\n\
-A, --vty_addr Set vty's bind address\n\
-P, --vty_port Set vty's port number\n\
+ --vty_socket Override vty socket path\n\
-u, --user User to run as\n\
-g, --group Group to run as\n\
-v, --version Print program version\n\
struct thread thread;
char *config_file = NULL;
char *vty_addr = NULL;
+ char *vty_sock_name;
int dryrun = 0;
/* Get the programname without the preceding path. */
vty_port = atoi (optarg);
vty_port = (vty_port ? vty_port : ISISD_VTY_PORT);
break;
+ case OPTION_VTYSOCK:
+ set_socket_path(vty_sock_path, ISIS_VTYSH_PATH, optarg, sizeof (vty_sock_path));
+ break;
case 'u':
isisd_privs.user = optarg;
break;
pid_output (pid_file);
/* Make isis vty socket. */
- vty_serv_sock (vty_addr, vty_port, ISIS_VTYSH_PATH);
+ vty_serv_sock (vty_addr, vty_port, vty_sock_path);
/* Print banner. */
zlog_notice ("Quagga-ISISd %s starting: vty@%d", FRR_VERSION, vty_port);