s4:kdc: avoid using sdb_entry_ex in netr_samlogon_generic_logon()
[Samba.git] / ctdb / common / sock_io.h
blob8b6e4eb20667fd3b90fa6b77f0dd1e63fc5ab7a9
1 /*
2 Generic Socket I/O
4 Copyright (C) Amitay Isaacs 2016
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __CTDB_SOCK_IO_H__
21 #define __CTDB_SOCK_IO_H__
23 typedef void (*sock_queue_callback_fn_t)(uint8_t *buf, size_t buflen,
24 void *private_data);
26 struct sock_queue;
28 bool sock_clean(const char *sockpath);
29 int sock_connect(const char *sockpath);
31 struct sock_queue *sock_queue_setup(TALLOC_CTX *mem_ctx,
32 struct tevent_context *ev,
33 int fd,
34 sock_queue_callback_fn_t callback,
35 void *private_data);
37 int sock_queue_write(struct sock_queue *queue, uint8_t *buf, size_t buflen);
39 #endif /* __CTDB_SOCK_IO_H__ */