2014-07-17 11:57:51 +00:00
/*
* Unix SMB / CIFS implementation .
* messages_dgm . c header
* Copyright ( C ) Volker Lendecke 2014
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# ifndef _MESSAGES_DGM_H_
# define _MESSAGES_DGM_H_
2014-10-04 11:14:26 +02:00
# include "replace.h"
# include "system/filesys.h"
# include <tevent.h>
2014-09-10 16:13:18 +02:00
int messaging_dgm_init ( struct tevent_context * ev ,
2015-10-12 21:30:30 +02:00
uint64_t * unique ,
2014-10-04 10:58:15 +02:00
const char * socket_dir ,
const char * lockfile_dir ,
2016-09-23 18:36:15 -07:00
void ( * recv_cb ) ( struct tevent_context * ev ,
const uint8_t * msg ,
2014-07-17 11:57:51 +00:00
size_t msg_len ,
2014-09-30 11:29:22 +02:00
int * fds ,
2014-06-24 07:39:05 +02:00
size_t num_fds ,
2014-07-17 11:57:51 +00:00
void * private_data ) ,
2014-09-10 16:13:18 +02:00
void * recv_cb_private_data ) ;
void messaging_dgm_destroy ( void ) ;
2015-09-30 00:31:17 +02:00
int messaging_dgm_get_unique ( pid_t pid , uint64_t * unique ) ;
2014-05-17 15:16:02 +02:00
int messaging_dgm_send ( pid_t pid ,
const struct iovec * iov , int iovlen ,
const int * fds , size_t num_fds ) ;
2014-09-10 16:13:18 +02:00
int messaging_dgm_cleanup ( pid_t pid ) ;
int messaging_dgm_wipe ( void ) ;
2017-07-21 19:03:26 +02:00
int messaging_dgm_forall ( int ( * fn ) ( pid_t pid , void * private_data ) ,
void * private_data ) ;
2016-09-30 21:53:44 -07:00
struct messaging_dgm_fde ;
struct messaging_dgm_fde * messaging_dgm_register_tevent_context (
2016-09-30 06:42:40 -07:00
TALLOC_CTX * mem_ctx , struct tevent_context * ev ) ;
2016-09-30 21:53:44 -07:00
bool messaging_dgm_fde_active ( struct messaging_dgm_fde * fde ) ;
2014-07-17 11:57:51 +00:00
# endif