2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2013-06-08 21:51:53 +04:00
|
|
|
* Copyright (C) Jay Sorg 2004-2013
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2005-09-25 07:30:09 +04:00
|
|
|
|
2006-05-26 00:34:32 +04:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @file sesman.h
|
|
|
|
* @brief Main include file
|
|
|
|
* @author Jay Sorg
|
2007-09-17 19:28:51 +04:00
|
|
|
*
|
2006-05-26 00:34:32 +04:00
|
|
|
*/
|
|
|
|
|
2005-09-25 07:30:09 +04:00
|
|
|
#ifndef SESMAN_H
|
|
|
|
#define SESMAN_H
|
|
|
|
|
2023-04-24 17:32:00 +03:00
|
|
|
struct config_sesman;
|
|
|
|
struct trans;
|
2005-09-25 07:30:09 +04:00
|
|
|
|
2022-03-03 18:35:13 +03:00
|
|
|
/* Globals */
|
|
|
|
extern struct config_sesman *g_cfg;
|
2022-12-14 12:36:07 +03:00
|
|
|
|
2023-03-13 23:00:09 +03:00
|
|
|
/**
|
2021-06-22 15:38:46 +03:00
|
|
|
* Close all file descriptors used by sesman.
|
|
|
|
*
|
|
|
|
* This is generally used after forking, to make sure the
|
|
|
|
* file descriptors used by the main process are not disturbed
|
|
|
|
*
|
2023-04-24 17:32:00 +03:00
|
|
|
* This call will also :-
|
|
|
|
* - release all trans objects held by sesman
|
|
|
|
* - Delete sesman wait objects
|
|
|
|
* - Call sesman_delete_listening_transport()
|
2021-06-22 15:38:46 +03:00
|
|
|
*/
|
2020-06-10 11:20:27 +03:00
|
|
|
int
|
2023-04-24 17:32:00 +03:00
|
|
|
sesman_close_all(void);
|
2023-03-13 23:00:09 +03:00
|
|
|
|
2022-03-03 18:37:46 +03:00
|
|
|
/*
|
|
|
|
* Remove the listening transport
|
|
|
|
*
|
|
|
|
* Needed if reloading the config and the listener has changed
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
sesman_delete_listening_transport(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the listening socket transport
|
|
|
|
*
|
|
|
|
* @return 0 for success
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sesman_create_listening_transport(const struct config_sesman *cfg);
|
|
|
|
|
2023-04-24 17:32:00 +03:00
|
|
|
/**
|
|
|
|
* Callback to process incoming SCP data
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sesman_scp_data_in(struct trans *self);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback to process incoming EICP data
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sesman_eicp_data_in(struct trans *self);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback to process incoming ERCP data
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sesman_ercp_data_in(struct trans *self);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check for termination
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sesman_is_term(void);
|
|
|
|
|
2005-09-25 07:30:09 +04:00
|
|
|
#endif
|