summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-27 10:41:46 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 13:00:24 +0200
commit2436ec2928d1aac0e6fd885ca1b9cdecef8bf89a (patch)
treed1ae1e929ffa2860eae4ba0ec3fb85f8874dfe51 /lib/tsocket/tsocket.h
parente1596bbf27ee636d8ab47e39eda21c64ef49b671 (diff)
downloadsamba-2436ec2928d1aac0e6fd885ca1b9cdecef8bf89a.tar.gz
samba-2436ec2928d1aac0e6fd885ca1b9cdecef8bf89a.tar.bz2
samba-2436ec2928d1aac0e6fd885ca1b9cdecef8bf89a.zip
lib/tsocket: add tsocket_address_is_unix() function
metze
Diffstat (limited to 'lib/tsocket/tsocket.h')
-rw-r--r--lib/tsocket/tsocket.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index a008fd8232..d4f9e872d3 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -575,6 +575,16 @@ uint16_t tsocket_address_inet_port(const struct tsocket_address *addr);
int tsocket_address_inet_set_port(struct tsocket_address *addr,
uint16_t port);
+/**
+ * @brief Find out if the tsocket_address represents an unix domain endpoint.
+ *
+ * @param[in] addr The tsocket_address pointer
+ *
+ * @return true if addr represents an unix domain endpoint,
+ * otherwise false.
+ */
+bool tsocket_address_is_unix(const struct tsocket_address *addr);
+
#ifdef DOXYGEN
/**
* @brief Create a tsocket_address for a unix domain endpoint addresses.
@@ -586,6 +596,8 @@ int tsocket_address_inet_set_port(struct tsocket_address *addr,
* @param[in] _addr The tsocket_address pointer to store the information.
*
* @return 0 on success, -1 on error with errno set.
+ *
+ * @see tsocket_address_is_unix()
*/
int tsocket_address_unix_from_path(TALLOC_CTX *mem_ctx,
const char *path,