Lines Matching defs:path
48 char path[sizeof(((struct sockaddr_un *)0)->sun_path)];
480 static char path[PATH_MAX];
481 snprintf(path, sizeof(path), "%s/dpdk_telemetry.v%d",
483 return path;
489 if (v2_socket.path[0])
490 unlink(v2_socket.path);
491 if (v1_socket.path[0])
492 unlink(v1_socket.path);
496 create_socket(char *path)
505 strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
506 TMTY_LOG_LINE(DEBUG, "Attempting socket bind to path '%s'", path);
511 TMTY_LOG_LINE(DEBUG, "Initial bind to socket '%s' failed.", path);
571 if ((size_t) snprintf(v1_socket.path, sizeof(v1_socket.path),
572 "%s/telemetry", socket_dir) >= sizeof(v1_socket.path)) {
573 TMTY_LOG_LINE(ERR, "Error with socket binding, path too long");
576 v1_socket.sock = create_socket(v1_socket.path);
578 v1_socket.path[0] = '\0';
587 unlink(v1_socket.path);
588 v1_socket.path[0] = '\0';
601 char spath[sizeof(v2_socket.path)];
615 TMTY_LOG_LINE(ERR, "Error with socket binding, path too long");
618 memcpy(v2_socket.path, spath, sizeof(v2_socket.path));
620 v2_socket.sock = create_socket(v2_socket.path);
624 v2_socket.path[0] = '\0'; /* clear socket path */
627 /* add a suffix to the path if the basic version fails */
628 if (snprintf(v2_socket.path, sizeof(v2_socket.path), "%s:%d",
629 spath, ++suffix) >= (int)sizeof(v2_socket.path)) {
630 TMTY_LOG_LINE(ERR, "Error with socket binding, path too long");
633 v2_socket.sock = create_socket(v2_socket.path);
641 unlink(v2_socket.path);
642 v2_socket.path[0] = '\0';