summaryrefslogtreecommitdiff
path: root/lib/sockopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sockopt.c')
-rw-r--r--lib/sockopt.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index e661b4cc56..2a9f907cb3 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -29,29 +29,6 @@
#include "sockopt.h"
#include "sockunion.h"
-/* Replace the path of given defaultpath with newpath, but keep filename */
-void
-set_socket_path (char *path, const char *defaultpath, char *newpath, int maxsize)
-{
- const char *sock_name;
-
- sock_name = strrchr(defaultpath, '/');
- if (sock_name)
- /* skip '/' */
- sock_name++;
- else
- /*
- * VTYSH_PATH configured as relative path
- * during config? Should really never happen for
- * sensible config
- */
- sock_name = defaultpath;
-
- strlcpy (path, newpath, maxsize);
- strlcat (path, "/", maxsize);
- strlcat (path, sock_name, maxsize);
-}
-
void
setsockopt_so_recvbuf (int sock, int size)
{
@@ -109,7 +86,6 @@ getsockopt_cmsg_data (struct msghdr *msgh, int level, int type)
return NULL;
}
-#ifdef HAVE_IPV6
/* Set IPv6 packet info to the socket. */
int
setsockopt_ipv6_pktinfo (int sock, int val)
@@ -221,7 +197,6 @@ setsockopt_ipv6_tclass(int sock, int tclass)
#endif
return ret;
}
-#endif /* HAVE_IPV6 */
/*
* Process multicast socket options for IPv4 in an OS-dependent manner.
@@ -467,11 +442,9 @@ setsockopt_ifindex (int af, int sock, ifindex_t val)
case AF_INET:
ret = setsockopt_ipv4_ifindex (sock, val);
break;
-#ifdef HAVE_IPV6
case AF_INET6:
ret = setsockopt_ipv6_pktinfo (sock, val);
break;
-#endif
default:
zlog_warn ("setsockopt_ifindex: unknown address family %d", af);
}
@@ -558,11 +531,9 @@ getsockopt_ifindex (int af, struct msghdr *msgh)
case AF_INET:
return (getsockopt_ipv4_ifindex (msgh));
break;
-#ifdef HAVE_IPV6
case AF_INET6:
return (getsockopt_ipv6_ifindex (msgh));
break;
-#endif
default:
zlog_warn ("getsockopt_ifindex: unknown address family %d", af);
return 0;
@@ -669,7 +640,6 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
return 0;
}
-#ifdef HAVE_IPV6
/* If this does not work, then all users of this sockopt will need to
* differentiate between IPv4 and IPv6, and keep seperate sockets for
* each.
@@ -686,7 +656,6 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
su2->sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
memcpy (&su2->sin6.sin6_addr.s6_addr32[3], &su->sin.sin_addr, 4);
}
-#endif
}
memset (&md5sig, 0, sizeof (md5sig));