1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 14 unchanged lines hidden (view full) ---
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/proto_uds.c 219818 2011-03-21 08:54:59Z pjd $");
32
33/* UDS - UNIX Domain Socket */
34
35#include <sys/types.h>
36#include <sys/un.h>
37
38#include <errno.h>
39#include <stdbool.h>
--- 74 unchanged lines hidden (view full) ---
114 uctx->uc_owner = 0;
115 uctx->uc_magic = UDS_CTX_MAGIC;
116 *ctxp = uctx;
117
118 return (0);
119}
120
121static int
122uds_client(const char *srcaddr, const char *dstaddr, void **ctxp)
123{
124 int ret;
125
126 ret = uds_common_setup(dstaddr, ctxp, UDS_SIDE_CLIENT);
127 if (ret != 0)
128 return (ret);
129
130 PJDLOG_ASSERT(srcaddr == NULL);
131
132 return (0);
133}
134
135static int
136uds_connect(void *ctx, int timeout)
137{
138 struct uds_ctx *uctx = ctx;
139
140 PJDLOG_ASSERT(uctx != NULL);
--- 221 unchanged lines hidden ---
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 14 unchanged lines hidden (view full) ---
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/proto_uds.c 219818 2011-03-21 08:54:59Z pjd $");
32
33/* UDS - UNIX Domain Socket */
34
35#include <sys/types.h>
36#include <sys/un.h>
37
38#include <errno.h>
39#include <stdbool.h>
--- 74 unchanged lines hidden (view full) ---
114 uctx->uc_owner = 0;
115 uctx->uc_magic = UDS_CTX_MAGIC;
116 *ctxp = uctx;
117
118 return (0);
119}
120
121static int
122uds_client(const char *srcaddr, const char *dstaddr, void **ctxp)
123{
124 int ret;
125
126 ret = uds_common_setup(dstaddr, ctxp, UDS_SIDE_CLIENT);
127 if (ret != 0)
128 return (ret);
129
130 PJDLOG_ASSERT(srcaddr == NULL);
131
132 return (0);
133}
134
135static int
136uds_connect(void *ctx, int timeout)
137{
138 struct uds_ctx *uctx = ctx;
139
140 PJDLOG_ASSERT(uctx != NULL);
--- 221 unchanged lines hidden ---