/
TUPSocketFactory.h
51 lines (44 loc) · 1.85 KB
/
TUPSocketFactory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* TUPm Uptime Client : Update uptime into TUP database (http://www.uptimeprj.com)
* TUPm(Monitoring) Client : Monitor services thru TUP (http://www.uptimeprj.com)
* GPL/Free4Use 2007-21/12/2012 Sebastien TUGS (uptimeprj@nextworlds.com)
*
* TUP Linux Monitoring Engine : This Client includes a Monitoring Engine
*
* TUP Linux Client & TUPm Client are released on GPL licence :
* --------------------------------------------
*
* 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/>.
*
* TUP Linux Client use a version of minIni :
* --------------------------------------------
* Under Apache Licence. See minIni.c to read licence informations
* minIni.h is compiled with INI_READONLY option (no write to conf file)
*
* $Author: lecariboumasque@gmail.com $ . $LastChangedDate: 2011-04-25 12:45:39 +0200 (Mon, 25 Apr 2011) $
* $Revision: 7 $ .
* $Id: TUPSocketFactory.h 7 2011-04-25 10:45:39Z lecariboumasque@gmail.com $
*
*/
/*! \file */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
int initSocket (int *sock, struct sockaddr_in *sockname, struct hostent *host_address, int iServerPort, char *srv_hostname);
int closeSocket(int sock);