Annotation of embedaddon/strongswan/src/libstrongswan/networking/streams/stream_unix.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2013 Martin Willi
3: * Copyright (C) 2013 revosec AG
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: /**
17: * @defgroup stream_unix stream_unix
18: * @{ @ingroup streams
19: */
20:
21: #ifndef STREAM_UNIX_H_
22: #define STREAM_UNIX_H_
23:
24: #include <sys/un.h>
25:
26: /**
27: * Create a stream for UNIX sockets.
28: *
29: * UNIX URIs start with unix://, followed by the socket path. For absolute
30: * paths, an URI looks something like:
31: *
32: * unix:///path/to/socket
33: *
34: * @param uri UNIX socket specific URI, must start with "unix://"
35: * @return stream instance, NULL on failure
36: */
37: stream_t *stream_create_unix(char *uri);
38:
39: /**
40: * Helper function to parse a unix:// URI to a sockaddr
41: *
42: * @param uri URI
43: * @param addr sockaddr
44: * @return length of sockaddr, -1 on error
45: */
46: int stream_parse_uri_unix(char *uri, struct sockaddr_un *addr);
47:
48: #endif /** STREAM_UNIX_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>