Blame genhash/include/layer4.h
|
Packit |
c22fc9 |
/*
|
|
Packit |
c22fc9 |
* Soft: Perform a GET query to a remote HTTP/HTTPS server.
|
|
Packit |
c22fc9 |
* Set a timer to compute global remote server response
|
|
Packit |
c22fc9 |
* time.
|
|
Packit |
c22fc9 |
*
|
|
Packit |
c22fc9 |
* Part: layer4.c include file.
|
|
Packit |
c22fc9 |
*
|
|
Packit |
c22fc9 |
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
|
|
Packit |
c22fc9 |
*
|
|
Packit |
c22fc9 |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
c22fc9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
c22fc9 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
Packit |
c22fc9 |
* See the GNU General Public License for more details.
|
|
Packit |
c22fc9 |
*
|
|
Packit |
c22fc9 |
* This program is free software; you can redistribute it and/or
|
|
Packit |
c22fc9 |
* modify it under the terms of the GNU General Public License
|
|
Packit |
c22fc9 |
* as published by the Free Software Foundation; either version
|
|
Packit |
c22fc9 |
* 2 of the License, or (at your option) any later version.
|
|
Packit |
c22fc9 |
*
|
|
Packit |
c22fc9 |
* Copyright (C) 2001-2017 Alexandre Cassen, <acassen@gmail.com>
|
|
Packit |
c22fc9 |
*/
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
#ifndef _LAYER4_H
|
|
Packit |
c22fc9 |
#define _LAYER4_H
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
/* system includes */
|
|
Packit |
c22fc9 |
#include <unistd.h>
|
|
Packit |
c22fc9 |
#include <string.h>
|
|
Packit |
c22fc9 |
#include <stdint.h>
|
|
Packit |
c22fc9 |
#include <netdb.h>
|
|
Packit |
c22fc9 |
#include <arpa/inet.h>
|
|
Packit |
c22fc9 |
#include <sys/types.h>
|
|
Packit |
c22fc9 |
#include <sys/socket.h>
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
/* local includes */
|
|
Packit |
c22fc9 |
#include "scheduler.h"
|
|
Packit |
c22fc9 |
#include "main.h"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
enum connect_result {
|
|
Packit |
c22fc9 |
connect_error,
|
|
Packit |
c22fc9 |
connect_in_progress,
|
|
Packit |
c22fc9 |
connect_timeout,
|
|
Packit |
c22fc9 |
connect_success
|
|
Packit |
c22fc9 |
};
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
/* Prototypes defs */
|
|
Packit |
c22fc9 |
extern int tcp_connect_thread(thread_t *);
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
#endif
|