int VSL_NextLog(struct VSL_data *lh, unsigned char **pp);
int VSL_Arg(struct VSL_data *vd, int arg, const char *opt);
struct varnish_stats *VSL_OpenStats(const char *varnish_name);
+const char *VSL_Name(void);
extern const char *VSL_tags[256];
/* instance.c */
static int vsl_fd;
static struct shmloghead *vsl_lh;
+static char vsl_name[PATH_MAX];
static int vsl_nextlog(struct VSL_data *vd, unsigned char **pp);
{
int i;
struct shmloghead slh;
- char name[PATH_MAX], dirname[PATH_MAX], logname[PATH_MAX];
+ char dirname[PATH_MAX], logname[PATH_MAX];
if (vsl_lh != NULL)
return (0);
- if (varnish_instance(varnish_name, name,
- sizeof name, dirname, sizeof dirname) != 0) {
+ if (varnish_instance(varnish_name, vsl_name,
+ sizeof vsl_name, dirname, sizeof dirname) != 0) {
fprintf(stderr, "Invalid instance name: %s\n",
strerror(errno));
return (1);
return (&vsl_lh->stats);
}
+const char *
+VSL_Name(void)
+{
+
+ return (vsl_name);
+}