-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
54 lines (41 loc) · 1.18 KB
/
common.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
51
52
53
54
/*
* Dated : 12/July/2018 , 10:00PM
* Author Amber Pachauri
* Purpose: This is Header file for user specific data
* to perform operations to CURL library, request to URL to compute
* for diagnostics of Network activity - bandwith, lookup, connection etc.
*
*
* This file is implemented at user-level mostly, but contains some common definitions
*
*/
#ifndef __COMMON_H_
#define __COMMON_H_
typedef struct {
char url[256];
void *message;
void *error;
int status;
int msglen;
/* ... */
double dconnect;
double dappconnect;
double dnmlookup;
double dpretransfer;
double dtransfer;
double dredirect;
double dspeed;
double dsize;
double dtime;
} st_usermessage;
typedef enum {
eSAMKNWSSTATUS_ERR = -1, /* signal other states*/
eSAMKNWSSTATUS_NONE = 0, /* signals none */
eSAMKNWSSTATUS_OK = 1, /*signals sams' exec*/
eSAMKNWSSTATUS_MSG = 2, /*signal sams' incommin */
eSAMKNWSSTATUS_DONE = 3, /*signal sams' done */
eSAMKNWSSTATUS_ALLOC = 4 /*signals sams' resource allocation*/
} esamknwsDTMAPIStatus;
#define MAX_HEADERS (10)
#define SIZE_HEADERS (64)
#endif