#include "smux.h"
#include "memory.h"
#include "linklist.h"
+#include "version.h"
static int agentx_enabled = 0;
{
if (!agentx_enabled)
{
- init_snmp("quagga");
+ init_snmp(FRR_SMUX_NAME);
events = list_new();
agentx_events_update ();
agentx_enabled = 1;
SNMP_CALLBACK_LOGGING,
agentx_log_callback,
NULL);
- init_agent ("quagga");
+ init_agent (FRR_SMUX_NAME);
install_node (&agentx_node, config_write_agentx);
install_element (CONFIG_NODE, &agentx_enable_cmd);
#define FRR_PAM_NAME "@PACKAGE_NAME@"
#define FRR_SMUX_NAME "@PACKAGE_NAME@"
+#define FRR_PTM_NAME "@PACKAGE_NAME@"
#define FRR_FULL_NAME "FreeRangeRouting"
#define FRR_VERSION "@PACKAGE_VERSION@" GIT_SUFFIX
/* Create VTY socket */
if (instance)
{
- sprintf(pid_file, "/var/run/quagga/ospfd-%d.pid", instance);
- sprintf(vty_path, "/var/run/quagga/ospfd-%d.vty", instance);
+ sprintf(pid_file, "%s/ospfd-%d.pid", DAEMON_VTY_DIR, instance);
+ sprintf(vty_path, "%s/ospfd-%d.vty", DAEMON_VTY_DIR, instance);
}
else
{
if (head_client->flag != VTYSH_OSPFD) return;
- /* ls /var/run/quagga/ and look for all files ending in .vty */
- dir = opendir("/var/run/quagga/");
+ /* ls DAEMON_VTY_DIR and look for all files ending in .vty */
+ dir = opendir(DAEMON_VTY_DIR "/");
if (dir)
{
while ((file = readdir(dir)) != NULL)
if (n == MAXIMUM_INSTANCES)
{
fprintf(stderr,
- "Parsing /var/run/quagga/, client limit(%d) reached!\n", n);
+ "Parsing %s/, client limit(%d) reached!\n",
+ DAEMON_VTY_DIR, n);
break;
}
client = (struct vtysh_client *) malloc(sizeof(struct vtysh_client));
client->name = "ospfd";
client->flag = VTYSH_OSPFD;
ptr = (char *) malloc(100);
- sprintf(ptr, "/var/run/quagga/%s", file->d_name);
+ sprintf(ptr, "%s/%s", DAEMON_VTY_DIR, file->d_name);
client->path = (const char *)ptr;
client->next = NULL;
vtysh_client_sorted_insert(head_client, client);
#if defined (HAVE_CUMULUS)
FILE *fp;
- fp = fopen("/var/run/quagga/watchquagga.started", "w");
+ fp = fopen(DAEMON_VTY_DIR "/watchquagga.started", "w");
fclose(fp);
#endif
zlog_notice ("Watchquagga: Notifying Systemd we are up and running");
#include "vrf.h"
#include "rib.h"
#include "zebra_vrf.h"
+#include "version.h"
#define ZEBRA_PTM_RECONNECT_TIME_INITIAL 1 /* initial reconnect is 1s */
#define ZEBRA_PTM_RECONNECT_TIME_MAX 300
ptm_cb.pid = getpid();
zebra_ptm_install_commands();
- sprintf(buf, "%s", "quagga");
+ sprintf(buf, "%s", FRR_PTM_NAME);
ptm_hdl = ptm_lib_register(buf, NULL, zebra_ptm_handle_msg_cb,
zebra_ptm_handle_msg_cb);
ptm_cb.wb = buffer_new(0);